diff --git a/docs/roadmap/remediation.md b/docs/roadmap/remediation.md index ba78ee8..d2db5a4 100644 --- a/docs/roadmap/remediation.md +++ b/docs/roadmap/remediation.md @@ -106,3 +106,53 @@ The everyday checker and the full race suite passed on Linux with Go 1.27.3. Disposable public API probes reproduced Finding 1 and checked the exhaustion and fallback behavior in Finding 3. The review found no additional contract strengthening beyond the native containment wording discussed in Finding 1. + +## Integration follow-up + +The follow-up reviewed the same implementation through its existing callers +and downstream consumers. Findings 1–4 remain open. + +| Stage | Interaction reviewed | +| --- | --- | +| 1 | The public facade copies the new descriptions into each request. Existing concrete context checks, disabled import handling, and overlay name validation still run on their established paths. | +| 2 | Derived imports preserve the receiving tier's repeat detection and the native namespace token. A probe confirmed that a derived import and explicit file repeat within the same namespace, while separately constructed namespaces with the same label and path compose independently. Standalone host validation diverges from explicit context handling. See Finding 5. | +| 3 | Both traversal paths prepare declarations from the existing parsed specs. Placement diagnostics still use the local mapping scope for sequence items. | +| 4 | With optional imports and no base, the declaring source enters the established scope composition and version evidence paths. A probe with a mounted sequence item and required source version produced the same record and version evidence with or without an explicit base. Only the bound path reported a completed empty selection. | +| 5 | The selected overlay uses the existing loader, version protection, aggregate limits, and source context construction after main and underlay assembly. The inherited native link limitation is recorded in Finding 1. | +| 6 | The executable example exercises the handoff from discovery through embedded and operator tiers, identified record upsert, and overlay application using existing composition operations. | +| 7 | Focused regressions passed for main-relative loading, ordinary and layered overlays, source contexts, import defaults, source versions, and sequence-item placement. The host access mismatch calls for the regression in Finding 5. | +| 8 | The public contract requires a usable base for `RequireBase` and describes the established context checks. Finding 5 concerns code behavior under that contract. The ownership corrections from Finding 4 still apply. | + +## Finding 5 — Derived host roots skip standalone access validation + +**Priority P2.** When a companion binds to the main context with imports +disabled, `acquireStandaloneInput` checks the resolved directories with +`Stat`. An equivalent explicit context goes through +`validateFilesystemContext`, which also opens and closes the host root. +The derived path can therefore accept a directory that the existing +validation rejects. It publishes a passive `SourceContext` whose host +filesystem immediately fails to open that same root. +[Derived and explicit validation branches](../../internal/engine/acquisition.go#L139) +· [Existing context validator](../../internal/engine/filesystem.go#L10) +· [Passive host filesystem](../../internal/engine/resource_context.go#L77) + +A public API probe reproduced the difference as an unprivileged user on +Linux with Go 1.27.3. Put a readable `main.yml` and `resource.txt` in a +directory with owner search permission and no read permission (mode +`0100`). The main file can be read by name and its directory can be +statted, but `os.OpenRoot` returns permission denied. An imports-disabled +companion with `MainRelativeContext{RequireBase: true}` loads and returns +a source context, then `fs.ReadFile` through that context fails. The +same companion with an explicit context at that directory fails during +loading with `import.permission`. The derived case also fails with +`import.permission` when imports are enabled. + +Share the existing resolved-context validation between derived and +explicit standalone acquisition, including the host root open and close +checks. Keep the native directory checks and existing error handling. +An access failure in the selected context should remain terminal. +Add a regression at the derived versus explicit boundary, using a +deterministic root-open failure or a permission fixture that verifies +the platform actually denies the open. The check concerns root access +during loading. Later resource operations retain their existing filesystem +semantics. [Layered loading contract](../config.md#layered-loading)