Repository navigation
CONDITIONS
Baseline. This re-reviews c1027765 against the CONDITIONS on de31cf8d (this PR). I checked that since.diff equals git diff de31cf8d c1027765, and that pr.diff equals git diff 99d5fb8c c1027765 (index and hunk lines normalised). 99d5fb8c (#3154) is the base and the merge base. The compare has two parts. Merge 817a69be is clean: git diff 99d5fb8c 817a69be equals git diff 27b059d7 de31cf8d, so it brings only #3154, which has its own ruling. Commit c1027765 changes only comments in create.rs. It links the task-entry --name refusal to #3196 and the unsupported-type refusal to #3197, each with a flip condition. The arch moved from 4fa352b6 to 94952161 (gominimal/arch#166). The ledger cuts the earlier rulings at 400 characters. I could not read the review threads (gh is not installed here), so I rebuilt the open items from the design and the code at this head.
Governs (architecture.md, no arch-map.md in this checkout). Type nouns line 458 and the min box reference line 468: start creates under the entry's box name, refuses a held name, takes --new and --name, attaches if pty_enabled unless --detach, and picks default, else the sole candidate. The shipped-types table (line 1216) constrains pty_enabled: true for session, false for task. Policy layers and precedence: expansion layer 5 is "the entry itself" (line 1284), and enforcement starts from the expanded spec's default-deny network (line 1294).
Ruling. Entry choice (BCLI-071, BCLI-072), attach and --detach (BCLI-029), --name on a session (BCLI-069), the exit-2 refusals and their failure_exit_code mapping conform. The two interims are honest: each refusal states itself, and each has a flip condition and an issue. They are residuals. One gap is open, and the compare does not touch it. min session start <entry> for a non-default session entry does not create that entry's box. activate_box reads egress through pick_session_entry, which picks default or the only session entry and ignores the typed one. So min session start ci gets the egress of [sessions.default]. That egress can be wider than what ci declares (rule 7). With two session entries, no default and any network key, the typed start is refused (NoDefault). The spec body and the grants come from the legacy [session] table. Only the entry name and --name reach the stored spec, so the record names an entry whose spec it does not carry. C1 (egress from the typed entry, with a test) and C2 (the body: expand it, or file and link it) resolve it.
Not in this task. gominimal/arch#166 gives every start --loadout, --no-loadouts, --no-hooks and the per-key network flags (line 458). This task's covers: does not name them, and spec 28 owns them elsewhere (BCLI-024, BCLI-073). I set no condition for them.
Not checked. I did not check that #3196 and #3197 exist, because gh is not here. I did not run the tests (no build, by contract). C1's failure is from reading project_egress_from and pick_session_entry at this head, not from a run.
Conditions
- C1:
crates/minimal/src/cmd/boxes/create.rs:project_egressandproject_egress_fromtake the start's entry asentry: Option<&str>. When it isSome,project_egress_fromuses the entry of that name fromread_entriesand does not callpick_session_entry. When it isNone, today's pick stays.activate_boxpassesoptions.entry.as_deref()at itsproject_egress(&utf8_path)call.cmd_activatepassesNone. Add a test incrates/minimal/src/tests.rs. Use[sessions.default]with[network.egress] allow_dns_hosts = ["example.com"]and[sessions.ci]with no network keys. Assert that the create request ofmin session start cicarries noexample.com. Assert also that[sessions.a]and[sessions.b]with a network key and nodefaultletmin session start athrough, and do not refuse it withSessionEntryUndecided::NoDefault. - C2:
crates/minimal/src/cmd/boxes/create.rsstamp_session_spec_assetsspec.entryto the typed entry, but the spec body comes from the legacy[session]table (BoxSpec::for_session).project_bep_and_grantsalso reads[session]for secrets, env and BEP. So the stored spec names[sessions.<name>]and does not carry that entry's packages, secrets or hooks. Either expand the typed entry's body into the spec, or open a minimal issue for it. Then link that issue in the doc comment ofstamp_session_spec_aswith its flip condition, asStartEntryRefusal::NameUnsupportedlinks #3196, and name it as a residual in the PR body.
Ruled at c102776 against gominimal/arch@949521619eea by claude-opus-5-5; arch_rulings 1078, job b7bc263f-80b3-430f-87a1-c36baea57ecd.