8000 test(mfile): T27 — Pin golden vectors for the example and the built-in types by minimal-foundry[bot] · Pull Request #3439 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

test(mfile): T27 — Pin golden vectors for the example and the built-in types - #3439

Merged
mitodrummer merged 5 commits into
mainfrom
agent/2431-pin-golden-vectors-for-the-example-and-the-built
Nov 15, 2026
Merged

mitodrummer merged 5 commits into
mainfrom
agent/2431-pin-golden-vectors-for-the-example-and-the-built

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T27 — Pin golden vectors for the example and the built-in types

slice: S6
kind: task
covers: BOX-145
size: M
est: 60 code, 360 tests
executor: agent
difficulty: routine
model: standard
diagnostics: a failing vector names first differing byte
observability: none: tests only, no runtime
layers:
- vectors:
- crates/mfile/tests/golden.rs (new): tests
- crates/mfile/tests/golden/example.toml (new): architecture example
- crates/mfile/tests/golden/defaults_session_only.toml (new): session defaults only
- crates/mfile/tests/golden/vectors.json (new): pinned vectors
test: cargo nextest run -p mfile example_expansion_matches_golden_vectors
produces: none
consumes:
- crates/mfile/src/projection.rs
proof: The example expands to exactly the pinned bytes.
depends on:
- blocked by #2430
- blocked by #2412

Proof

The session entry dev and the task entries lint and test of crates/mfile/tests/golden/example.toml expand to exactly the spec bytes, projection records and digests pinned in tests/golden/vectors.json. So does the implicit default entry of defaults_session_only.toml. The six built-in types render their root, defaults and constraints equal to the pinned vectors. If one byte changes, the test fails. The failure names the vector and the first byte that differs.

Notes from the agent: Read this first: example.toml is a reconstruction, not a copy. The architecture's example minimal.toml is in the architecture repository (gominimal/arch), and no copy of it is in this tree or in the spec excerpt. I wrote an example that has the features the spec says the example has: session and task entries, an agent entry that is declared and not expanded, the flat egress_allow_dns / egress_allow_subnets / egress_deny_subnets keys (BOX-157), an [upstream] commit pin and a github: secret grant. A follow-up must replace example.toml with the real architecture example and run the test again with MFILE_BLESS_GOLDEN=1 to regenerate vectors.json. The bless switch is in the test for this reason. Until that follow-up, the proof holds only for the reconstructed example. Other notes: (1) The test expands each entry as the min box spec path does: legacy::canonicalize, then the type-chain layers, then [defaults] and [upstream], then expand. After that, network::canonicalize moves the flat egress keys to the nested egress.* keys. (2) The lint and test vectors have the same digest. This is correct, because the projection does not carry exec, timeout or packages. (3) The task does not define how to render a built-in type's definition. I rendered it as its root plus builtin_defaults and builtin_constraints, each serialised as TOML. (4) The spec calls the defaults-only file pinned. I read pinned as a fixed fixture file, so defaults_session_only.toml has no [upstream] table. (5) I checked the d…[truncated]

Tests

line exit tail
cargo nextest run -p mfile example_expansion_matches_golden_vectors 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify

min task run agent-verify passed ([tasks.verify]).

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

Closes #2431

The session and task entries of the example minimal.toml, and the
implicit default entry of a file with only [defaults.session], expand
to spec bytes and projection digests pinned in vectors.json. The six
built-in types render their defaults and constraints equal to theirs.
A failing vector names itself and the first byte that differs (BOX-145).
@coderabbitai
coderabbitai Bot commented Nov 14, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3901272e-c063-4e2b-b9ca-78c488541e3e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Nov 14, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 6 threads unresolved at 5973033e0150.

APPROVE withheld: 6 unresolved threads — minimal-arch[bot] crates/mfile/tests/golden/example.toml, minimal-arch[bot] crates/mfile/tests/golden.rs:155, minimal-arch[bot] crates/mfile/tests/golden/vectors.json, minimal-foundry[bot] crates/mfile/tests/golden.rs, minimal-arch[bot] crates/mfile/tests/golden.rs:88, …. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none, all files are new.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: CONDITIONS · 1 condition · the full ruling

The golden vectors pin a reconstructed example, not the design's example. BOX-145 binds the session and task entries of the architecture's example minimal.toml. architecture.md line 1197 names that file as example-minimal.toml, and the arch checkout carries it. The reconstruction has other entries, so the test does not prove BOX-145. Copy the design's file and bless the vectors again, as C1 says. The implicit default vector and the built-in type vectors conform.

Ruled at 3b5490c against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

Comment thread crates/mfile/tests/golden/example.toml Outdated
@@ -0,0 +1,51 @@
# The example `minimal.toml` of the Box architecture, for the golden
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This file is a reconstruction. BOX-145 binds the design's example, and architecture.md line 1197 names it example-minimal.toml. Replace this file with a byte copy of example-minimal.toml from arch 15b603e6.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 33caaf227034: Replaced example.toml with a byte copy of example-minimal.toml at arch 15b603e6, with one header line that names the source. The sha256 of the body matches.


let names: Vec<&str> = vectors.iter().map(|(n, _)| n.as_str()).collect();
for expected in [
"example/dev",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · The design's example has sessions.dev and tasks.render-diagrams. It has no lint or test entry. Require example/dev and example/render-diagrams. Check that reviewer, nightly and docs-preview do not expand.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 33caaf227034: The test now requires example/dev, example/render-diagrams and defaults_session_only/default. It also checks that example/reviewer, example/nightly and example/docs-preview do not expand.

Comment thread crates/mfile/tests/golden/vectors.json Outdated
@@ -0,0 +1,12 @@
{
"example/dev":{"digest":"jdJOzoaPd2ug0uhqVqA5nqQ6xgVI6d-t1AQGW7nFUBQ","projection":"{\"bep\":{\"steering\":\"dns\"},\"lifetime\":null,\"loadout_mode\":\"open\",\"nesting\":{\"allowed\":null,\"dynamic_providers\":null,\"max_depth\":null,\"providers\":null,\"types\":null},\"network\":{\"egress_deny_subnets\":[\"10.0.5.0/24\"],\"egress_dns\":[\"github.com\",\"crates.io\",\"registry.npmjs.org\"],\"egress_subnets\":[\"10.0.0.0/8\"],\"ingress_ports\":[],\"mode\":\"own_ip\",\"quic443\":\"auto\"},\"pty_enabled\":null,\"registry_commit\":\"0123456789abcdef0123456789abcdef01234567\",\"registry_pinned\":true,\"secret_grants\":[{\"env\":\"gh\",\"mode\":\"user\",\"scopes\":[\"github:repo\"]}],\"type\":{\"name\":\"session\",\"root\":\"session\",\"source\":\"builtin\"},\"v\":1}","spec":"loadout_mode = \"open\"\npackages = [\"git\", \"curl\", \"zsh\", \"rust\", \"nodejs\"]\ntimeout = \"8h\"\ntype = \"session\"\n\n[network]\ningress = [8080]\nmode = \"own_ip\"\n\n[network.egress]\nallow_dns_hosts = [\"github.com\", \"crates.io\", \"registry.npmjs.org\"]\nallow_subnets = [\"10.0.0.0/8\"]\ndeny_subnets = [\"10.0.5.0/24\"]\n\n[secrets.gh]\nscopes = [\"github:repo\"]\n\n[upstream]\nbranch = \"main\"\ncommit = \"0123456789abcdef0123456789abcdef01234567\"\nrepo_url = \"https://github.com/gominimal/pkgs\"\n"},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · These vectors come from the reconstructed example. Run the test with MFILE_BLESS_GOLDEN=1 after the copy in C1, and commit the new file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 33caaf227034: Ran the test with MFILE_BLESS_GOLDEN=1 against the copied example and committed the new vectors.json. The unblessed run passes.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 3 unresolved threads — minimal-arch[bot] crates/mfile/tests/golden/example.toml:1, minimal-arch[bot] crates/mfile/tests/golden.rs:151, minimal-arch[bot] crates/mfile/tests/golden/vectors.json:2. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite: the coder changed nothing. No change this round, on purpose. All three review threads ask for one fix: replace crates/mfile/tests/golden/example.toml with a byte copy of example-minimal.toml from the architecture at 15b603e6, update the name checks in golden.rs, and re-bless vectors.json. That file is not in this checkout. docs/architecture.md here has 256 lines, no git ref contains 'render-diagrams', and the spec excerpt does not quote the example. To write the file from memory is to make a second reconstruction, so I did not. Next step: stage example-minimal.toml (arch 15b603e6) under .implement/ or in the tree, and re-run this round. Then the fix is: copy it to golden/example.toml, require example/dev and example/render-diagrams in golden.rs, check that reviewer, nightly and docs-preview do not expand, and run the test with MFILE_BLESS_GOLDEN=1. Failed checks: ci-macos-success is an aggregator step that runs 'exit 1' and shows no cause in its log. The e2e excerpt shows only expected refusal lines …[truncated]

@agent-137
Copy link
Copy Markdown
Member

/revise

Arch condition (arch_rulings 1289, ruled at 3b5490c), in full:

  • C1: Replace crates/mfile/tests/golden/example.toml with a byte copy of example-minimal.toml from gominimal/arch at 15b603e6afb8df404fb9cbe246322052c4731998. Remove the reconstructed content and keep no local edits. A one-line comment at the top that names the arch path and commit is allowed. In crates/mfile/tests/golden.rs example_expansion_matches_golden_vectors, change the required names to example/dev, example/render-diagrams and defaults_session_only/default. Change the not-expanded check to cover example/reviewer, example/nightly and example/docs-preview. Run the test with MFILE_BLESS_GOLDEN=1 and commit the new crates/mfile/tests/golden/vectors.json. Update the //! header and the example.toml comment so they say the file is the design's example. If the expander refuses a key of the design's example, do not edit the example. Stop and report the key, because that is a spec-versus-design question.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note: the coder changed nothing. Blocked on C1. C1 needs a byte copy of example-minimal.toml from gominimal/arch at 15b603e6afb8df404fb9cbe246322052c4731998. This box cannot reach that file. git ls-remote http://127.0.0.1:8901/git/gominimal/arch failed with 'could not connect'. raw.githubusercontent.com does not resolve. No copy exists in this repository or its history (a search for 'example-minimal' and 'render-diagrams' found nothing outside .implement/). A second reconstruction breaks the 'byte copy, no local edits' condition, so I changed nothing. The n 8BD0 ext round needs the file staged in the checkout, for example at .implement/example-minimal.toml. With the file in place, the rest of C1 is mechanical: copy it with a one-line header comment, change the required names to example/dev, example/render-diagrams and defaults_session_only/default, change the not-expanded check to example/reviewer, example/nightly and example/docs-preview, update the //! header, and bless with MFILE_BLESS_GOLDEN=1. Failed checks…[truncated]

@agent-137
Copy link
Copy Markdown
Member

/revise

For arch C1 (arch_rulings 1289): this box cannot reach gominimal/arch, so here is example-minimal.toml from gominimal/arch at 15b603e6afb8df404fb9cbe246322052c4731998, byte for byte, between the fences below.

Write it to crates/mfile/tests/golden/example.toml exactly as given: the content between the fence lines, ending with one newline. Its sha256 is 27775b5219bf8e6fc6014921625f125b751a8065f6eb7f321ddf6c076b2b3b93, so check that sha256sum of the file without your header line matches. You may add the one-line header comment that names the arch path and commit, as C1 allows. Then do the rest of C1 as the ruling states.

# example-minimal.toml — canonical example of the minimal.toml layout.
# Reference: architecture.md "minimal.toml layout". Each entry below expands,
# together with its Box Type, [defaults] and [upstream], into a full Box Spec
# (box.toml).
# (This is documentation; the minimal.toml at this repo's root is the live one
# used to create this project's dev box.)

[upstream]
repo_url = "https://github.com/gominimal/pkgs"
branch = "main"
commit = "defad31c69130df153e9263cb1e4dca96b3e2994"
build_cache_url = "https://cache.gominimal.dev"

[defaults]
# Merged into every entry: lists union (entry values appended), scalars and
# tables are overridden by the entry.
packages = ["base"]
network = { mode = "none" }

# ---- a Box Type defined by this project -------------------------------------
# Types are named bundles of defaults and constraints. `defaults` join expansion
# and may be overridden by an entry; `constraints` join enforcement and only
# narrow — a type can never grant what another layer denies.

[box_types.batch-agent]
description = "Headless agent run: no PTY, bounded, no nesting"
extends = "agent"

  [box_types.batch-agent.defaults]
  timeout = "30m"
  github_token_mode = "installation"   # this type's GitHub grants default to app-attributed tokens (Gatehouse §6.4)
  network = { mode = "own_ip" }   # a starting value, not a guarantee: [defaults]
                                  # outranks type defaults, so in *this* file the
                                  # tighter mode = "none" wins and an entry that
                                  # wants the network must say so itself

  [box_types.batch-agent.constraints]
  pty_enabled = false             # narrows agent's default, which an entry could set true
  nesting = { allowed = false }   # narrows the true inherited from `agent`

# ---- interactive sessions (PTY) ---------------------------------------------

[sessions.dev]
description = "Everyday interactive dev shell"
packages = ["mermaid-cli", "emacs", "emacs-config-dev1", "kittyview", "claude-code", "less"]
exec = "bash --noprofile -l"
loadout_mode = "open"
volumes = ["dev"]
network = { mode = "own_ip", egress = { allow_dns_hosts = ["github.com", "api.anthropic.com"] } }

# ---- non-interactive tasks (run to completion) ------------------------------

[tasks.render-diagrams]
description = "Render the mermaid diagrams in architecture.md to SVG"
packages = ["mermaid-cli"]
exec = "mmdc -i architecture.md -o out/"
file_imports = [{ path = "architecture.md" }]
file_exports = [{ path = "out/" }]

# ---- agent boxes (long-lived, may nest, brokered credentials) ---------------

[agents.reviewer]
description = "Claude Code reviewing this repo"
packages = ["git", "claude-code"]
exec = "claude -p 'review the open PRs'"
github_imports = [{ repo = "https://github.com/user-name/repo-name", ref = "main" }]
network = { mode = "own_ip", egress = { allow_dns_hosts = ["api.anthropic.com", "github.com", "api.github.com", "uploads.github.com", "codeload.github.com"] } }
# Agents default to user-mode GitHub tokens: repo/permission-narrowed,
# attributed to the developer (Gatehouse §6.4; scope grammar §5.8). A GitHub
# broker grant requires the module's full host set in egress (§6.10).
secrets = { GITHUB_TOKEN = { source = "broker", scopes = ["github:repo:user-name/repo-name:contents:ro"] } }
nesting = { allowed = true, max_depth = 2, providers = ["local-box"] }

# ---- a box of a project-defined type ----------------------------------------
# [boxes.<name>] is the general form; [agents.<name>] above is sugar for it with
# type = "agent". A user-defined type has no CLI noun, so this one is driven with
# `min box start nightly`.

[boxes.nightly]
type = "batch-agent"
description = "Nightly repo triage; inherits the batch-agent bounds"
packages = ["git", "jq", "claude-code"]
github_imports = [{ repo = "https://github.com/user-name/repo-name", ref = "main" }]
# Memory (architecture "Box Res
10000
ources", [proposed]): omitted, `ram` is "auto", the
# host's default box size. Write a size only when the workload needs one — the box
# then gets exactly that limit or is refused on a host that cannot hold it:
# ram = "12GiB"
# Tables are replaced, not merged, so this entry restates `mode` — without it the
# box would expand with [defaults]'s mode = "none" and reach nothing.
network = { mode = "own_ip", egress = { allow_dns_hosts = ["api.anthropic.com", "github.com"] } }
# `inference:invoke` is a tenant-defined audience scope (Gatehouse §5.8): the broker
# mints a Gatehouse-issued, audience-bound token via re-audience exchange — not the
# third party's native credential (that is outbound XAA, reserved). Requires the tenant
# to have registered an `inference` Audience; brokering rides the ExchangeToken baseline
# (Gatehouse §7.3), and no `mode` applies (that is a GitHub-only distinction).
secrets = { ANTHROPIC_API_KEY = { source = "broker", scopes = ["inference:invoke"] } }
file_exports = [{ path = "out/triage.json" }]

# ---- services (run until stopped, may expose ingress) -----------------------

[services.docs-preview]
description = "Serve the rendered docs on :8080"
packages = ["caddy"]
exec = "caddy file-server --root out --listen :8080"
network = { mode = "own_ip", ingress = [{ proto = "tcp", port = 8080 }] }

C1 in full, for reference:

  • C1: Replace crates/mfile/tests/golden/example.toml with a byte copy of example-minimal.toml from gominimal/arch at 15b603e6afb8df404fb9cbe246322052c4731998. Remove the reconstructed content and keep no local edits. A one-line comment at the top that names the arch path and commit is allowed. In crates/mfile/tests/golden.rs example_expansion_matches_golden_vectors, change the required names to example/dev, example/render-diagrams and defaults_session_only/default. Change the not-expanded check to cover example/reviewer, example/nightly and example/docs-preview. Run the test with MFILE_BLESS_GOLDEN=1 and commit the new crates/mfile/tests/golden/vectors.json. Update the //! header and the example.toml comment so they say the file is the design's example. If the expander refuses a key of the design's example, do not edit the example. Stop and report the key, because that is a spec-versus-design question.

Replace the reconstructed example.toml with a byte copy of
example-minimal.toml from gominimal/arch at 15b603e6, require the
dev and render-diagrams vectors, check that reviewer, nightly and
docs-preview do not expand, and bless vectors.json again.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 33caaf227034.

line exit tail
cargo nextest run -p mfile example_expansion_matches_golden_vectors 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — crates/mfile/tests/golden/example.toml:1: Replaced example.toml with a byte copy of example-minimal.toml at arch 15b603e6, with one header line that names the source. The sha256 of the body matches.
  • 👍 valid — crates/mfile/tests/golden.rs:151: The test now requires example/dev, example/render-diagrams and defaults_session_only/default. It also checks that example/reviewer, example/nightly and example/docs-preview do not expand.
  • 👍 valid — crates/mfile/tests/golden/vectors.json:2: Ran the test with MFILE_BLESS_GOLDEN=1 against the copied example and committed the new vectors.json. The unblessed run passes.

The design's example, example-minimal.toml from gominimal/arch at 15b603e6, now sits in crates/mfile/tests/golden/example.toml byte for byte. Its dev and render-diagrams entries expand to exactly the bytes pinned in vectors.json, and the test passes against them.

Notes from the agent: C1 is done. example.toml has one header comment line, and the rest of the file has sha256 27775b5219bf8e6fc6014921625f125b751a8065f6eb7f321ddf6c076b2b3b93, which matches the directive. The expander refused no key of the design's example. vectors.json was blessed with MFILE_BLESS_GOLDEN=1, and then the test passed without it. The ci-macos-success log excerpt showed only the runner preamble and no cause. I could not see why that lane failed. I found one cargo fmt diff in golden.rs and fixed it. That diff was from my own edit in this round, so it was not the cause of the earlier macOS failure.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/mfile/tests/golden.rs Outdated
Json::Object(BTreeMap::from([
(
"root".to_owned(),
Json::Str(mfile::box_types::builtin(name).unwrap_or("").to_owned()),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW · tests · confidence 0.60 · in builtin_vectors

The root vector pins nothing. mfile::box_types::builtin(name) returns Some(name) for every name in BUILTIN_BOX_TYPES, so the vector only repeats its own key. A wrong root for a built-in type would not fail this test. The unwrap_or("") also hides a missing type. Use the real root lookup, for example BoxTypes::root on a default BoxTypes, and drop the fallback.

What the reviewer checked

box_types.rs:43 pub fn builtin(name) -> Option<&'static str> { BUILTIN_BOX_TYPES.into_iter().find(|b| *b == name) }

Hand this to an agent
Act on a code-review finding.

File:       crates/mfile/tests/golden.rs
Lines:      98-98
Category:   tests
Severity:   low (reviewer confidence 0.60)

Finding:
The `root` vector pins nothing. `mfile::box_types::builtin(name)` returns `Some(name)` for every name in `BUILTIN_BOX_TYPES`, so the vector only repeats its own key. A wrong root for a built-in type would not fail this test. The `unwrap_or("")` also hides a missing type. Use the real root lookup, for example `BoxTypes::root` on a default `BoxTypes`, and drop the fallback.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 5973033e0150: builtin_vectors now reads each root through BoxTypes::default().root(name) and panics on a missing type in place of unwrap_or("").

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS_WITH_CONDITIONS · 2 conditions · the full ruling

The example question from the last ruling is resolved. example.toml is now the design's example-minimal.toml, and the entries that expand are the ones that BOX-063 allows. One gap stays. The builtin/session and builtin/task vectors pin only loadout_mode as a default, but the shipped-types table (lines 1212–1224) gives each type more defaults. C1 files that gap as an issue and states it in golden.rs. C2 updates the PR body, which still calls the example a reconstruction.

Ruled at 33caaf2 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

}
}

/// The definition of each built-in type: its root, its defaults and its
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · These vectors pin builtin_defaults() as the code has it now. For session and task, that is only loadout_mode. The shipped-types table (architecture.md lines 1212–1224) also sets lifetime, exec_enabled, nesting.allowed, timeout and github_token_mode. File an issue for the gap. Say here that the vectors pin the current definitions, and give the issue number.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disputed: arch ruling 1307 on the current head 5973033 supersedes this condition. It says: "The built-in defaults for session and task hold only loadout_mode. That is what spec 29 BOX-168 and BOX-169 assign, and the other four types are with gominimal/inbox#678. That scope belongs to box_types.rs, which this task does not change." It also says: "Nothing left on this head needs a condition." The rest of the shipped-types table is tracked in gominimal/inbox#678.

//! `example-minimal.toml` in gominimal/arch. Its session and task
//! entries, and the implicit `default` entry of a file that declares only
//! `[defaults.session]`, expand to the spec bytes and projection digests
//! pinned in `tests/golden/vectors.json`. The six built-in types render
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1 · This sentence says that the built-in types render "their definitions". Add that the definitions are the current builtin_defaults() and builtin_constraints(), not the full shipped-types table. Give the C1 issue number.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disputed: arch ruling 1307 on the current head 5973033 found nothing left that needs a condition. The built-in session and task definitions that the test renders are what spec 29 BOX-168 and BOX-169 assign. The rest of the shipped-types table is tracked in gominimal/inbox#678, so this comment needs no issue number from this PR.

The root vector called box_types::builtin, which echoes its argument,
and hid a missing type behind an empty string. A default BoxTypes
resolves the root the way a file with no [box_types] does.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on the runtime's review findings, pushed as 5973033e0150.

line exit tail
cargo nextest run -p mfile example_expansion_matches_golden_vectors 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify min task run agent-verify passed.

Review threads the coder judged:

  • 👍 valid — crates/mfile/tests/golden.rs: builtin_vectors now reads each root through BoxTypes::default().root(name) and panics on a missing type in place of unwrap_or("").

The design's example and the built-in types expand to exactly the bytes pinned in crates/mfile/tests/golden/vectors.json. The built-in root vectors now come from the real BoxTypes::root lookup, and a missing type fails the test.

Notes from the agent: Revise round 4. The fix changed no pinned byte, so vectors.json did not change. For a built-in type, BoxTypes::root still returns the name of that type, because a built-in type is its own root. The vector now goes through the same lookup as an entry, and the fallback to an empty string is gone.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch-review: PASS · the full ruling

The change conforms to the design. The root vector of each built-in type now goes through BoxTypes::root, the lookup that real entries use. Before, it repeated its own input, so it proved nothing. A missing root now fails the test. The example fixture matches example-minimal.toml from the design. No conditions remain.

Ruled at 5973033 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 6 unresolved threads — minimal-arch[bot] crates/mfile/tests/golden/example.toml, minimal-arch[bot] crates/mfile/tests/golden.rs:155, minimal-arch[bot] crates/mfile/tests/golden/vectors.json, minimal-foundry[bot] crates/mfile/tests/golden.rs, minimal-arch[bot] crates/mfile/tests/golden.rs:88, …. No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 32b1f30 Nov 15, 2026
39 checks passed
@mitodrummer
mitodrummer deleted the agent/2431-pin-golden-vectors-for-the-example-and-the-built branch November 15, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T27 — Pin golden vectors for the example and the built-in types

2 participants

0