Repository navigation
T37 — Bare min init writes the entry shape - #3202
Conversation
min init and the min activate scaffold now always write minimal.toml with [defaults.session], [defaults.task] and [boxes.dev]. Remove the INIT_ENTRY_SHAPE gate, the entry_shape parameter of run_init_flow and the legacy-shape test. Add a test that the scaffold loads through mfile with no unknown-field warning and that a session start sends the [defaults.session] packages (BCLI-017).
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Bare min init and the min activate scaffold now write [defaults.session], [defaults.task] and [boxes.dev] with type = "session". This is the minimal.toml shape in the design (lines 59, 1205 and 1208). The interim from #2962 is removed at its flip condition. Session start now gets the [defaults.session] packages through mfile::legacy::settle, and the new test pins this.
Ruled at 46f930a against gominimal/arch@1f87ce800219 by claude-opus-5-5.
Split the write half of run_init_flow into write_init_plan, which owns the entry-shape conversion. The tests.rs test now calls it with the initializer's plan and reads the file it writes, so it fails if the conversion leaves the flow. Drop the shape asserts that duplicate init_scaffolds_entry_shape.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare splits write_init_plan out of run_init_flow. Every scaffold still goes through to_entry_shape. The test now drives the real write path and reads the file it writes, so the proof is stronger. init_scaffolds_entry_shape still pins the two [defaults.<type>] asserts that the commit drops. BCLI-017 conforms to lines 448 and 1204 to 1208 of the design, as on 46f930ad.
Ruled at 638a767 against gominimal/arch@1f87ce800219 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
Bare Notes from the agent: Revise round 1. run_init_flow needs a network checkout of the packages repo, so no test can call it directly. I split its write half into write_init_plan, which now does the to_entry_shape conversion, and the test calls that function. The GENERATED copy stays in the test because op::project::init::generate_mfile is private to the op crate, and the op crate is outside this task's layers. That legacy output is pinned in op by generate_mfile_falls_back_to_upstream_with_session. I did not run clippy-strict. |
every_create_session_asserts_the_daemon_build failed in CI: the new entry-shape test builds a CreateSessionRequest it never sends.
…nit-writes-the-entry-shape
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The ruling did not change. The new commit adds the entry-shape test's create request to the inventory test. It uses the same "asserts nothing" comment as the other unit-test requests. The merge of main is clean, and it does not touch the init path. Bare min init writes [defaults.<type>] and [boxes.dev] with type = "session", as architecture.md lines 448, 1205 and 1208 say. No conditions.
Ruled at 1e6a611 against gominimal/arch@9e2ff817adba by claude-opus-5-5.
|
Round 2 of 10 on a failed check suite, pushed as
Verify Converted to a draft: something above needs a person before review. Bare Notes from the agent: Revise round 2: the CI tests failure came from tests::every_create_session_asserts_the_daemon_build. That inventory test lists every CreateSessionRequest the crate builds, and the new entry-shape test builds one that it never sends. I added that test to the inventory as 'asserts nothing'. cargo-nextest is not installed here, so I ran each of the 846 minimal lib tests in its own process to imitate nextest. Before the fix, three failed. After the fix, two still fail on this box only, and neither touches the init path: legacy_network_spellings_parse_with_hint fails only without --nocapture (it passes the way nextest runs it), and resolver::tests::the_answerer_facts_ride_beside_a_down_proxy_sibling expects nothing to listen on local port 7656. I did not run the integration test targets under crates/minimal/tests. |
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @agent-137 closed the last one. The review of 1e6a611a93b1 withheld this approval on the threads open then. Posted as a comment, as the review itself was; the check and the label carry it.
…nit-writes-the-entry-shape # Conflicts: # crates/minimal/src/tests.rs
norrietaylor
left a comment
There was a problem hiding this comment.
Request changes: one line, CI is red on it. Otherwise this is correct against #3193 / BCLI-017.
Blocking
testsfails 1/5492 atcrates/minimal/src/tests.rs:416(every_create_session_asserts_the_daemon_build). The new test builds aCreateSessionRequest::new(...), so the source-scanning inventory (create_site_inventory, tests.rs:599) now findstests.rs::init_scaffolds_entry_shape_loads_and_starts_with_its_packages = asserts nothing, which isn't in the expected list. Add it afterentry_name_registers_and_creates_under_one_cleaned_namewith the neighbours' comment ("A unit test's request, never sent: it checks the session spec's packages."). Running the full crate suite, not only the filtered test, would have caught it.
Note
- The plan's test line
init_scaffolds_entry_shapeis a substring of both the new test and the existing one inproject.rs:1289, so the nextest filter matches two tests. Harmless; flagging for whoever reads the plan.
Checked: both callers (cmd_init, offer_mfile_scaffold) write the entry shape; [defaults.session] packages survive via mfile::legacy::settle; state_key keeps its task-only meaning; the no-unknown-field-warning assertion captures the real tracing::warn! path; init → Scaffold mapping still tested at project.rs:1292.
Not checked: e2e (queued), and runtime selection of [boxes.dev] from the generated file.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head adds only a merge of main to the head that passed before. The merge does not change the min init write path or its test. Bare min init still writes [defaults.session], [defaults.task] and [boxes.dev], as architecture.md lines 448, 1205 and 1208 require. BCLI-017 conforms.
Ruled at 2f453ef against gominimal/arch@9e2ff817adba by claude-opus-5-5.
|
A merge of main before round 3, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Converted to a draft: something above needs a person before review. Bare Notes from the agent: Revise round 3 was a conflict round only. The conflict in crates/minimal/src/tests.rs was two tests appended at the same place: this branch's init_scaffolds_entry_shape_loads_and_starts_with_its_packages and main's box_store_dir helper and the tests after it. I kept both sides and completed the merge in commit 2f453ef. cargo-nextest is not installed here, so I ran the same filter through cargo test. The merge brought in files from main under .github/ and elsewhere. Those are main's changes, not this task's. |
|
/revise Head 1. Register the new test in the create-site inventory. Reply on Norrie's review with the commit. Change nothing else. |
|
Undrafted by the BCLI babysitter. The draft comes only from the runtime's test lines failing with |
…nit-writes-the-entry-shape
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The ruling is PASS, and it is the same as the PASS on 2f453ef7. The new commit only rewrites one inventory comment in tests.rs. The two merges from main do not change the init path. Bare min init still writes [defaults.session], [defaults.task] and [boxes.dev], as architecture.md lines 448, 1205 and 1208 require.
Ruled at bf18565 against gominimal/arch@9e2ff817adba by claude-opus-5-5.
|
Round 3 of 10 on a /revise note, pushed as
Verify Converted to a draft: something above needs a person before review. Bare Notes from the agent: Revise round 3. The inventory entry for init_scaffolds_entry_shape_loads_and_starts_with_its_packages was already on the branch from commit 5d0547e, after entry_name_registers_and_creates_under_one_cleaned_name. This round only replaces its comment with the wording the reviewer asked for (commit 351a9f2). every_create_session_asserts_the_daemon_build passes. Whole-crate run: in parallel, 19 tests failed and the run hung until the timeout killed it. A serial re-run of those names ran 20 tests and 18 passed. Two fail even when run alone: tests::legacy_network_spellings_parse_with_hint (the captured stderr is empty) and resolver::tests::the_answerer_facts_ride_beside_a_down_proxy_sibling (resolver.rs:7689). This branch does not change resolver.rs or the code those tests check, and its diff to tests.rs only adds lines. I did not run them on main to confirm that they also fail there. I did not post a reply on the review because I have no credential for gh. |
|
Undrafted by the BCLI babysitter after round 3. The draft comes only from the runtime's test lines failing with |
…nit-writes-the-entry-shape # Conflicts: # crates/minimal/src/tests.rs
…nit-writes-the-entry-shape
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Bare min init writes the entry shape that lines 448, 1205 and 1208 of architecture.md describe. The PR's own hunks did not change since the PASS on bf185659. The two merges of main and the new design commit do not touch min init or the minimal.toml layout.
Ruled at fd56cda against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
|
A merge of main before round 4, not counted against the cap (2 of 3), pushed as Resolved conflicts in:
Verify Converted to a draft: something above needs a person before review. Bare Notes from the agent: Revise round 4 was a conflict with main only. In crates/minimal/src/tests.rs, both sides added tests at the same place. I kept both: this task's init_scaffolds_entry_shape_loads_and_starts_with_its_packages, then main's |
|
Undrafted by the BCLI babysitter after the runtime's merge of main. The only draft causes are covered by the owner's standing rules: the runtime's nextest-missing test lines, plus, on #3185, out-of-layers files that a round asked for. |
…nit-writes-the-entry-shape # Conflicts: # crates/minimal/src/tests.rs
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Bare min init and the min activate scaffold now always write the entry shape: [defaults.session], [defaults.task] and [boxes.dev] with type = "session". That is the minimal.toml layout in architecture.md lines 1204 to 1208. The merge of main does not change the lines of this PR. The PASS on fd56cda7 holds for this head.
Ruled at 1583065 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
|
Round 4 of 10 on a conflict with the base branch, pushed as Resolved conflicts in:
Verify Bare Notes from the agent: Conflict round. The one conflict was in the create-site inventory list in crates/minimal/src/tests.rs. This branch added the init_scaffolds_entry_shape_loads_and_starts_with_its_packages entry and main added planned_session_request. I kept both, in sorted order, and completed the merge commit. The inventory test every_create_session_asserts_the_daemon_build passes with both entries. No other change this round. |
|
Round 5 of 10 on a failed check suite: the coder changed nothing. Revise round 5: no code change. Every failed check in the directive failed in CI setup, before any build. clippy, native-daemon-e2e and minimald-root-integration exit 100 on apt-get: "Temporary failure resolving 'azure.archive.ubuntu.com'" when the runner fetched protobuf-compiler. The tests job also exits 100, which matches the same apt step. ci-linux-native-success is the lane aggregator and fails because those jobs fail. At the branch head (after the merge of origin/main) the test line passes, and |
|
Round 6 of 10 on a failed check suite: the coder changed nothing. Round 6 changed nothing on purpose. The failed checks are CI infrastructure faults, not faults in this change. In |
|
@norrietaylor could you re-review this? Your one blocking item from Nov 9 (the |
T37 — Bare min init writes the entry shape
slice: S5
kind: task
covers: BCLI-017
size: S
est: 30 code, 50 tests
executor: agent
difficulty: routine
model: light
diagnostics: bare
min initwrites aminimal.tomlwith[defaults.session],[defaults.task]and[boxes.dev](type = "session"), and mfile reads it without an unknown-field warning, pinned by init_scaffolds_entry_shapeobservability: the command's existing tracing span records the verb,
shape = "entry", the entrydev, and the outcomelayers:
- client:
- crates/minimal/src/cmd/project.rs:
cmd_initandoffer_mfile_scaffoldalways write the entry shape; removeINIT_ENTRY_SHAPE, theentry_shapeparameter ofrun_init_flow, and the interim comments- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal init_scaffolds_entry_shape
produces: none
consumes: none
proof: bare
min initwrites an entry-shapedminimal.toml(it replacesinit_no_flags_writes_legacy_shape, which pinned the legacy shape), the file loads through mfile with no unknown-field warning, andmin session starton it gets the[defaults.session]packages.depends on:
- blocked by #3188
Proof
Bare
min init, and the scaffold thatmin activateoffers, now write minimal.toml with [defaults.session], [defaults.task] and [boxes.dev] (type = "session"). The legacy-shape test init_no_flags_writes_legacy_shape is gone. The new test shows that this file loads through mfile with no unknown-field warning, and that a session start on it sends the [defaults.session] packages (base, vim, git) on the create request.Notes from the agent: cargo-nextest is not installed here, so I ran the same filter with
cargo test -p minimal --lib. The new test in tests.rs does not run the wholemin initflow. op::InitProject checks out the default packages repo over the network. So the test converts the initializer's scaffold with to_entry_shape, which is the step run_init_flow now always takes. Session start reads packages from File.session. legacy::settle fills that field from [defaults.session], so the blocker (#3188) did not stop this task. The cmd_init tracing event now always records shape = "entry" and entry = "dev".Tests
cargo nextest run -p minimal init_scaffolds_entry_shapeVerify
min task run agent-verifyexited 101 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Closes #3193