Repository navigation
docs: the governance ceiling stays masked from an enforced child - #12251
Conversation
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The spec row hand-copies all 21 withheld leaves — the same unpinned prose duplicate of a machine-readable list that produced the defect this PR corrects. Not justified as shipped
What this change shipsInventory (4 items) — 3 justifiedIntent: make the docs stop telling the next harness author that an enforced child can read the governance ceiling — a FIX (docs contradicted shipped code; verified by reading sandbox.py:662-796: 9 readable, 21 withheld).
[FIRST-PRINCIPLES-REVIEWED] 4b7cbc7 |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the spec row's completed 21-leaf enumeration against the loaded constants, since prose-vs-constant drift is exactly the defect this PR fixes. [DESIGN-REVIEWED] 4b7cbc7 |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsFINDING -- src/kiro_crew/sandbox.py:803 -- False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsThis PR is documentation-only: markdown prose in No findings. [OPUS-REVIEWED] 4b7cbc7 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Blocked on base debt, not on this diff
Four This PR is the control that shows it is base debt: it changes three prose passages in Not folding that fix in — it is a behaviour change in the ACP runtime and belongs in its own review. |
Three passages describe `sandbox.crew_host_runtime_leaves()` as carrying the governance ceilings and the consent records. It carries neither. The set is `playwright-cli`, the authorization sidecars, the gateway-owned run and decision records, and the operator's cloud configuration; every ceiling, policy and consent document is in `_CREW_CHILD_WITHHELD_LEAVES` forty lines above, under a comment that withholds them as one family because each is an input to an authorization decision. The code is right and has only ever had this one behaviour: both lists were introduced together and the ceiling has been masked at the OS gate since #7439. The prose was written in the same commit as the lists and described a set that commit never built, so this is a wording defect from the start rather than drift. The dangerous half is not the inventory but the argument built on it. The accessor's docstring presented the `boot_platform()` raise as a reason the ceiling MUST be subtracted from the mask, while the withhold list presents the same raise as the accepted cost of withholding it -- two statements in one file reaching opposite conclusions from one consequence. The withhold list is the shipped behaviour, so the docstring now states that the raise is accepted because it lands in the safe direction, and says outright that the paragraph above it is not licence to move a ceiling into the readable set to make a harness boot. This matters because `harness-onboarding.md` sends the next harness author to these two docstrings to learn which leaves a child may reach. Read as written, they invite exactly the change `AGENTS.md` now forbids: widening the sandbox so a new harness starts. The spec table is corrected the same way, and its withheld enumeration is completed -- it listed eight leaves of the twenty-one that are actually withheld. Wording only. No list, no predicate and no behaviour changes; 831 tests over the two files that pin the pair complete and disjoint pass unchanged.
b82c8d6 to
4b7cbc7
Compare
|
Rebased: main moved to |
What changed
Three passages describe
sandbox.crew_host_runtime_leaves()— the set anenforced harness's child may read — as carrying the governance ceilings and the
consent records. It carries neither.
The real set is nine leaves:
playwright-cli, the authorization sidecars(
apps/.dev-grants.json,settings_seeds.json, theagent_model_state.jsonpair), the gateway-owned
subagentsanddecisionsrecords, and the operator'scloud.json/cloud_launch_state.json. Every ceiling, policy and consentdocument sits in
_CREW_CHILD_WITHHELD_LEAVESforty lines above, withheld asone family because each is an input to an authorization decision a foreign
harness's child would read through a channel that reaches no gate and leaves no
record.
The code is right and is not touched here. No list, no predicate and no
behaviour changes. Only prose.
src/kiro_crew/sandbox.pysrc/kiro_crew/agent_sdk/tool_gate.pyadapter_hidden_credential_dirsno longer says ceilings and consent records are excluded from the maskdocs/system-specs/modules/agent-host-contract.mdWhy it is worth a PR of its own
The dangerous half is not the inventory but the argument built on it. The
accessor's docstring presented the
boot_platform()raise as a reason theceiling MUST be subtracted from the mask:
while the withhold list presents the same raise as the accepted cost of
withholding it:
Two statements in one file reach opposite conclusions from one consequence. The
withhold list is the shipped behaviour, so the docstring now says the raise is
accepted because it lands in the safe direction, and says outright that the
paragraph above it is not licence to move a ceiling into the readable set to
make a harness boot.
That last sentence is the point.
harness-onboarding.mdsends the next harnessauthor to these two docstrings to learn which leaves a child must reach. Read as
written, they invite exactly the change
AGENTS.mdnow forbids — widening thesandbox so a new harness starts.
Note that the ceiling IS readable in the ordinary sandbox:
_CREW_READONLY_LEAVESkeeps it readable-not-writable for a script cron, and that docstring is correct
and unchanged. The withhold applies only to an ENFORCED harness's child, through
adapter_hidden_credential_dirs.Provenance
Not drift. Both lists were introduced together in #11941 — neither
crew_host_runtime_leavesnor either constant exists at its parent — and theprose landed in that same commit describing a set the commit never built. The OS
mask over the governance tree predates it:
security_policy.jsonhas been maskedsince #7439. So the withheld disposition is the only disposition that has ever
shipped, and there is no earlier behaviour the prose could have been describing.
Found while reviewing #11941, where @buluoray had already flagged the same
contradiction in an unresolved review comment; the push after that review did not
address it.
Verification
test_sandbox_governance_mask.py+test_acp_tool_gate.py: 831 passed.These are the files that pin the pair complete and disjoint, and that assert
crew_host_runtime_leaves()equals the readable list and never intersects thewithheld one — so they are the tests that would notice if this were a code
change wearing a docs label.
21 withheld, and the spec row's completed enumeration accounts for all 21.
--platform linux(1654 files),docs-lint, comment-history with
COMMENT_HISTORY_BASE_REF=origin/main: allgreen.
Pattern harvest
The shape is a doc and a data structure landing in one commit and disagreeing
about the same consequence, with the prose stating the safer-sounding option and
the code stating the safe one. Same class as #11556's import-time assert, which
required five wording entries and shipped with two — an invariant that was
unsatisfiable in the commit that created it.
Both are caught by reading the constant instead of its docstring. The repo's
existing completeness pin already forces a NEW leaf to be classified; what it
cannot see is prose that misdescribes the classification of the leaves already
there. No mechanism is proposed for that here — the observation is that a
docstring is the wrong place to carry a security inventory when the list is forty
lines away and machine-readable.