Repository navigation
test(minimald): T25 — Types only narrow, end to end - #3336
Conversation
An entry of a project type that extends task and breaks its constraint is refused with exit 3 by the expander, and again by the daemon when the unchecked spec reaches it. A type that loosens the task root does not resolve.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none: the diff only appends to |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This PR adds one test and no product code. The test proves that a type which extends task only narrows it, as design principle 9 and the Composition rule (line 1264) require. It drives the real loosening check, the expansion check and the daemon admission check. It relaxes none of them. The open client wiring (#3295) and the exit-code transport (#3313) are filed residuals.
Ruled at 59ceb34 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
There was a problem hiding this comment.
Read at 59ceb34, with a lab run.
The test proves both layers refuse, in the right order. Expansion refuses an entry that breaks [box_types.ci]'s pty_enabled = false, flat and under io, with exit 3 and the entry, key and type named; the unchecked spec then reaches the daemon and is refused again with exit 3, naming ci, its root task and the key, with no record filed; and a derived type that widens a constraint (ci-loose) fails to resolve, naming the type, key and parent. That is T23 and T24 exercised together, which is what the task asked, with no product code touched.
Lab, Linux: the full CI mirror (workspace nextest with the new test, the native daemon e2e, clippy, doctests) passes at this tree, and the baseline holds on Ubuntu 24.04.
T25 — Types only narrow, end to end
slice: S5
kind: integration
covers: none
size: S
est: 40 code, 120 tests
executor: agent
difficulty: routine
model: light
diagnostics: daemon log names both refusals
observability: one span covers both refusals
layers:
- slice:
- crates/minimald/src/box_manager/tests.rs: tests
test: cargo nextest run -p minimald derived_task_type_refused_at_expansion_and_admission
produces: none
consumes: none
proof: declare a Box Type that extends task, and see an entry that breaks its constraints refused at expansion and again at the daemon.
depends on:
- blocked by #2420
- blocked by #2424
- blocked by #2426
Proof
The test declares
[box_types.ci]withextends = "task"and two entries that setpty_enabled = true, one flat and one underio. The expander refuses each entry with exit 3 and names the entry, the key and[box_types.ci]. The daemon then receives the unchecked spec and refuses it again with exit 3. It namesci, its roottaskand the key, and files no record. A typeci-loosethat tries to allowpty_enabled = trueovertaskdoes not resolve (exit 3).Notes from the agent: The test adds no product code. The expansion check (T23) and the admission check (T24) already exist on this branch. minimald has no direct
tomldependency, so the test parses the file withstr::parseand letsBoxTypes::from_fileinfer the table type. Cargo.toml did not change. Diagnostics and observability: the daemon log names both refusals (the flatpty_enabledkey and the nestedio.pty_enabledkey) with exit_code=3, and the create span recordsrefusal=on each line. The expansion refusal runs on the client side, so it is an error value and not a daemon log line.clippy -p minimald --all-targetsshowed no warning in the test file. Nothing callscheck_constraintsin themincreate path yet (#3295), so the test calls the expander functions directly, as the client will.Tests
cargo nextest run -p minimald derived_task_type_refused_at_expansion_and_admissionVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.Closes #2428