Skip to content

Commit 39e06aa

Browse files
gHashTagclaude
andauthored
spec(trinity): a capability card for the brain region tests, one ahead of the pin (Closes #5953) (#5965)
Trinity-S-AI-DNA/trinity#1333 puts five brain test steps back into trinity's build.zig (test-basal-ganglia, test-reticular-formation, test-locus-coeruleus, test-brain, test-brain-stress) over six src/brain test roots. Trinity's capability index, which vendors tools/trinity_manifest.py and these cards byte for byte, found the eleven targets with no owning card, failed on each as UNASSIGNED_TARGET, and turned the "Headless profile from a clean clone" job red. specs/trinity/capabilities/brain.regions.t27 owns exactly those eleven targets: executable, zig, headless (the steps sit outside every !ci_mode block), work package S03. Its acceptance is the five `zig build <step> -Dci=true` commands. Its evidence is measured, from brain-ci runs 37184075728 (push) and 37184077352 (pull_request) at Trinity-S-AI-DNA/trinity@291ac8b24, each step's exit code gated, with the same counts in both runs: 51/51, 48/48, 52/52, 151/151, and 261/261 with 0 leaked. No canonical spec is claimed: src/brain is handwritten Zig, and specs/brain/brain.t27 only lists it in a comment table. research.unreferenced-sources no longer names src/brain; its NOTE says why, and records that 43 of the 46 .zig files under src/brain stay unreachable at the pin (37 at 291ac8b24). The order problem stays visible. None of the eleven targets exists at the pinned Trinity-S-AI-DNA/trinity@976df517, so `trinity_manifest.py check` now reports eleven UNKNOWN_TARGET findings, and the regenerated conformance/trinity/report.json records them until S01 re-pins. The card header, the README and the docs/now entry say so. Against an inventory of 291ac8b24 the card has no finding and none of the eleven is unassigned. --self-check passes. Both cards are sealed with t27c built from this branch; seal --verify matches both. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1b364a0 commit 39e06aa

7 files changed

Lines changed: 185 additions & 14 deletions
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"gen_hash_c": "sha256:009f500fea42870b0e30e698a5c574c63c8c54f48ba07c58168e1ebb3e3eece1",
3+
"gen_hash_rust": "sha256:ededd117d6712f307f8c6c1502452519239201ed8f482112a5e842964aa061bb",
4+
"gen_hash_verilog": "sha256:1cddf44fc63ac5aa32adb6972a74084d3cf81d56dbcd7c990a65db346948518b",
5+
"gen_hash_zig": "sha256:8e213e5b0a9fc782b71241840bcd7a17f89a3bbdf2ea6d121c5806296ca01210",
6+
"module": "trinity_capability_brain_regions",
7+
"ring": 12,
8+
"sealed_at": "2026-10-04T08:08:41Z",
9+
"sealed_by": "t27c-bootstrap@0.4.0",
10+
"spec_hash": "sha256:3e06b6b7b1df75d7c70dcd5bac52b7e381836103308c6c1bb01f7e741f7cb87a",
11+
"spec_path": "specs/trinity/capabilities/brain.regions.t27",
12+
"tests": {
13+
"failed": 0,
14+
"failing": [],
15+
"forced": false,
16+
"passed": 1,
17+
"total": 1
18+
}
19+
}
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
2-
"gen_hash_c": "sha256:ba83938474396c729de77a9e5777d69f8c20bff35d1a63bb01326867d36cdc4a",
3-
"gen_hash_rust": "sha256:311a04d982f36c612a65617a45f509b8d2e5989f0eeb2c799a7a693e8226c52c",
4-
"gen_hash_verilog": "sha256:e14e366315a5ad284c2cf41f3243257a3d2964ebdecf2e2c1e30b8bdc583ea24",
5-
"gen_hash_zig": "sha256:fb60a05f86b2f6165c4cbaaa25f3bc6aa791fce39e0825219a5247d7a366a386",
2+
"gen_hash_c": "sha256:a7241ea9fc069d7e64353cf4aeca32e6b581463327725af50f6201d37e090d0f",
3+
"gen_hash_rust": "sha256:984534db8779bcee364cc7d3ac46d64a912bfa1d23240c966c32c744403cfddd",
4+
"gen_hash_verilog": "sha256:69c3162855e319104c911b3dc048b6a336180990380aaeea5f61aff6299fa820",
5+
"gen_hash_zig": "sha256:93e419d61eee067a29b368e274599251650f0fda087eebe2320d575b30781fda",
66
"module": "trinity_capability_research_unreferenced_sources",
77
"ring": 12,
8-
"sealed_at": "2026-10-01T22:53:04Z",
8+
"sealed_at": "2026-10-04T08:08:46Z",
99
"sealed_by": "t27c-bootstrap@0.4.0",
10-
"spec_hash": "sha256:ae30f1b97af3f125f9baf02ac58ae994b8cc470650302e0e3d5e4ae190c356d1",
11-
"spec_path": "specs/trinity/capabilities/research.unreferenced-sources.t27"
10+
"spec_hash": "sha256:9dea85455c2d0e7bf1536bc11b9ddf6ecc7437ed028db479357280d56e797d1f",
11+
"spec_path": "specs/trinity/capabilities/research.unreferenced-sources.t27",
12+
"tests": {
13+
"failed": 0,
14+
"failing": [],
15+
"forced": false,
16+
"passed": 1,
17+
"total": 1
18+
}
1219
}

‎conformance/trinity/report.json‎

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,15 @@
180180
}
181181
},
182182
"capabilities": {
183-
"count": 51,
183+
"count": 52,
184184
"by_disposition": {
185185
"executable": [
186186
"trinity/abi.c-api",
187187
"trinity/agent.phi-loop",
188188
"trinity/agent.tri-api",
189189
"trinity/api.http-server",
190190
"trinity/bench.suite",
191+
"trinity/brain.regions",
191192
"trinity/cli.tri",
192193
"trinity/convert.b2t",
193194
"trinity/examples.zig",
@@ -250,7 +251,7 @@
250251
]
251252
},
252253
"by_profile": {
253-
"headless": 37,
254+
"headless": 38,
254255
"web": 5,
255256
"native": 4,
256257
"fpga": 2,
@@ -259,7 +260,7 @@
259260
"research": 1
260261
},
261262
"by_evidence": {
262-
"measured": 23,
263+
"measured": 24,
263264
"declared": 15,
264265
"specified": 0,
265266
"external": 3,
@@ -281,6 +282,7 @@
281282
],
282283
"S03": [
283284
"trinity/bench.suite",
285+
"trinity/brain.regions",
284286
"trinity/pkg.vendored-cache",
285287
"trinity/release.packaging",
286288
"trinity/test.graph"
@@ -343,5 +345,50 @@
343345
]
344346
}
345347
},
346-
"findings": []
348+
"findings": [
349+
{
350+
"code": "UNKNOWN_TARGET",
351+
"message": "brain.regions.t27: TARGETS step:test-basal-ganglia matches nothing build.zig defines"
352+
},
353+
{
354+
"code": "UNKNOWN_TARGET",
355+
"message": "brain.regions.t27: TARGETS step:test-reticular-formation matches nothing build.zig defines"
356+
},
357+
{
358+
"code": "UNKNOWN_TARGET",
359+
"message": "brain.regions.t27: TARGETS step:test-locus-coeruleus matches nothing build.zig defines"
360+
},
361+
{
362+
"code": "UNKNOWN_TARGET",
363+
"message": "brain.regions.t27: TARGETS step:test-brain matches nothing build.zig defines"
364+
},
365+
{
366+
"code": "UNKNOWN_TARGET",
367+
"message": "brain.regions.t27: TARGETS step:test-brain-stress matches nothing build.zig defines"
368+
},
369+
{
370+
"code": "UNKNOWN_TARGET",
371+
"message": "brain.regions.t27: TARGETS test:src/brain/basal_ganglia.zig matches nothing build.zig defines"
372+
},
373+
{
374+
"code": "UNKNOWN_TARGET",
375+
"message": "brain.regions.t27: TARGETS test:src/brain/reticular_formation.zig matches nothing build.zig defines"
376+
},
377+
{
378+
"code": "UNKNOWN_TARGET",
379+
"message": "brain.regions.t27: TARGETS test:src/brain/locus_coeruleus.zig matches nothing build.zig defines"
380+
},
381+
{
382+
"code": "UNKNOWN_TARGET",
383+
"message": "brain.regions.t27: TARGETS test:src/brain/brain.zig matches nothing build.zig defines"
384+
},
385+
{
386+
"code": "UNKNOWN_TARGET",
387+
"message": "brain.regions.t27: TARGETS test:src/brain/integration_test.zig matches nothing build.zig defines"
388+
},
389+
{
390+
"code": "UNKNOWN_TARGET",
391+
"message": "brain.regions.t27: TARGETS test:src/brain/stress_test.zig matches nothing build.zig defines"
392+
}
393+
]
347394
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# NOW -- the brain region tests get a capability card, one ahead of the pin (2026-10-04)
2+
3+
## specs/trinity/capabilities/brain.regions.t27 (gHashTag/t27#5953)
4+
5+
- gHashTag/trinity#1333 puts build steps for the brain regions back into trinity's build.zig:
6+
`test-basal-ganglia`, `test-reticular-formation`, `test-locus-coeruleus`, `test-brain` and
7+
`test-brain-stress`, over six `src/brain` test roots. The S01 checker, which trinity vendors
8+
byte for byte, found these eleven targets with no owning card. Trinity's capability index failed
9+
on each as UNASSIGNED_TARGET, and the "Headless profile from a clean clone" job went red.
10+
- The new card owns exactly those eleven targets.
11+
- It is executable, zig, and in the headless profile: the steps sit outside every `!ci_mode`
12+
block.
13+
- Its acceptance is the five `zig build <step> -Dci=true` commands.
14+
- Its evidence is `measured`, from brain-ci runs 37184075728 (push) and 37184077352
15+
(pull_request) at gHashTag/trinity@291ac8b24. Every step's exit code was gated, with the
16+
same counts in both runs: 51/51, 48/48, 52/52, 151/151, and 261/261 with 0 leaked.
17+
- It cites no canonical spec. src/brain is handwritten Zig, and nothing generates it from
18+
specs/brain/ or checks it against that directory.
19+
- `research.unreferenced-sources` no longer names `src/brain`; its NOTE says why. At the pin, 43
20+
of the 46 .zig files under src/brain are unreachable and stay in the 2082. At 291ac8b24, 37 are.
21+
22+
## The order problem, kept visible
23+
24+
- The cards are held to the inventory of the pinned tree gHashTag/trinity@976df517, and none of
25+
the eleven targets exists there. So `python3 tools/trinity_manifest.py check` now reports
26+
eleven UNKNOWN_TARGET findings, and the regenerated `conformance/trinity/report.json` records
27+
them; before this change it recorded none. No t27 workflow runs that check. The findings stay
28+
until S01 re-pins. The card's header, the README and this entry each say so.
29+
- Checking the same cards against an inventory of gHashTag/trinity@291ac8b24 gives no finding for
30+
the card and no unassigned brain target. What remains there is drift: one PIN_MISMATCH and
31+
nine COUNT_MISMATCH.
32+
- `--self-check` passes. The new card and the edited one are sealed with `t27c seal --save`,
33+
using a t27c built from this branch, and `seal --verify` matches both. Neither seal is
34+
reported by `tools/check_seal_coverage.py` or `tools/check_seal_currency.py`.
35+
36+
## Follow-up in gHashTag/trinity
37+
38+
- After this merges: run `tools/contracts.py vendor` against the new t27 master, and add
39+
`trinity/brain.regions` to `specs/reproduce/capabilities.t27`. That makes the headless
40+
profile job of gHashTag/trinity#1333 measure the card instead of failing on unowned targets.

‎specs/trinity/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ not checked.
120120
- The measured evidence of the headless profile is one public CI run (`Build & Test`,
121121
ubuntu-latest, zig 0.15.2) in which `zig build -Dci=true` succeeded; the test step is piped
122122
through `tee` there and its exit code is not measured (gHashTag/trinity#616).
123+
- One card is ahead of the pin. `brain.regions` (2026-10-04, gHashTag/t27#5953) owns the eleven
124+
brain test targets that gHashTag/trinity#1333 puts back into `build.zig`: five steps and six
125+
`src/brain` test roots. None of them exists at this revision, so `check` reports eleven
126+
`UNKNOWN_TARGET` findings, and `report.json` keeps them until S01 re-pins. Against an
127+
inventory of gHashTag/trinity@291ac8b24, the head of #1333, the card has no finding and none of
128+
the eleven is unassigned. `research.unreferenced-sources` no longer names `src/brain`.
123129

124130
## The compiler matrix (S02)
125131

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
; specs/trinity/capabilities/brain.regions.t27 -- capability trinity/brain.regions: The brain region tests of src/brain
3+
; One card of the Trinity project manifest (specs/trinity/README.md, gHashTag/t27#3563 = S01 of
4+
; gHashTag/trinity#988). tools/trinity_manifest.py check holds every card to the inventory of the
5+
; pinned consumer tree gHashTag/trinity@976df5174: the targets it owns exist in build.zig and belong
6+
; to no other card, the paths it names are tracked, the dialect matches the spec it cites and a
7+
; measured claim names its command and its source. The consumer vendors a byte-identical copy and
8+
; generates its manifest from these files (S12). ASCII only (L3), English only (LANG-EN).
9+
; This card is the exception to the first of those: its eleven targets exist in build.zig from
10+
; gHashTag/trinity#1333 on and not at the pin, so a check against the pinned inventory reports each
11+
; of them as UNKNOWN_TARGET until S01 re-pins (gHashTag/t27#5953). Its paths do exist at the pin.
12+
; phi^2 + 1/phi^2 = 3 | TRINITY
13+
14+
module trinity_capability_brain_regions;
15+
16+
pub const KIND : str = "capability";
17+
pub const ID : str = "trinity/brain.regions";
18+
pub const TITLE : str = "The brain region tests of src/brain: the basal ganglia, reticular formation and locus coeruleus units, the aggregate and integration suite, and the stress suite";
19+
; Who owns the implementation this card describes.
20+
pub const OWNER_REPO : str = "gHashTag/trinity";
21+
; executable | declared | adapter | external | deprecated | out-of-scope | research | catalog-only
22+
pub const DISPOSITION : str = "executable";
23+
; headless | web | native | fpga | training | network | research; a target installed by
24+
; zig build -Dci=true is headless, a target guarded by !ci_mode is not.
25+
pub const PROFILE : str = "headless";
26+
; The canonical spec: a path in this repository, trinity:<path> for a spec authored in the
27+
; consumer, <repo>:<path> elsewhere, "" while none exists. Never a mirrored copy.
28+
pub const CANONICAL_SPEC : str = "";
29+
pub const DIALECT : str = "none";
30+
; Implementation and generated paths of the pinned tree (trinity: prefix), checked to exist.
31+
pub const IMPLEMENTATION : [6]str = ["trinity:src/brain/basal_ganglia.zig", "trinity:src/brain/reticular_formation.zig", "trinity:src/brain/locus_coeruleus.zig", "trinity:src/brain/brain.zig", "trinity:src/brain/integration_test.zig", "trinity:src/brain/stress_test.zig"];
32+
pub const GENERATED : [0]str = [];
33+
; zig | c | rust | verilog | wasm | ts | swift | python | none; only executable, adapter and research cards claim one.
34+
pub const BACKEND : str = "zig";
35+
; build.zig targets this card owns: exe:<name>, lib:<name>, test:<root path>, step:<name>; patterns allowed.
36+
pub const TARGETS : [11]str = ["step:test-basal-ganglia", "step:test-reticular-formation", "step:test-locus-coeruleus", "step:test-brain", "step:test-brain-stress", "test:src/brain/basal_ganglia.zig", "test:src/brain/reticular_formation.zig", "test:src/brain/locus_coeruleus.zig", "test:src/brain/brain.zig", "test:src/brain/integration_test.zig", "test:src/brain/stress_test.zig"];
37+
; The command whose success is the acceptance of this capability; "" when nothing is claimed.
38+
pub const ACCEPTANCE : str = "zig build test-basal-ganglia -Dci=true && zig build test-reticular-formation -Dci=true && zig build test-locus-coeruleus -Dci=true && zig build test-brain -Dci=true && zig build test-brain-stress -Dci=true";
39+
; measured | declared | specified | external | not-claimed, as docs/system/project.md defines them.
40+
pub const EVIDENCE : str = "measured";
41+
pub const EVIDENCE_SOURCE : str = "https://github.com/gHashTag/trinity/actions/runs/37184075728 (push) and https://github.com/gHashTag/trinity/actions/runs/37184077352 (pull_request) -- brain-ci.yml on ubuntu-latest with zig 0.15.2 at gHashTag/trinity@291ac8b24 (the head of gHashTag/trinity#1333), each step run as zig build <step> -Dci=true --summary all with its exit code as the gate, the same counts in both runs: test-basal-ganglia 51/51, test-reticular-formation 48/48, test-locus-coeruleus 52/52, test-brain 151/151 (138 from brain.zig and 13 from integration_test.zig), test-brain-stress 261/261 with 0 leaked. That commit is not the pinned 976df517, whose build.zig defines none of these targets.";
42+
; The work package of gHashTag/trinity#988 that owns this capability's contract.
43+
pub const WORK_PACKAGE : str = "S03";
44+
pub const NOTE : str = "S03 decides retire or attach for the sources research.unreferenced-sources names; gHashTag/trinity#1333 attached these six test roots, and this card takes src/brain off that list (gHashTag/t27#5953). At the pin build.zig names basal_ganglia.zig, locus_coeruleus.zig and reticular_formation.zig only as imported modules of another root, and defines no brain test or step. src/brain is handwritten Zig: specs/brain/brain.t27 lists its files in a comment table, but nothing generates them from it or checks them against it, so no canonical spec is claimed. Measured are these test steps, not a run of the brain inside a service.";
45+
pub const ENABLED : bool = true;
46+
47+
test card_is_bound_to_its_package {
48+
assert KIND == "capability";
49+
assert ID == "trinity/brain.regions";
50+
assert WORK_PACKAGE == "S03";
51+
assert ENABLED == true;
52+
}

‎specs/trinity/capabilities/research.unreferenced-sources.t27‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module trinity_capability_research_unreferenced_sources;
1212

1313
pub const KIND : str = "capability";
1414
pub const ID : str = "trinity/research.unreferenced-sources";
15-
pub const TITLE : str = "Source directories that no file named by build.zig reaches through @import: src/phi-engine, src/sacred, src/consciousness, src/brain, src/tvc, src/storm and others";
15+
pub const TITLE : str = "Source directories that no file named by build.zig reaches through @import: src/phi-engine, src/sacred, src/consciousness, src/tvc, src/storm and others";
1616
; Who owns the implementation this card describes.
1717
pub const OWNER_REPO : str = "gHashTag/trinity";
1818
; executable | declared | adapter | external | deprecated | out-of-scope | research | catalog-only
@@ -25,7 +25,7 @@ pub const PROFILE : str = "headless";
2525
pub const CANONICAL_SPEC : str = "";
2626
pub const DIALECT : str = "none";
2727
; Implementation and generated paths of the pinned tree (trinity: prefix), checked to exist.
28-
pub const IMPLEMENTATION : [6]str = ["trinity:src/phi-engine", "trinity:src/sacred", "trinity:src/consciousness", "trinity:src/brain", "trinity:src/tvc", "trinity:src/storm"];
28+
pub const IMPLEMENTATION : [5]str = ["trinity:src/phi-engine", "trinity:src/sacred", "trinity:src/consciousness", "trinity:src/tvc", "trinity:src/storm"];
2929
pub const GENERATED : [0]str = [];
3030
; zig | c | rust | verilog | wasm | ts | swift | python | none; only executable, adapter and research cards claim one.
3131
pub const BACKEND : str = "zig";
@@ -38,7 +38,7 @@ pub const EVIDENCE : str = "not-claimed";
3838
pub const EVIDENCE_SOURCE : str = "tools/trinity_manifest.py inventory: of 2830 tracked .zig files, 748 are reachable from the 173 files build.zig names and 2082 are not (until 2026-10-01 the walk read comments and counted 749: src/background_agent/db/issue_bindings.zig is reached only through a commented-out @import); the per-directory counts are in conformance/trinity/inventory.json (zig_reachability). S03 decides retire or attach.";
3939
; The work package of gHashTag/trinity#988 that owns this capability's contract.
4040
pub const WORK_PACKAGE : str = "S01";
41-
pub const NOTE : str = "";
41+
pub const NOTE : str = "src/brain was named here until 2026-10-04 (gHashTag/t27#5953). From gHashTag/trinity#1333 on, build.zig names six of its files as test roots, owned by trinity/brain.regions, so it is no longer a directory build.zig does not reach. Not all of it is reached: at the pin 43 of its 46 .zig files are unreachable and are among the 2082 above, and at gHashTag/trinity@291ac8b24 (the head of #1333) 37 of 46 are.";
4242
pub const ENABLED : bool = true;
4343

4444
test card_is_bound_to_its_package {

0 commit comments

Comments
 (0)