Repository navigation
id: phase-4 mount validation — canonical paths, reserved-route and remount conflict refusal (#5537) - #11284
Conversation
…and remount conflict refusal (#5537) Work preserved from the prior claim's sub-session (task 19857, lanes code-a/any-n): PublicationMounts::mount is now fallible and validates at mount time — canonicalize_mount_path, RESERVED_EXPLORER_ROUTES shadow refusal (either-direction segment-boundary relation), different-world remount refusal with same-world idempotence. ServeMountSink propagates the error so the publication manager reverts its persisted entry. Tests: canonical accept/reject matrix, reserved-route matrix with near-misses, remount conflict, sibling-mount segment isolation, router-level refusal with the Explorer still answering, sink propagation.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Phase 4 of design #2146 for #5537: path mounts in id serve — the validation/conflict layer that was missing.
Verified landscape first: segment-boundary dispatch already exists (
publication_mount_layerin id-web routes resolves viaPublicationMounts::lookup(), longest whole-segment prefix, and serves the mounted world from a program-only router scoped under the prefix). What was missing: canonicalization/validation, andmount()silently replaced any existing mount.Changes:
id-web:canonicalize_mount_path()— rejects relative paths, empty/./..segments, trailing slash except root, whitespace/control/?/#/\characters.id-web:RESERVED_EXPLORER_ROUTES+ shadow check (either-direction segment-boundary relation) — mounting over a reserved Explorer route is refused at mount time. The acknowledged override remains the id(serve): dynamic publish/unpublish — bind and unbind programs and pages to ports, interfaces, and paths at runtime #2147 publication operation only, not implemented here (per packet scope).id-web:PublicationMounts::mount()now returnsResult<()>— refuses a path already mounted to a different world (table unchanged on error); same-world re-mount stays idempotent; nested mounts stay legal (longest-prefix lookup).id-cli:ServeMountSinkpropagates the result (the publication manager already reverts its persisted entry on sink error).Tests (laptop, fleet-build-lock, patch verified at base c91a8ba — see note):
cargo test -p id-web704 passed / 0 failed;cargo test -p id-cli686+7+7 passed / 0 failed. New tests cover the canonical accept/reject matrices, the reserved-route matrix, different-world remount refusal, and sibling-mount segment isolation (/prog2does not resolve under mount/prog).Known residuals (pre-existing, not this PR): WebSocket upgrades under a mount do not complete (documented in
publication_mount_layer); current main carries an unrelated id-worlds E0004 breakage from #1831 S2 (commit b6409f5) that post-dates the verified base — the three touched files are byte-identical between the two bases.Queue task 19857.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.