fix(brain-ci): restore the brain test steps that exist, drop the ones that test nothing - #1333
Merged
Merged
Conversation
poll(since, allocator, max_events) scanned only the first max_events
buffered events and then filtered them by `since`. Whenever those oldest
events were at or before `since`, it returned nothing even though newer
events matched: with three old events and two new ones,
poll(boundary, a, 1) returned 0 events instead of 1.
The scan now walks the whole buffer and stops once max_events events
have passed the filter, which is what the doc comment already promised
("Returns events with timestamp > since ... Limited by max_events").
poll(0, a, n) is unchanged.
Found by the new `tri stress --health` probe limit-after-filter. A module
test pins it: it fails on the old code (0 events) and passes on this one.
Refs #1326
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tri stress --health` was a stub that printed "not implemented yet" and no Score: line, so the brain-ci Brain Health Check failed on every run as "not measured". It now runs 17 probes against the three brain regions linked into tri: basal_ganglia (8: claim, refuse, heartbeat, complete, abandon, TTL expiry, shard accounting, an 8-thread one-winner-per-task race), reticular_formation (5: string ownership, FIFO order, since filter, limit-after-filter, bounded ring) and locus_coeruleus (4: exponential, capped and monotone, linear and constant, jitter bounds). Each probe uses fresh private instances (never the process globals) and its own leak-checking allocator; a leak fails the probe. The output lists every probe as PASS or FAIL with its claim, then one plain-ASCII line Score: <n.n>/100 (<passed> of <total> probes passed) where n = 100 * passed / total, then "Status: HEALTHY" or "Status: UNHEALTHY". The command exits 1 if any probe failed. Nothing in the score is a constant: removing the basal_ganglia live-claim check, the locus_coeruleus cap or the poll fix drops it to 88.2, 82.4 and 94.1. Not covered: other src/brain regions (not linked into tri), load and soak behaviour. The other stress modes still only print a notice. Refs #1326 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Brain Health Check parsed the first number anywhere on the Score: line, so a colour escape such as ESC[32m before "Score:" read as 32. It now reads only the number directly after "Score:" on the first Score: line, integer or decimal. The HEALTHY check used `grep -q "HEALTHY"`, which also matches "UNHEALTHY", so every run with a Status line reported healthy. It now matches the whole line "Status: HEALTHY". A run above the threshold with failed probes now gets a warning annotation instead of passing silently. The threshold (80), the not-measured and unparseable branches, and `|| true` are unchanged. The comment block describes what the score measures and states that the CLI Smoke Test, which fails on any failed probe, only runs after brain-unit, brain-integration and brain-stress succeed. Closes #1326 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository default GITHUB_TOKEN is read-only and brain-ci.yml had no permissions block, so "Comment Health on PR" failed with 403 "Resource not accessible by integration" on the first PR run where the health check passed (run 37176287100). The same applies to the stress comment and the Critical State Notification. Those steps were unreachable while the health check failed first. Grant contents: read and pull-requests: write at workflow level. A PR from a fork still receives a read-only token. Refs #1326 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stress_test.zig still read `registry.claims`, the single map the registry had before it was split into 16 shards, so the file stopped compiling (13 errors) and test-brain-stress could not run. Count with Registry.count() and look a claim up in the one shard Registry.getShardIndex names, under that shard's read lock. The tests themselves are unchanged: 261/261 pass on zig 0.15.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or leak Restoring test-brain ran the dashboard's own tests for the first time in months (integration_test.zig imports the file by path). They found: - RegionMetrics.deinit freed the alert through raw_metrics.allocator after raw_metrics.deinit() had set the map to undefined: a segfault at 0xaaaa... whenever a region carried an alert. Read the allocator first. - setMetric/setMetricOwned on an existing key leaked the new key copy and the replaced value, because HashMap.put keeps the stored key. Copy the key only on first insert and free the replaced value. - Five tests leaked memory they owned (the singletons collect() creates, buffers setMetric copies) and one asserted a 23-byte prefix of a name formatAscii truncates to 20 bytes. The assertions now match the code. test-brain: 151/151 pass, no leaks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#517 (42490a2) removed test-basal-ganglia, test-reticular-formation, test-locus-coeruleus, test-brain and test-brain-stress from build.zig while brain-ci.yml kept calling them, so every Unit Tests leg failed with "no step named ..." and nothing behind it ran. Point the steps back at the source files, which were never removed. Not restored: test-intraparietal (intraparietal_sulcus.zig is stubs around the hslm library that left this repo and does not compile) and test-hslm (hslm is tested in gHashTag/trinity-training; no such step ever existed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Unit Tests: basal-ganglia, reticular-formation, locus-coeruleus only; intraparietal and hslm dropped with the reason in the file. - Stress: pipefail-safe exit code plus zig's own "N/M tests passed" count. A missing count is NOT MEASURED and fails, never 0. The 270/300 threshold and the hard-coded 100/100 PR table are gone; nothing ever produced them. - CLI Smoke: only `tri stress --health`, no `|| true`. task stats, task list, event stats and stress --scan are unimplemented and exit 0. - Export Brain Metrics job and the --record/--history steps removed: they call unimplemented subcommands, and the health job wrote "snapshot recorded" whether or not anything was. - Report shows each job's real result instead of FAIL for skipped; the verdict still requires every job to succeed. Weekly artifact name is now unique (`with:` never expanded $(date)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
captureState() calls std.c.getpid(). macOS links libc implicitly, so test-brain passed locally, but on ubuntu-latest the integration binary failed to compile with 'dependency on libc must be explicitly specified' (brain-ci run 37180861619). A cross-compile for x86_64-linux-gnu reproduces the error before this change and compiles cleanly after it. Refs #1331 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gate needed brain-health-report without always(), so whenever the report failed the gate was skipped. A skipped check renders grey, not red: on #1328 (run 37176676345) the report failed and the Merge Gate showed skipped. With always() the gate runs and its existing check fails it for any report result other than success. Refs #1331 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
X Brain Health CheckScore: 100.0/100 X Brain is above merge threshold |
Contributor
🧪 Brain Stress Test ResultsTests: 261/261 passed, 0 leaked |
The capability index (external/t27/tools/trinity_manifest.py) finds build
targets only as `const X = b.addTest(.{ .root_module = b.createModule(.{
.root_source_file = b.path(...) }) })` and `b.step("literal", ...)`. The
helper-built roots and the region-step loop showed up as `test:None` and
hid three steps. Each brain test root and step is now written out, so
every target has a precise name a capability card can own. No test
changes: the same files are compiled with the same imports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
gHashTag
added a commit
to gHashTag/t27
that referenced
this pull request
Oct 4, 2026
…d of the pin (Closes #5953) (#5965) gHashTag/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 gHashTag/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 gHashTag/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>
…ain.regions The brain test steps this PR restores (test-basal-ganglia, test-reticular-formation, test-locus-coeruleus, test-brain, test-brain-stress) and their six src/brain test roots had no S01 card, so the capability index failed on each as UNASSIGNED_TARGET. gHashTag/t27#5965 (39e06aa0, Closes gHashTag/t27#5953) adds the card trinity/brain.regions that owns exactly those eleven targets. - tools/contracts.py vendor --revision 39e06aa0: external/t27 and the lock move from de2a1aca; 76 files (the new card is the 76th). It also brings gHashTag/t27#5474: the S01 checker skips build.zig comments and counts the vendored copies apart, and the acceptance of mcp.needle-mcp and mcp.trinity-mcp becomes zig build -Dci=true && test -x zig-out/bin/<name>. - specs/reproduce/capabilities.t27: trinity/brain.regions is in RUN. The profile's test step does not compile its roots, so its five zig build test-<region> commands are its only measure in the index. mcp.needle-mcp and mcp.trinity-mcp leave KNOWN_BLOCKED: they were blocked on steps that exist only in commented-out lines, and their new acceptance is the install the profile already makes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… t27@39e06aa0 The vendoring of gHashTag/t27@39e06aa0 added one spec test, the card_is_bound_to_its_package test of specs/trinity/capabilities/ brain.regions.t27; no other vendored spec changed its number of tests. t27c built at 39e06aa0 with zig 0.16.0 measures 58 specs and 78 tests, all passing, so a floor left at 77 would let one test vanish unseen. The other ledgers were re-checked against the new vendor and stand as they are: the eleven TEST_BLOCKED specs fail with the same first error each, lotus.t27 still drops 48 top-level tokens, and the two specs/tools/mcp specs still declare no test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
dmitrii-f-t27
pushed a commit
that referenced
this pull request
Oct 4, 2026
dmitrii-f-t27
pushed a commit
that referenced
this pull request
Oct 4, 2026
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1328 is merged (squash 292d827), so the diff now contains only this change. The commit list still shows #1328's four original commits because this branch was cut from #1328 before the squash; their content equals the squash and they add nothing to the Files tab.
Closes #1331
What was wrong
#517 (42490a2) deleted every
test-<region>,test-brainandtest-brain-stressstep frombuild.zig, butbrain-ci.ymlkept calling them. Each Unit Tests leg died onno step named 'test-basal-ganglia', Integration, Stress and CLI Smoke were skipped behind it, and the Report failed. With the steps back, three more things surfaced:stress_test.zigno longer compiled,metrics_dashboard.zigcrashed and leaked under its own tests, and the integration binary needed libc on Linux. Several remaining steps also "passed" without testing anything.Per-job decision
tri stress --recordis a TODO stub that exits 0, so "Health snapshot recorded to Hippocampus" was never true. The scored health step from #1328 is unchanged.Score: 100.0/100 (17 of 17 probes passed)zig build -Dci=trueis a real compile gate.test-basal-gangliais back inbuild.zigwithsrc/brain/basal_ganglia.zigas the test root.test-reticular-formation, rootsrc/brain/reticular_formation.zig.expected 3, found 2, redtest-locus-coeruleus, rootsrc/brain/locus_coeruleus.zig.expected 1001, found 1000, redintraparietal_sulcus.zigwraps the hslm library that moved out. What is left is stubs (GF16 = f32,TF3 = f32,PHI: f32 = 3.0) and an undeclaredhslm;zig teststops at 11 compile errors, and its 31 tests assert behaviour of the moved library. Making it compile means re-implementing GF16/TF3 here or importing from another repo. That is not a small, honest fix, so the leg is dropped andbuild.zigsays why.zig test src/brain/intraparietal_sulcus.zig: 11 errors, firstuse of undeclared identifier 'hslm'hslmsource undersrc/test-brainruns two binaries: thesrc/brain/brain.zigaggregator (13 tests) andsrc/brain/integration_test.zig(138 tests, includingmetrics_dashboard.zigby path). It needed the metrics_dashboard fixes below and libc forstate_recovery.test-brain-stressrunssrc/brain/stress_test.zig(261 tests). The old gate parsed aScore:line out of 300 that nothing ever printed, turned its absence into0, compared it with a threshold of 270, and posted a hard-coded100/100per-region table. Now the step reads zig's ownBuild Summary: a missing or zero count is NOT MEASURED (exit 1, not 0); a non-zero exit, any failed test, or any leak fails.STRESS_TEST_THRESHOLDand the--recordcall are gone.tri stress --healthis left. It exits 1 on any failed probe, which is stricter than the health job's threshold of 80. Dropped:tri task stats,tri task listandtri event stats(each|| truearound a TODO stub that exits 0) andtri stress --scan(a stub that prints "not implemented" and exits 0). No scan measurement was implemented here.tri stress --metricsis a TODO stub. The job ran underif: always(), so on #1328 it reported success while every job above it failed. The file it uploaded is written only byhealth_history.zig, which no workflow command calls; the--recordstub that was meant to write it does nothing.success. The table now prints each job's real result (success,failure,skipped,cancelled) instead of mapping everything else to FAIL, so a job skipped behind a failure no longer reads as a second failure.failurewhen one upstream job failsneedsthe report and had noalways(), so a failed report made it skipped (grey) instead of red. On #1328 run 37176676345 the report failed and the gate showed skipped. Withalways()the gate runs, and its existing check fails it for any report result other thansuccess.--record/--historystub calls and an unused build step. The stress run usesset -o pipefailand--summary all, the report is generated withif: always(), and the artifact name carries the run id.Code fixes the restored steps forced
metrics_dashboard.zig,RegionMetrics.deinit, use after deinit. It readself.raw_metrics.allocatorafterraw_metrics.deinit(), and Zig 0.15'sHashMap.deinitsets the map toundefined, so the test binary segfaulted at0xaaaaaaaaaaaaaac2. The allocator is now read first.metrics_dashboard.zig,setMetricoverwrite leaked.HashMap.puton an existing key keeps the old key, so the fresh key copy and the old value both leaked. A newputOwnedValueusesgetOrPut, frees the old value, and dupes the key only for a new entry.metrics_dashboard.zigtests. Four tests that fill the global basal_ganglia and reticular_formation singletons now reset them withdefer. Two tests now free what they allocate. TheformatAsciilong-name test now asserts the 20-byte cut thatformatAsciimakes (name[0..20]); the old expectation matched a 23-byte prefix.stress_test.zig. The registry was sharded (shards: [16]Shard) but the stress tests still readregistry.claims, which no longer exists, so the file did not compile. They now useregistry.count()and afindClaimhelper that takes the shard's read lock.build.zig, target names the capability checker can read. The S01 checker (external/t27/tools/trinity_manifest.py) finds a test target only asconst X = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path(...) }) })and a step only asb.step("literal", ...). The first version built the roots through a helper and the region steps in a loop, so the checker saw one anonymoustest:Noneand missed three steps. 291ac8b writes each root and step out. The same files compile with the same imports, and the test counts are unchanged.build.zig, libc.state_recovery.captureState()callsstd.c.getpid(). macOS links libc implicitly, sotest-brainpassed locally, but on ubuntu-latest it failed withdependency on libc must be explicitly specified(run 37180861619). Thestate_recoverymodule now setslink_libc = true. A cross-compile forx86_64-linux-gnureproduces the error before the change and compiles cleanly after it.Negative controls
Each restored step was broken, seen red, and restored.
Local, zig 0.15.2, macOS arm64:
test-basal-gangliaRegistry.count()returns+ 1test-reticular-formationpublishcountsfetchAdd(2)test-locus-coeruleusnextDelayfast path adds 1 mstest-braindeinitreads the allocator afterraw_metrics.deinit()again0xaaaaaaaaaaaaaac2; the summary still says 151/151 passedtest-brain-stressRegistry.count()returns+ 1CI, on throwaway branches (
fix/brain-ci-nc*). Each branch was one breaking commit on top of this branch. All branches have been deleted.nc2-units, 37181508280nc2-integration, 37181253809RegionMetrics.deinituse-after-deinitRegionMetrics alert allocation and cleanup; summary reads 151/151 passed, exit 1nc2-stress, 37181281587percentileinsertion sort flippedbrain stress FAILEDnc2-stress-unmeasured, 37181306269stress_test.zigback toregistry.claims(does not compile)brain stress was NOT MEASURED, exit 1A first units control (run 37181016114) broke the region implementations. The Brain Health Check caught it first (70.6/100, 5 failed probes), so the unit legs were skipped and never exercised. That is why
nc2-unitsbreaks test expectations instead: test blocks are not compiled intotri, so health stays green and the unit legs have to catch the break.CI on this branch
The capability card and the re-vendor
"Headless profile from a clean clone" was red here because no vendored t27 capability card owned the 11 restored brain targets. The S01 checker reported each one as
UNASSIGNED_TARGET. This is now fixed where the cards live; the finding was not tolerated.trinity/brain.regions.src/braintest roots.zig build test-<region> -Dci=truecommands.src/brainfromresearch.unreferenced-sources.tools/contracts.py vendoragainst t27 39e06aa0. The vendor now holds 76 files instead of 75; the extra one is the new card. The pin moves from de2a1aca, which brings two earlier upstream changes:tools/trinity_manifest.py(+310 lines).build.zigcomments, somcp.needle-mcpandmcp.trinity-mcpstop owningneedle-mcpandtrinity-mcp. Those steps exist only in commented-out lines. The cards' acceptance becomeszig build -Dci=true && test -x zig-out/bin/<name>.project.t27, the README andresearch.unreferenced-sourcesrestate the corrected counts.specs/tools/mcp/needle.t27andtrinity.t27.specs/reproduce/capabilities.t27:trinity/brain.regionsgoes into RUN, because the profile's own test step compiles none of its roots.mcp.needle-mcpandmcp.trinity-mcpleave KNOWN_BLOCKED. Their new acceptance is the install the profile already makes, and keeping them on the list would fail the index asBLOCKED_NOW_MEASURED.registry.commandsstays blocked, with its reason unchanged.TESTS_RUN_MINinspecs/reproduce/contracts.t27from 77 to 78.TEST_BLOCKEDspecs each fail with the same first error the ledger records;queen/lotus.t27still drops 48 top-level tokens;specs/tools/mcpspecs still declare no test.At the new pin, the S01 checker reports only the drift that is already tolerated:
PIN_MISMATCHand nineCOUNT_MISMATCHfindings. It reports noUNASSIGNED_TARGET.Local runs, and what was not run locally:
tools/contracts.py check --upstream --t27cused t27c built at 39e06aa0 and zig 0.16.0 on macOS arm64.test-report --alldid not listllm.igla-chat,mcp.needle-mcpormcp.trinity-mcp, each of which passes 1/1 when run alone, so only 75 tests ran against a floor of 77.--allrun listed all 58 specs and 78 tests. So did two later full checks, one with the floor at 77 and one at 78; both passed.tools/capabilities.py indexwere not run locally. The host had 6 to 9 GB free and is shared with other sessions; a fresh-cache profile build plus the index's acceptance runs would have used much of that. CI ran both, with the results above.specs/reproduce/contracts.t27do not compile undert27c test-report. The compiler emits[1]u32 = [48]as the Zig[48]and fails withspec.zig:29:46: expected type expression. So no tool executes the updatedassert TESTS_RUN_MIN == 78;tools/contracts.pyreads the constant directly.Not fixed here (out of scope, recorded)
tri task stats|list|claim,tri event stats|publishandtri stress --scan|--record|--metrics|--historyare TODO stubs that exit 0 (src/tri/tri_commands.zig). CI no longer calls them as tests. Implementing them is separate work.if (entry) |claim|, so it passes silently if the claim is missing. This weakness predates this PR.intraparietal_sulcus.zigstays uncompilable in-tree. It should either import hslm from trinity-training or be deleted, which is a decision for its owner.trinity/registry.commandsstays a known-blocked capability:zig build export-registrywrites the time it ran intogenerated_at, sogit diff --exit-code .trinity/registry.jsoncannot pass.pr-openedworkflow'sgh: Bad credentials (HTTP 401)failure is unrelated to brain-ci.{ "version": 1, "head_sha": "56040636efd3b645809d1e9c439851bed53fed31", "summary": "brain-ci called build steps that #517 deleted, so its unit, integration and stress jobs never ran. The steps that compile are restored and green on Linux, the ones that cannot be are removed with reasons, stub commands are no longer counted as tests, and every restored step was shown to go red when broken. A t27 capability card now owns the restored targets, and the re-vendor makes the headless capability index green.", "changes": [ "build.zig restores test-basal-ganglia, test-reticular-formation, test-locus-coeruleus, test-brain and test-brain-stress, and links libc for state_recovery.", "metrics_dashboard.zig: RegionMetrics.deinit no longer reads the allocator after deinit, setMetric overwrite no longer leaks, and its tests clean up after themselves.", "stress_test.zig reads claims through the sharded registry (count and a read-locked findClaim) and compiles again.", "brain-ci.yml drops the intraparietal and hslm legs, the Export Brain Metrics job and every call to a tri stub, and gates stress on zig's own test count, treating a missing count as NOT MEASURED.", "brain-ci.yml report prints real job results and the merge gate runs under always() so it fails red instead of skipping.", "build.zig writes each brain test root and step out literally so the S01 capability checker names every restored target precisely.", "Re-vendored gHashTag/t27 at 39e06aa0: the trinity/brain.regions card (t27#5965), the S01 checker that skips build.zig comments (t27#5474) and MCP agent bindings (t27#5632).", "specs/reproduce/capabilities.t27 measures trinity/brain.regions in RUN and drops mcp.needle-mcp and mcp.trinity-mcp from KNOWN_BLOCKED.", "specs/reproduce/contracts.t27 raises TESTS_RUN_MIN from 77 to the 78 tests that run at the new pin." ], "tests": [ { "command": "zig build test-basal-ganglia / test-reticular-formation / test-locus-coeruleus -Dci=true --summary all (zig 0.15.2)", "result": "51/51, 48/48 and 52/52 tests pass locally and on ubuntu-latest in push run 37181206224.", "status": "passed", "evidence": "Build Summary lines in the three Unit Tests job logs of run 37181206224." }, { "command": "zig build test-brain -Dci=true --summary all", "result": "151/151 tests pass (13 aggregator + 138 integration) after the metrics_dashboard and libc fixes, locally and in run 37181206224.", "status": "passed", "evidence": "Integration Test job log: Build Summary: 5/5 steps succeeded; 151/151 tests passed." }, { "command": "zig build test-brain-stress -Dci=true --summary all", "result": "261/261 stress tests pass with 0 leaked; the step prints brain stress: 261/261 tests passed, 0 leaked.", "status": "passed", "evidence": "Stress Test job log of run 37181206224; stress_test.zig compiles only after the sharded-registry fix." }, { "command": "brain-ci push run 37180861619 on f8d82f8b8", "result": "Units passed but the integration binary failed to compile on Linux: dependency on libc must be explicitly specified (state_recovery std.c.getpid).", "status": "failed", "evidence": "Fixed by f4170dde1; a cross-compile for x86_64-linux-gnu reproduces the error before and compiles after." }, { "command": "brain-ci push run 37181206224 on f4170dde1", "result": "Every job succeeded: health 100.0/100, three unit legs, integration, stress, CLI Smoke 17 of 17 probes, and the report.", "status": "passed", "evidence": "gh run view 37181206224; Merge Gate skipped because it runs only on pull_request events." }, { "command": "local negative controls via a break-run-restore script for each restored step", "result": "Every break went red: BG 48/51, RF 43/48 plus a leak, LC 47/52, test-brain segfault with 151/151 printed, stress 248/261; every restore went green.", "status": "passed", "evidence": "Local negative-control table in the PR description." }, { "command": "CI negative-control branches fix/brain-ci-nc2-units, -integration, -stress, -stress-unmeasured", "result": "Each run went red at exactly the targeted job with upstream jobs green: runs 37181508280, 37181253809, 37181281587 and 37181306269.", "status": "passed", "evidence": "CI negative-control table in the PR description; the throwaway branches are deleted." }, { "command": "stress step parser fed simulated pass, fail, leak-only, compile-error and empty outputs", "result": "Pass gives RESULT=pass; failures and leaks give fail; compile error and empty output give not-measured with exit 1, never a zero score.", "status": "passed", "evidence": "Matches CI: run 37181306269 printed brain stress was NOT MEASURED for a compile error." }, { "command": "zig test src/brain/intraparietal_sulcus.zig", "result": "Fails with 11 compile errors starting at use of undeclared identifier hslm; the leg is dropped rather than faked.", "status": "failed", "evidence": "Stubs GF16 = f32, TF3 = f32, PHI: f32 = 3.0 remain after hslm moved to trinity-training." }, { "command": "actionlint -ignore SC2086 -ignore SC2129 .github/workflows/brain-ci.yml; zig fmt --check build.zig and touched sources", "result": "Both clean on the final workflow and the touched Zig files.", "status": "passed", "evidence": "Run after the merge of main, which had produced a duplicated permissions block that is now removed." }, { "command": "S01 checker (external/t27/tools/trinity_manifest.py inventory + check) on a clean tree at 291ac8b24", "result": "11 UNASSIGNED_TARGET findings, all brain targets: five steps and six src/brain test roots that no vendored t27 capability card owns. Before 291ac8b24 they read as test:None plus two steps. The other findings are the tolerated PIN_MISMATCH and COUNT_MISMATCH drift.", "status": "failed", "evidence": "Resolved by gHashTag/t27#5965 (39e06aa0) and the re-vendor in 40a531560; the next entries record the check at the new pin." }, { "command": "tools/contracts.py vendor --t27 <t27 clone> --revision 39e06aa0, then tools/contracts.py check", "result": "The vendor holds 76 files of gHashTag/t27 at 39e06aa0 (one more: the brain.regions card), and the offline check says the consumed contracts are what the lock says.", "status": "passed", "evidence": "Commit 40a531560; contracts --self-check and capabilities --self-check also ok." }, { "command": "S01 checker and tools/capabilities.py index in reproduce.yml, runs 37190239982 (40a531560) and 37193597584 (56040636e)", "result": "52 cards: 24 measured, 1 blocked (registry.commands), 27 excluded; every capability is what the index says. Main has 51 cards: 21 measured, 3 blocked. No UNASSIGNED_TARGET; only PIN_MISMATCH and COUNT_MISMATCH drift.", "status": "passed", "evidence": "Headless profile job logs; the test step reports 135/135 steps succeeded on both arches." }, { "command": "tools/contracts.py check --upstream --t27c <t27c at 39e06aa0>, zig 0.16.0, macOS arm64, first run", "result": "4 findings: test-report --all did not list llm.igla-chat, mcp.needle-mcp and mcp.trinity-mcp (each 1/1 alone), so 75 tests ran under the floor of 77.", "status": "failed", "evidence": "Not reproduced by a direct --all run or two later full checks; the cause is unknown; the host was shared with other compiler builds." }, { "command": "tools/contracts.py check --upstream --t27c <t27c at 39e06aa0>, re-runs with TESTS_RUN_MIN 77 and then 78", "result": "Both exit 0: 58 specs measured, 78 tests run and passing, 11 blocked, 2 with no tests; the consumed contracts are what the lock says.", "status": "passed", "evidence": "CI contracts job passed on 40a531560 (run 37190239971)." }, { "command": "t27c test-report on each of the 11 TEST_BLOCKED specs at 39e06aa0", "result": "All 11 are still blocked, and each first error is identical to the one TEST_BLOCKED_ERRORS records.", "status": "passed", "evidence": "Compared string for string with the regex tools/contracts.py uses." }, { "command": "t27c test-report specs/reproduce/contracts.t27", "result": "BLOCKED: spec.zig:29:46 expected type expression, found ';' because [1]u32 = [48] is emitted as Zig [48]. The same happens on main a6ec8dcdd.", "status": "failed", "evidence": "Pre-existing compiler lowering; tools/contracts.py reads TESTS_RUN_MIN directly, so the floor is still enforced." }, { "command": "brain-ci push run 37184075728 and pull_request run 37184077352 on 291ac8b24", "result": "Every brain-ci job green in both runs: health 100.0/100, units 51/51, 48/48 and 52/52, integration 151/151, stress 261/261 with 0 leaked, CLI Smoke 17 of 17.", "status": "passed", "evidence": "gh run view 37184075728 and 37184077352 --repo gHashTag/trinity; the Merge Gate ran and passed on the PR run." }, { "command": "brain-ci push run 37193596465 on 56040636e", "result": "every brain-ci job green: health 100.0/100, units 51/51, 48/48 and 52/52, integration 151/151, stress 261/261 with 0 leaked, CLI Smoke 17 of 17, report success; Merge Gate skipped as it is PR-only", "status": "passed", "evidence": "gh run view 37193596465 --repo gHashTag/trinity" }, { "command": "brain-ci pull_request run 37193597519 on 56040636e", "result": "every brain-ci job green with the same counts, and the Merge Gate ran and passed. In the same PR, t27 contracts (run 37193597515) and both Headless profile jobs (run 37193597584) passed", "status": "passed", "evidence": "gh run view 37193597519 --repo gHashTag/trinity" } ], "limitations": [ "tri task, tri event and tri stress --scan/--record/--metrics/--history remain stubs that exit 0; CI no longer calls them as tests.", "intraparietal_sulcus.zig still does not compile; its tests target the hslm library now in gHashTag/trinity-training.", "The stress maximum-TTL test still passes silently if the claim is missing; that weakness predates this change.", "trinity/registry.commands stays known-blocked: the registry export writes the time it ran into generated_at.", "The headless profile and capability index were measured in CI only, not locally, because the shared host had 6 to 9 GB free.", "One local contracts run missed three specs from t27c test-report --all; three later runs did not reproduce it and the cause is unknown.", "The test blocks of specs/reproduce/contracts.t27 do not compile under t27c test-report, on main as well." ], "tags": [ "brain_ci", "zig", "negative_control", "honest_metrics" ], "blog": { "title": "Bringing back the brain tests, and only the ones that test something", "summary": "Brain CI was red because it called build steps deleted in April. Restoring them exposed a stress suite that no longer compiled, a use-after-deinit crash and leaks in the metrics dashboard, and a Linux-only libc link error. Jobs that only ran stubs were removed, not turned green.", "outline": [ "Why every unit leg failed: #517 removed the test steps from build.zig while brain-ci kept calling them, so nothing behind the unit job ever ran.", "What came back: three region test steps, an integration step over the aggregator and integration suite, and the 261-test stress suite, all green on ubuntu-latest.", "What restoring them uncovered: the stress suite still used the pre-sharding registry, and RegionMetrics.deinit read its allocator after HashMap.deinit made it undefined.", "What was removed instead of faked: the intraparietal and hslm legs, the metrics export job, and every tri command that prints a not-implemented notice and exits zero.", "How we know the gates bite: each restored step was broken on purpose locally and on throwaway CI branches, and each one went red at exactly that job." ] } }🤖 Generated with Claude Code