You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 78d88e4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(isolation): support backend-supplied provider roots (#522)
## Summary
Version the provider-input contract so sandbox backends can supply their
proven read-only root without changing the provider-relative layout.
## Issue resolved
**#521**
- Preserve the released v1 schema and fixed path unchanged.
- Add a separate v2 schema with `models/providers/<providerId>`.
- Provide an explicit host-validator CLI for staged external bundles.
- Define fail-closed backend obligations and authoritative-empty
semantics.
- Keep runtime mount/consumer implementation in the Quickstart backend
layer.
## Before and after
**Before this PR:** Provider bundles required one fixed absolute guest
root that MSB could provide but current SBX could not.
**After merge:** Version 2 preserves a stable provider-relative path
beneath a backend-supplied read-only root, while version 1 remains
byte-compatible for existing consumers.
## Verification
- Provider contract tests: 168 passed
- `make validate-provider-input-contract`: passed
- `make validate`: passed
- `make generate-check`: passed
- `make test-kits`: passed
- Ruff format/lint and `git diff --check`: passed
- Independent adversarial reviews: all blockers resolved
## Security impact
The mandatory host validator retains strict JSON, path containment,
symlink, executable, credential-binding, URL, duplicate-provider, and
cross-field checks. Schema and credential-binding inputs must come from
trusted pinned/backend control-plane sources. Rejected candidates fail
provisioning rather than becoming an empty provider set.
## Relationships
Fixes: #521
Parent epic: #357
Unblocks: GSA-TTS/agentic-coding-quickstart#600,
GSA-TTS/agentic-coding-quickstart#606, and
#516
## Rollback
Revert both commits in this PR. The released version 1 schema remains
unchanged throughout.
AI-assisted by OpenCode. Human review required.
---------
Co-authored-by: OpenCode Agent <[email protected]>
-**Repeated `--bundle` flags in ONE invocation** perform set-wide duplicate-provider checking across all candidates. Each distinct `--bundle` invocation with a single flag resets the uniqueness set, so pass every candidate as repeated `--bundle` flags in a single command to catch duplicates.
81
+
-**Zero `--bundle` flags** select repository discovery and validate the shipped fixture and canonical kit bundles. This is discovery mode, not validation of an empty external provider set; see Consumer Requirements.
82
+
83
+
`--schema-dir` and `--credential-bindings` are trusted control-plane inputs.
84
+
They MUST come from the pinned Patterns release and backend-owned credential
85
+
configuration, never from bundle contents or provider-controlled metadata. A
86
+
provider controls only the staged manifest path(s) passed with `--bundle`.
87
+
88
+
## Consumer Requirements
89
+
90
+
- Treat an absent required `ACQ_PROVIDER_INPUT_ROOT` or provider directory as
91
+
**not ready**, never as an empty provider set.
92
+
- Treat a present authoritative root with zero provider directories as a valid,
93
+
authoritative empty provider set.
94
+
- Treat a rejected bundle as a provisioning failure. Build an empty aggregate
95
+
only after successful authoritative discovery confirms zero providers.
96
+
- Read provider routing and credential-name facts only from the backend's
97
+
read-only provider directory.
98
+
- Do not place credential values in the bundle, mount, aggregate catalog, or
99
+
consumer configuration.
100
+
101
+
See ADR 0004 for the trust boundary, validation rules, and rationale.
"description": "Host-materialised, read-only self-registration record for a provider kit. Validated by acq host-side before the sandbox is created; the resulting directory is mounted read-only at /var/lib/acq/host/models/providers/<providerId>/. See integrations/isolation/docs/decisions/0004-neutral-model-provider-discovery.md §Layer 1.",
5
+
"description": "Host-materialised, read-only self-registration record for a provider kit. With legacy bundle v1, the resulting directory is mounted at /var/lib/acq/host/models/providers/<providerId>/. With bundle v2, it is at the validated provider-relative path models/providers/<providerId> beneath the backend-supplied root. The backend materializer owns root injection, read-only mounting, and materialized-directory identity checks. See integrations/isolation/docs/decisions/0004-neutral-model-provider-discovery.md §Layer 1.",
"description": "Stable, lowercase slug used as a filesystem path segment under /var/lib/acq/host/models/providers/<providerId>/. Allowed: lowercase ASCII alphanumerics and internal hyphens, 1-32 characters total. Disallowed: path separators, dots, underscores, uppercase, non-ASCII, leading/trailing hyphens, whitespace, and control characters. The pattern ends with (?![\\s\\S]) — a zero-width assertion that matches only at the true end of the string — rather than $ because JSON Schema (ECMA regex) and Python re both allow $ to match before a trailing newline, which would permit 'usai\\n' as a path segment. The (?![\\s\\S]) lookahead has no such exception and enforces fullmatch semantics portably."
28
+
"description": "Stable, lowercase slug used as the final materialized provider directory. Bundle v1 uses the legacy fixed root; bundle v2 uses a backend-supplied root plus models/providers/<providerId>. The backend materializer enforces that the materialized directory name equals this value. Allowed: lowercase ASCII alphanumerics and internal hyphens, 1-32 characters total. Disallowed: path separators, dots, underscores, uppercase, non-ASCII, leading/trailing hyphens, whitespace, and control characters. The pattern ends with (?![\\s\\S]) — a zero-width assertion that matches only at the true end of the string — rather than $ because JSON Schema (ECMA regex) and Python re both allow $ to match before a trailing newline, which would permit 'usai\\n' as a path segment. The (?![\\s\\S]) lookahead has no such exception and enforces fullmatch semantics portably."
"description": "Host-time manifest for a provider kit. Version 2 fixes the provider-relative layout while the backend supplies the authoritative read-only guest root. Every materializer MUST invoke scripts/validate_provider_input_contract.py; JSON Schema cannot enforce cross-field, file, symlink, or executable invariants.",
0 commit comments