Repository navigation
Commit e97ed48
Product writes (create-entry, edit/save, delete-entry, move-entry) now:
- run an unconditional ImportRepo namespace guard on every rewritten
operand (path_policy::check_write_operands): import_dir and below, and
for removals a strict ancestor of a nested import_dir, return 400
MONO_PATH_NOT_ALLOWED; paths inside a live ImportRepo keep their
ImportApiService behaviour;
- when no non-root main tip covers the write (fresh stack), classify the
first-level root of the user's path and land on it after lazily
materializing it with the advertise primitive; writes outside root_dirs
or landing on / return MONO_PATH_NOT_ALLOWED naming the user's path;
a strict ancestor of a nested import_dir is never materialized
(MONO_PATH_UNINITIALIZED names the directory to provision).
Same-path concurrent API writes remain bounded by ADR-TP-10 (DEFER-FU-12);
advertise/review materialization of nested import_dir ancestors is
DEFER-FU-13. Docs: deploy-trunk.md, refactoring/directory-entry-api.md,
errors.md.
Tests: create_entry_fresh_stack_without_clone, fresh_stack_concurrent_writes,
api_write_outside_roots_path_policy, api_write_custom_root_dirs,
api_write_nested_root_fresh_stack, api_write_import_namespace_guard,
import_attach_after_import_dir_api_write, path_policy::tests::write_operand_guard.
Plan: docs/plan/plan-20260923.md FU-06 (Codex R3 PASS, Claude R2 PASS).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Eli Ma <eli@patch.sh>
1 parent decc03b commit e97ed48
9 files changed
Lines changed: 650 additions & 39 deletions
File tree
- docs
- plan
- refactoring
- src/ceres
- api_service
- pack
- tests
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
0 commit comments