Skip to content

docs: reconcile the repository spec references - #66

Merged
guysenpai merged 12 commits into
mainfrom
chore/spec-reference-reconciliation
Jul 31, 2026
Merged

docs: reconcile the repository spec references#66
guysenpai merged 12 commits into
mainfrom
chore/spec-reference-reconciliation

Conversation

@guysenpai

@guysenpai guysenpai commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Maintenance chore, no tag, merged on top of M1.1.11 (09bd386). Brief:
briefs/chore-spec-reference-reconciliation.md,
committed verbatim as the first commit of the branch, with an append-only closing
record (A1–A11) at the end. The frozen body is never edited.

The 2026-07-30 knowledge-base restructuring renumbered engine-spec.md from 27
sections to 10 and migrated its cross-cutting decisions into the citable
ARCH-001..ARCH-028 registry. The repository side was never migrated. 77
references repaired
so every spec pointer in the tree resolves under the
current corpus, with zero semantic change to code, contracts, measurements or
acceptance records. engine-spec.md occurrences across the tree: 97 in 38 files
at open, 37 in 18 files at close.

Gates

Gate Commit Content
brief 52f666a verbatim, before any substitution
E1 31bff8e 18 references, 14 source/tool/example files
E1bis e4a605c 3 references outside the .zig/.md survey window
E1ter 4efe8ad second language fix
E2 88c2b1c CLAUDE.md — 4 references + § Quick links spec rewritten
E3 feebb78 52 references over 51 lines, 21 briefs + the S5 record
close 47611e2 closing record appended to the brief
E5 2b9c0cc named anchors on every domain-detail target, 8 gloss defects
E6 229b13d ARCH-016 out of scope, two stale glosses qualified, render anchor
E7 155c0f6 the two sibling tier-discipline comments agree, engine-simd.md anchor

Each gate ended at a STOP with an explicit review and GO before the next: a grep
cannot verify that an ARCH-nnn matches the subject of the sentence it lands in,
nor that its Portée covers the tier being described.

Two corrections to the brief itself

The §4 row's qualification is REFUTED. The table calls it "corrects a
wrong-section reference", asserting the five sites cited "Système de plugins" for
the POD invariant "which lived in §2.1". Measured on the 27-section master —
the numbering in force when those comments were written — §4.3 carries the POD
rule in full at lines 492–500 ("Règle stricte 100% POD pour les composants…", the
allowed list, the fixed-buffer-or-POD-handle rule, "Un composant non-POD ne
compile pas — erreur, pas warning"), while §2.1 line 175 carries only a
one-line summary. ARCH-004's body corroborates independently: it reproduces
that clause and not the summary. The five citations pointed at a real and correct
location; only the qualification was wrong, and the target is unaffected (A4).

The anchor policy is WITHDRAWN. The body states that "named anchors are
deliberately not used except on §3.1". That contradicts engine-invariants.md
§1.2 — canonical file plus named anchor for domain detail, no exception — and it
left twenty-five pointers resolving to a whole document. Every domain-detail
target now carries an anchor read in the owning document, never inferred from
the subject
, with the section number dropped everywhere. Three exemptions
stand, each motivated: the Phase −1 archive plus a spike id (the id is the
anchor), a bare ARCH-nnn (§1.2 allows the short form, and the file plus an id
already is the full link), and engine-roadmap.md, where §1.2 asks for a phase
identifier and none of the three sites designates a single phase (A9).

Acceptance criterion 1, amended

The brief states it as → zero lines. That is unreachable by construction: a
doctrine cannot forbid a citation form without quoting it, and a dated reading act
cannot be repointed without making the record claim a milestone read a file that
did not exist on its date. Amended form:

the literal grep returns 30 lines, each enumerated file:line with its
exemption class, and no other — the number a consequence of the list, never the
gate. A 31st line is a defect; a 29th is a damaged record.

Class Count
this chore's own brief 8
dated reading acts, checkbox form 14
dated reading acts, prose form (S0:258, M0.8:215) 2
historical prose whose subject is the stale numbers 4
bare filename recording which files were patched (M0.3:186) 1
the referencing policy itself (CLAUDE.md:170) 1

Full enumeration in A2. Criterion 2 returns zero, and nothing outside
.md/.zig still carries a citation.

Three rules the chore produced

  • D8 by function, not by form (A3). Any line recording a dated reading act is
    exempt whatever its shape. The exemption attaches to the evidential function,
    not the template — S0:258 and M0.8:215 are reading acts in prose.
  • A citation needs the decision AND the Portée (A10). Three gates running,
    one cause: ARCH-024 validated without its perimeter, ARCH-017 on a clause it
    delegates, ARCH-016 on a decision that describes the constraint exactly while
    its scope reads "Tier 1, Tier 3" and the cited code is Tier 0. Where no
    invariant covers the subject, the remedy is to stop citing — a comment may
    state a local discipline without invoking an invariant.
  • A stale gloss is qualified as historical, never retargeted (A11), a
    generalisation of drift pattern D4. Retargeting makes the gloss testable against
    the living owner and it fails, manufacturing the contradiction the repair was
    meant to avoid.

Verification

  • References alone moved. For each of the 51 changed lines in E3, the
    reference tokens were neutralised and the ordered sequence of every remaining
    number compared old against new: 51/51 identical, including S0:279, which
    carries nineteen. No line added or removed in any brief. E1 checked the same
    way: 0 non-comment changed lines, and that holds across E5 and E6 too.
  • Anchors are unique. engine-render.md carries four headings titled
    "Architecture", so that anchor localises nothing there. Every anchor was then
    counted mechanically in its owning document: all eleven resolve to exactly one
    heading.
  • The Portée sweep ran over every id used as a target. Six registry entries
    have a scope excluding Tier 0; two are used here; ARCH-016 was the only
    violation, and ARCH-014 is resolved by reading (cited for the Tier 1 half of
    "Tier 0/1 catalog").
  • CLAUDE.md § Quick links spec listed 45 of the 75 corpus files while
    instructing the reader to stop and ask for anything absent from it. The 75 it
    now lists form an exact bijection with the whitelist of
    engine-audit-checklist.md §4.1.
  • Three sites were invisible to the brief's own survey (--include=*.zig --include=*.md), two build.zig.zon and one .etch fixture. They would have
    survived a green acceptance grep. Scope widened 14 → 17 files.
  • §22 Layer 2 (S3:158) resolved on the only Couche 2 in the corpus — the
    parsing layer of the six-layer Etch Text panel, §23.10 of the 27-section
    master — against a precedent already closed in engine-corpus-map.md anomaly
    10. Neither of the two readings first considered has a referent anywhere.

Gates green

zig build lint 0 · zig fmt --check src tests build.zig 0 (and examples tools bench) · zig build test 264/264 steps, 1523/1540 tests passed, 17 skipped ·
zig build test-forge-3d -Dphysics_f64=true 4/4 steps, 356/356.

build-and-test (windows-2025, Debug) fails on its 20-minute job ceiling, and
it is the cache step, not the work.
Reproduced twice on this head, so not
variance. Measured against the last green run of the same leg:

step E6 229b13d ✓ 15m25s E8 run 1 ✗ E8 run 2 ✗
zig build 2m54s 2m51s 3m30s
Save Zig cache (post-build) 39s 5m23s 7m39s
zig build test 7m51s 7m55s ✓ cancelled at 7m01s
Save Zig cache (final) 2m45s killed at the ceiling not reached

The work is flat across all three; the post-build cache save grew eightfold then
twelvefold and consumed the headroom. The victim differs between the two failing
runs — the first had every build and test step green and died in the final save,
the second lost zig build test to the ceiling — which is what a budget
exhaustion looks like rather than a defect. The Bench log on the same head
shows the mechanism: Zig cache exceeded 2147483648 bytes (was 6214569092); purged contents before save. ci.yml:110-117 documents this family and states
"Debug still fits in 20"; that assumption no longer holds.

Nothing in this branch can cause it: the head commit changes one markdown file.
Left untouched — raising bench.yml/ci.yml budgets would be a CI change inside
a reference chore whose diff is comment-only by contract, and the same
.github/workflows/ owner already holds the -Dphysics_f64=true leg listed under
Out of scope. bench-ecs-smoke is green on both platforms after the same push
(windows 8m53s), so the earlier Bench timeout was the same headroom family.

Precondition of merging

Three references — src/core/scene/loader.zig:714, briefs/M1.0.5-scene-load.md:163
and :173 — point at engine-scene-serialization.md § "Resources de scène —
install-or-overwrite". That section exists in the amended file produced for
this work and the published corpus carries zero occurrences of it until that
file is re-uploaded, to the knowledge base and to the weld-spec/ mirror.
References pointing at an anchor published nowhere is precisely the fault this
chore repairs, so the upload is a precondition rather than a follow-up (A9).

A second anchor rests on a warrant that cannot be reproduced from this branch:
§ "Relation avec foundation/math/" on engine-simd.md, which was not in the
supplied file set — its title and uniqueness come from the reviewer's reading, not
from a count run here. Recorded as such in A9 and worth re-counting at the next
corpus audit.

Out of scope

Per the brief: no weld_lint rule (the exit check is the amended criterion 1, run
by hand), no KB file edited, no new tag. One KB debt this chore surfaced — the
trap note of engine-audit-checklist.md §1.2 stating one of the three readings of
§22 — has since been absorbed on the Claude.ai side, which now carries all three
and cites this chore as the second reroute on that motif.

🤖 Generated with Claude Code

guysenpai added 12 commits July 30, 2026 22:27
Repair the 18 `engine-spec.md §x` pointers carried by the 14 source,
tool and example files, under the referencing policy of
engine-invariants.md §1.2. Comment lines only — no identifier, no
signature, no test touched.

Cross-cutting decisions become ARCH ids:
- §4 → ARCH-004 on the three registry.zig POD-invariant sites. §4 is
  "Système de plugins"; the POD/SoA invariant lived in §2.1, so these
  three were wrong-section references and are corrected, not merely
  repointed.
- §2.9 → ARCH-006 (resources/api.zig, resources/root.zig,
  comptime_query.zig, rtti/type_info.zig).
- §2.3 → ARCH-005 (chunk.zig), §2.5 → ARCH-007 (rtti/type_info.zig),
  §3.5 → ARCH-017 (scene/loader.zig, scene/root.zig, foundation/root.zig,
  forge_3d/root.zig, examples/triangle/build.zig).

Domain detail becomes the owner filename:
- §19.1 → engine-scene-serialization.md (scene/loader.zig),
- §26.1 → engine-platform.md (etch/test_runner.zig,
  tools/etch_test/main.zig) — the one dangling pointer, §26 dissolved,
- §3.1 → engine-zig-conventions.md, root-file section (rtti/root.zig).

Two sites cite content the registry explicitly disclaims as detail —
the 16 KiB chunk dimension and the resource lifecycle-tag table — and
carry `detail engine-ecs-internals.md` alongside the ARCH id.
The chore's own survey greped `--include=*.zig --include=*.md`, so three
sites carrying the same fault were invisible to it and would have
survived a green acceptance grep:

- examples/triangle/build.zig.zon:8       §3.5 → ARCH-017
- bench/fixtures/synth_100/build.zig.zon:8 §3.5 → ARCH-017
- tests/etch/corpus/invalid/E0502_annotation_misapplied.etch:2
                                          §2.9 → ARCH-006

Comment lines only. The fixture keeps its line count, so the E0502 span
is unchanged; the corpus facade asserts the code alone either way.

Fix-as-you-go on the first: "Phase 0 monolithique" → "monolithic". The
language-normalization pass missed it through the same extension filter,
and the line is being touched here anyway.
Three in-line references repaired and the whole § Quick links spec
replaced by the text the chore brief supplies verbatim.

- §26.1 → engine-platform.md (M1.0.15 boundary entry, the dangling
  pointer; §26 was dissolved).
- §1.6 → ARCH-024; detail engine-c-bindings.md, and the closing
  "derogation in engine-spec.md" of the same rule goes to ARCH-024 and
  engine-c-bindings.md — a derogation is an amendment to the invariant.
- The "top-level architecture, modules, roadmap (§22)" line is absorbed
  by the rewrite: the master carries no roadmap.

The section listed 45 of the 75 corpus files while instructing the
reader to stop and ask Guy for anything absent from it — a 40 %
incomplete list generating unjustified stops. It now lists the corpus in
reading order (corpus map → invariants → owner → constitution) and
carries the referencing policy itself.

Verified: the 75 filenames it lists are a bijection with the whitelist of
engine-audit-checklist.md §4.1 — nothing invented, nothing missing.
"Path local" → "Local path" in examples/triangle/build.zig.zon and
bench/fixtures/synth_100/build.zig.zon. French word order, not a spec
citation, missed by the language-normalization pass through the same
extension filter that hid the references repaired in the previous commit.
Both lines were already being touched.
52 reference repairs over 51 lines, across 21 of the 22 closed briefs and
validation/s5-go-nogo.md. References only: verified mechanically that the
set of numbers outside the reference tokens is identical line by line, so
no figure, measurement, verdict, acceptance line or reading date moved.

Cross-cutting decisions → ARCH ids: §2.9 → ARCH-006, §4 → ARCH-004,
§3.5 → ARCH-017, §2 → ARCH-005, §1.6 → ARCH-024, §2.7 → ARCH-008,
§2.8 → ARCH-011, §1.3 → ARCH-012, §1 → ARCH-001..006, and §3.1 read as
"Tier 0 catalog" → ARCH-013 — the same number carried two subjects, and
the root-file convention target applies only to the other one.

Domain detail → the owner file: §19/§19.1 → engine-scene-serialization.md,
§16 → engine-asset-pipeline.md, §5 → engine-render.md,
§26.1 → engine-platform.md, §24.10 → etch-reference-part1.md.

Roadmap and history split by what the citation designates, never by its
number: a spike or the spike list → engine-phase-minus-1-archive.md,
a roadmap line → engine-roadmap.md §3. Spike ids stay attached to the
archive filename with no section number, since the archive is indexed by
spike.

S3:158's "§22 Layer 2" resolved by measurement, not by the number: the
only "Couche/Layer 2" in the corpus is the parsing layer of the six-layer
Etch Text panel, §23.10 of the 27-section master, migrated to
engine-tools-editor.md. It takes the named anchor, like the root-file
convention, because that file covers the whole editor.

29 lines keep an engine-spec.md citation by design and are enumerated in
the E4 report: this chore's own brief, which must quote the form it
forbids; the 14 "read <timestamp>" records, which state an act and would
otherwise claim a milestone read files that did not exist on its date;
the historical prose whose subject is the stale numbers themselves;
M0.3:186, which records which files were patched; and the doctrine line
of CLAUDE.md. A 30th, S0:258, is held back for review — same act as the
14, different form.
Strictly append-only — 243 lines added, none removed, the frozen body
untouched. Acted deviations A1 to A9, execution notes, closing notes.

The two that change what the brief says rather than what it did:

A2 — acceptance criterion 1 reads "→ zero lines" in the body. That is
unreachable by construction, not by omission: a doctrine cannot forbid a
citation form without quoting it, and a dated reading act cannot be
repointed without making the record claim a milestone read a file that did
not exist on its date. The amended form is 30 lines, each enumerated
file:line with its exemption class, and no other — the number a
consequence of the list, never the gate.

A4 — "corrects a wrong-section reference" is refuted for the five §4
sites. Measured on the 27-section master: §4.3 lines 492-500 carry the POD
rule in full, §2.1 only a one-line summary, and the body of ARCH-004
reproduces the former clause for clause. The five citations pointed at a
real and correct location; only the qualification was wrong, and the
target is unaffected.

Also recorded: D8 restated by evidential function rather than template,
with M0.8:215 reclassified; the six sections absent from the substitution
table; §22 "Layer 2" resolved on the only Couche 2 in the corpus, against
a precedent already closed in engine-corpus-map.md anomaly 10; the scope
widening from 14 to 17 files and the two language fixes; the rendering
conventions; and the KB debt on the §1.2 trap note, which states one of
the three readings of §22.
E5, on the four findings of the external review. Comment lines and
markdown only; the frozen body of the brief is untouched, A2 and A9 are
rewritten in place inside the append rather than patched by a second one.

C1 — the body's anchor policy ("named anchors are deliberately not used
except on §3.1") is WITHDRAWN: it contradicts engine-invariants.md §1.2,
which prescribes a canonical file plus a named anchor for domain detail
with no exception, and it left twenty-five pointers resolving to a whole
document. Every anchor title was read in the owning document, never
inferred from the subject, and the section number is dropped everywhere.
Three exemptions stand, each motivated: the archive plus a spike id
(the id IS the anchor), a bare ARCH-nnn (§1.2 allows the short form, and
engine-invariants.md plus an id already IS the full link), and
engine-roadmap.md, where §1.2 asks for a phase identifier — none of the
three roadmap sites designates a single phase, so each takes the named
anchor of the section it designates.

C2 — 34 glossed ARCH references re-audited against the DECISION of the id
cited, not the section it came from: 26 covered, 8 defects fixed. The
count is 34 and not 25 because a motif keyed on a trailing parenthesis
missed six glosses that precede the id or are the sentence's own subject.
On M0.2:191 no word of a closed gloss is deleted — "Tier 0/1 catalog"
moves to ARCH-013 + ARCH-014 and ARCH-024 keeps the keepers. S2:67's "8
keepers list" goes to the only document carrying the 8 → 7 transition.
S0:52's "no spec/ in repo" is qualified as historical: spec/ appears
nowhere in engine-directory-structure.md and the decision lives in
CLAUDE.md, so no target is invented.

Three of the eight REVOKE the GO given at the source gate, and the
append records it: foundation/root.zig, scene/root.zig and
scene/loader.zig cite the zero-coupling clause, which ARCH-017 does not
carry but delegates — "couplage déclaré et acyclique (ARCH-016)". E1
verified them against the source text of the 27-section §3.5; the rule
written afterwards asks about the decision of the cited id. The stricter
rule wins, and the sites take ARCH-016, with ARCH-013 alongside where the
sentence says "tier discipline".

C3 — loader.zig:714 and M1.0.5:163/:173 take the anchor of the
install-or-overwrite rule, which now exists in the amended KB.

C4 — M0.2:364, a bare reference attributing a directory-tree detail to
the master, goes to engine-directory-structure.md.

Acceptance criterion 1 stays at exactly 30 lines, all enumerated with
their class in A2. Criterion 2 zero; nothing outside .md/.zig. Gates:
lint 0, fmt 0, test 264/264 steps and 1523/1540 tests, 17 skipped,
test-forge-3d -Dphysics_f64=true 4/4 steps and 356/356.
E6, six edits on the review's four findings. Comment lines and markdown
only; the frozen body untouched, A9 and A10 updated in place and A11
added inside the append.

F2 — `ARCH-016` carries **`Portée` : Tier 1, Tier 3**, and `foundation`
and `core/scene` are Tier 0, so the id was out of scope at all three
coupling sites. Third occurrence of one cause: an id validated on its
decision text alone — ARCH-024 without its perimeter, ARCH-017 on a
clause it delegates, ARCH-016 on a decision that describes the constraint
exactly while its scope excludes the tier. A citation is admissible only
if the decision AND the Portée both hold, and that is now the rule in
A10. No invariant carries the Tier 0 import graph, so the remedy is to
stop citing rather than hunt a third id — the call already made on
rtti/type_info.zig:48. foundation/root.zig keeps engine-simd.md §4, which
carries the sister-module clause on the same line; the two scene files
keep ARCH-013 (Portée: Global) for tier membership and state their import
constraint uncited. Sweep over every id used as a target, Portée against
the tier of the cited subject: ARCH-016 was the only violation. ARCH-014
surfaces mechanically and is resolved by reading — it is cited for the
Tier 1 half of "Tier 0/1 catalog".

F3 and F4 — two glosses true when written and false against today's
corpus: M0.2:364's two-document whitelist (vk_gen is named in five KB
files today) and M1.1.5:19's "reserves for semi-implicit Euler, sleep,
CCD" (the tree now has integration.zig for Euler and CCD plus a separate
sleep.zig). Retargeting them to the living owner makes the gloss testable
against that owner, and it fails — repairing the pointer would have
manufactured the contradiction. Both are qualified as historical instead,
the recorded words unmoved; the C4 retarget of the previous gate is
annulled. Rule in A11, a generalisation of drift pattern D4.

F5 — engine-render.md carries four headings titled "Architecture", so
that anchor localises nothing there: M0.4:80 cites § "GPU Abstraction
Layer (GAL)" and § "V-Buffer (Visibility Buffer)", the two sections its
own gloss designates. Every anchor in A9 was then counted in its owning
document — all eleven resolve to exactly one heading. One site, not a
class.

F1 was not a defect: the install-or-overwrite anchor exists in the
amended file and the three references stand.

Criterion 1 stays at exactly 30. Criterion 2 zero. Gates: lint 0, fmt 0,
test 264/264 steps and 1523/1540 tests with 17 skipped, test-forge-3d
-Dphysics_f64=true 4/4 steps and 356/356.
E7, three edits on the review's three findings. Comment lines and markdown
only; A9 updated in place inside the append, frozen body untouched.

F2 — scene/root.zig and scene/loader.zig both declare that the module
imports weld_core only and never weld_etch. After E6 removed ARCH-016,
the first read "(tier discipline, ARCH-013 / the M1.0.4 brief Notes)"
while the second read "(ARCH-013)" placed after the import sentence,
where a bare id reads as covering the import rule — which E6 had just
declared it does not. The divergence between the two mattered more than
either variant: loader.zig now carries its sibling's form. Citing where a
decision was taken is not the same act as citing a normative owner, and
the provenance is worth keeping, so the M1.0.4 brief is named rather than
the sentence left uncited.

F3 — foundation/root.zig:3 kept `engine-simd.md` §4 while C1 requires a
named anchor on every domain-detail target. It takes
§ "Relation avec `foundation/math/`" and the number falls.

F1 was not a repository defect, but it exposed an unfalsifiable claim in
the append: "all eleven anchors resolve to exactly one heading" was true
of the files supplied to the gate and unverifiable by anyone else. A9 now
states which two anchors rest on a provenance the next reader cannot
reproduce — § "Resources de scène — install-or-overwrite", counted in an
amended file the published corpus does not yet carry, and
§ "Relation avec `foundation/math/`", whose uniqueness is the reviewer's
measurement since engine-simd.md was not in the supplied set. The first
makes re-uploading that file a precondition of merging rather than a
follow-up: three references pointing at an anchor published nowhere is
the fault this chore exists to repair.

Criterion 1 stays at exactly 30 — none of the three edits carries a `§`
towards the master. Criterion 2 zero. Gates: lint 0, fmt 0, test 264/264
steps and 1523/1540 tests with 17 skipped, test-forge-3d
-Dphysics_f64=true 4/4 steps and 356/356.
E8, markdown only, and only inside the append — the frozen body and A2 are
untouched. A2's thirty enumerated lines were verified against the tree and
not reopened.

The claim "all eleven resolve to exactly one heading" was E5's count,
before E6 split the render row in two and E7 added `engine-simd.md`. The
table holds fifteen anchors over fourteen rows, and both numbers are now
written; "the last two were already anchored" is replaced by naming
`engine-zig-conventions.md` and `engine-tools-editor.md`, since a
positional reference into a table that has grown twice is this chore's own
fault in miniature.

The two provenance caveats are closed rather than restated: the anchors
this work introduced are synchronised into the `weld-spec/` mirror, so the
count was re-run there and all fifteen now rest on the same warrant —
measured in the published corpus, none cited from someone else's reading.

That re-run first returned 14 of 15, reporting § "Panneau Etch Text —
éditeur de code" absent. The heading is present, `## 6 bis. Panneau Etch
Text — éditeur de code`; the count was wrong, its ordinal strip choking on
"6 bis" — the very number the same paragraph notes has already moved once.
The corrected pass also checks that a deliberately wrong anchor still
returns zero, so absence and normalisation bug are distinguishable. A
measurement that cannot fail on purpose is not a measurement.

`loader.zig:714` → `:716`, the citation's real line.

Two further staleness points that E7 introduced and left behind: A10 said
the code keeps `engine-simd.md` §4, which E7 replaced with the named
anchor, and said the scene files' import constraint stays uncited, which
E7 attributed to the M1.0.4 brief Notes. Both corrected to what the tree
says.

Criterion 1 stays at exactly 30; no edit touches a line carrying a `§`
towards the master. Criterion 2 zero. lint 0, fmt 0.
`build-and-test (windows-2025, Debug)` was killed at its 20-minute ceiling
on two consecutive runs — 25m0s then 25m1s, reproducible, not variance —
which left `ci-gate` red and branch protection blocking the merge.

The cause is the cache, not the work. Against the last green run of the same
leg the work is flat: `zig build` ~3 min, `zig build test` ~8 min. What grew
is `Save Zig cache (post-build)`: 39s → 5m23s → 7m39s. Cache steps consumed
~8m40s for ~10m52s of useful work, and the bench.yml log on the same head
names the mechanism — `Zig cache exceeded 2147483648 bytes (was 6214569092);
purged contents before save`, 6.2 GB purged to a 2 GB cap on every save. The
two failures had different victims: the first died in the final save with
every build and test step green, the second lost `zig build test` to the
ceiling. That is budget exhaustion, not a defect.

The three cache steps — restore, post-build save, final save — are now
conditioned on `matrix.mode == 'ReleaseSafe'`. The final save keeps
`always()` so a red ReleaseSafe leg still saves what it compiled.

The budget was deliberately NOT raised. The comment block being edited
records the same assumption breaking three times already: 10 → 20 at M0.1,
20 → 40 at the M0.8 close, 40 → 55 at the cache refresh chore. A fourth
raise buys one milestone. A cache that does not fit under its own cap is not
a cache, it is a tax, and the Debug legs pay it for nothing — a cold Debug
leg is ~11 min of work, ~45 % inside its budget on the slowest runner.
ReleaseSafe keeps the cache: its near-cold recompile is the case the cache
was added for and what the 55-minute budget covers.

The verification surface is unchanged. The Debug legs run the same
`zig fmt --check`, `zig build`, `zig build test`, `zig build test-etch` and
`zig build bindgen-verify` against the same sources; Zig's cache is
content-hashed and self-invalidating, so a cold leg compiles the same
program. Recorded as A12 in the chore's append, which amends acceptance
criterion 5 — "comments and markdown only" meant "no semantic change to the
engine", and no `.zig` file is in this diff.

The timing artefact gains `cache_enabled` beside `cache_matched_key`: a
Debug leg now reports `none` by design, and without that line a future
reader would diagnose a deliberately cold leg as a broken cache.
@guysenpai
guysenpai merged commit 03157b7 into main Jul 31, 2026
9 of 10 checks passed
@guysenpai
guysenpai deleted the chore/spec-reference-reconciliation branch July 31, 2026 21:51
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.

1 participant