Skip to content

v1.7 Breadth: readers, packs and import (R6, phases 10-14) - #192

Merged
leaderiop merged 238 commits into
mainfrom
refactor/r6-breadth-2026-11-22
Nov 25, 2026
Merged

leaderiop merged 238 commits into
mainfrom
refactor/r6-breadth-2026-11-22

Conversation

@leaderiop

Copy link
Copy Markdown
Owner

Summary

GSD milestone v1.7, build-plan round R6 "Breadth": five phases and 48 plans, with one commit group per plan (ADRs 0388–0393).

  • @code/core reads five more standard reports.
  • The Rust and JS packs collect those reports.
  • @gsd/core refuses a breaking API change and a release problem.
  • A legacy .planning/ folder imports into spec/gsd/.
  • X2 is a hard 100% floor.
┌──────────────────────── 238 commits on main 38de6faa2 ────────────────────────────────┐
│ P10 readers + X2 ratio     35 commits  eaffac6ec..0fc70865e  LCOV SARIF CycloneDX OSV  │
│                                                              API → facts; X2 computed   │
│ P11 packs + doctor notes   39 commits  7f9dfcc86..7a7e533f3  12 Rust/JS report packs;   │
│                                                              doctor names missing tools │
│ P12 interface + release    44 commits  dc5589098..51d542ea9  gsd/E533, gsd/E535, no new │
│                                                              kind                       │
│ P13 gsd import             72 commits  209f5fa16..0c3de36ce  specforge gsd import, own  │
│                                                              @gsd/import blob           │
│ P14 X2 close               48 commits  4088c025e..3cf28c074  every real test reaches a  │
│                                                              report; X2 floor at 100%   │
├─────────────────────────────────────────────────────────────────────────────────────────┤
│ 829 files  +77,291 / -1,367   6 ADRs   gate full 23/23   X2 100% on 4 projects          │
└─────────────────────────────────────────────────────────────────────────────────────────┘
flowchart LR
  P10[P10 readers + X2 definition] --> P11[P11 packs + doctor]
  P11 --> P12[P12 E533 / E535 guards]
  P12 --> P13[P13 gsd import]
  P10 --> P14[P14 X2 close]
  P11 --> P14
  P13 --> P14
Loading

Phases

Phase Requirements ADR Commits Review Security
10 Readers and the X2 ratio READ-01..05, X2-01 0388 35 fixed, re-vendored verified
11 Packs and doctor toolchain notes PACK-01..07 0389 39 fixed, re-vendored verified
12 Interface and release guards GUARD-01, GUARD-02 0390 44 fixed, re-vendored verified
13 GSD import IMP-01..03 0391, 0392 72 35 fixed, 1 skipped 47 closed
14 X2 close X2-02, X2-03 0393 48 29 fixed, 2 partly, 1 skipped 29 closed

P10: readers and the X2 ratio

flowchart LR
  subgraph before
    J[JUnit] --> T[test facts]
  end
  subgraph after
    L[LCOV] --> C[coverage]
    S[SARIF] --> F[static_finding]
    B[CycloneDX] --> D[dependency]
    O[OSV] --> V[vulnerability]
    A[public-api / api-extractor] --> I[api_item]
    C & F & D & V & I --> W[code/W104-W107]
  end
Loading

P11: packs and doctor toolchain notes

flowchart LR
  subgraph before
    N[node-test, rust-test packs only]
  end
  subgraph after
    R["@rust/coverage lint deps api proof"] --> RD[readers of P10]
    JS["@javascript/coverage lint deps api vitest jest playwright"] --> RD
    DR[specforge doctor] -->|which| M[tool_missing: program, codes it switches off, install line]
  end
Loading

P12: interface and release guards

flowchart LR
  subgraph before
    CM[close_milestone] --> OK[closes]
  end
  subgraph after
    AP[api_item change facts] --> AB[milestone.api_breaks]
    AB -->|compatible version| E533[gsd/E533 refuses]
    TG[gsd-git tag v-version] --> RL[milestone.release]
    RL -->|packages / version / tag wrong| E535[gsd/E535 refuses]
  end
Loading

P13: gsd import

flowchart LR
  subgraph before
    PL[.planning/ legacy] -.no path.-> X[spec/gsd]
  end
  subgraph after
    PL2[.planning/**] --> IMP["@gsd/import (own blob)"]
    IMP --> PLAN[one edit plan, at most 2000 ops]
    PLAN -->|rule errors land, ADR 0392| SG[spec/gsd/]
    IMP --> REP[report: unmapped lines, owed verdicts, settings lines]
  end
Loading

P14: X2 close

flowchart LR
  subgraph before
    G[guest tests: cargo test, no report] --> X1["X2 SpecForge 9688/13031 (74.3%), print only"]
  end
  subgraph after
    G2[guests + @gsd workspace under nextest] --> JU[JUnit reports]
    JSR[JS test calls: node-test ids] --> JU
    CF[cfg-excluded: skipped; __guard_only: no id; fixtures excluded] --> X2
    JU --> X2["X2 floor: 13685/13685; taskboard 3/3, ledger 6/6, vault 3/3"]
    NC[negative control: ledger copy missing one case] -->|must fail| X2
  end
Loading

Security fixes

  • Import: a secret flag of any shape is never printed (8e6f650). Report text is escaped once, with format controls included. A record holding a control or bidi character is dropped.
  • Reads: a declared file read and a report glob refuse a hard link or symlink that leads out of the project (7a7e533, 69eb404, 5fc5274). text_max is bounded by one ceiling.
  • Recording: gsd/parity/record-reports.sh runs in digest-pinned containers with no volume. It refuses a dirty fixture and copies regular files only (b0f19e5), and is pinned by tests.
  • X2 denominator: the @rust/cargo exclude list cannot hide a crate whose tests run (d29be27).

Breaking changes (pre-release, no shims)

  • Facts: five report kind names are now reserved entity names: coverage, static_finding, dependency, vulnerability, api_item.
  • Protocol 2.3.0 (unreleased, no bump): gains FileRead.text_max, CodeDescriptor.facts and imports.
  • Guards: under gsd-strict and gsd-plus, gsd/E533 and gsd/E535 can refuse /gsd-complete-milestone.
  • JS item ids: JS test calls are now items with node-test test ids.
  • Settings: @rust/cargo has a new exclude setting. SpecForge's root specforge.json uses it for its fixture crates.
  • Dogfood: it now fails below 100% X2, and it refuses --only dogfood without tests, guests and gsd.
  • Parity twins: test(gsd)! 1f5a305 makes the twins keep their own committed settings.

Decisions

These are recorded in the round README and PROJECT.md.

  • Owner decisions:
    • interface and release are computed fields and guards, with no new kind (ADR 0390).
    • The third X2 fixture is the vault.
    • JS tests get test ids.
    • "Report all, stop miscounting."
    • X2 is a hard floor in dogfood.
    • The stale vault A/B line was fixed (267e859).
    • The first Linux CI dogfood run is deferred to this PR.
  • Taken in the run:
    • Every review finding was fixed, Info included.
    • Phases 13 and 14 each got a second re-vendor after their reviews.
    • The fixtures collect from recorded reports and never run the tools in the gate (ADR 0393 D9).
    • Milestone audit item T3 is closed by pinning all 39 @gsd/core errors as landing on an import (3cf28c0).

Verification

  • cargo gate full passed 23/23 at 4419062 (3597 s). dogfood.log shows:
    • negative control passed: dogfood::tests::x2_floor_fails_a_ledger_copy_missing_one_case;
    • X2 SpecForge: 13685/13685 (100.0%), with taskboard 3/3, ledger 6/6 and vault 3/3.
  • After that, only 3cf28c0 landed, and it is test-only. cargo gate full --only tests,gsd,links,clippy,rustfmt passed on it.
  • Verifiers at the tip: phase 10 5/5, phase 11 5/5, phase 12 5/5, phase 13 4/4, phase 14 4/4, all with fresh digests.
  • Milestone audit: requirements 20/20, integration 13/13, flows 5/5.
  • Blobs: they total 27,991,688 of TOTAL_BUDGET 28,000,000 B. @gsd/core is 5,759,902 of 5,800,000 B and @gsd/import is 1,543,970 B.

Merge danger

Door: two-way for the code. Data written under the new shapes is one-way (pre-release, no shims).

Blast radius: @code/core projects, the Rust and JS pack families, @gsd/core closes under strict profiles, and the gate's dogfood.

Check on this PR's first CI run:

  • The push-only Linux dogfood job (840 s budget, nested nextest) has never run. Every local X2 number comes from macOS, so a red job points at the budget or at a Linux-only cfg difference.
  • The bootstrap blob compare.
  • The CI budget re-measures (specs 2040 s, dogfood 840 s).

Known blemishes:

  • Some intermediate commits are not green on their own, because each was fixed later in its group: 32f1e25, 8e6f650, eeea7d1.
  • Blob headroom is 8,312 B, so the next guest growth re-measures TOTAL_BUDGET.

Open debt (v1.7 audit):

  • An imported project has no shipped milestone, so E533 and E535 do nothing on it.
  • JS test ids cover only the files node --test runs.
  • TestId::js does not escape name segments.
  • linux vs macOS cfg is undecided on a unix host.
  • The c8 transitive tree is not locked at record time.
  • Applying an import costs time quadratic in plan size.
  • Windows is unverified.

🤖 Generated with Claude Code

leaderiop and others added 30 commits November 22, 2026 17:38
The round's base audit (`cargo gate full --only audit`) was red: url 2.5.8 overflows the stack in
`Url::origin()` on nested `blob:` URLs, and 2.5.9 fixes it. Only the lockfile entry moves (with
form_urlencoded 1.2.3, which 2.5.9 requires); no manifest changes.

┌─ PROBLEM ────────────────────────────────────────────────────────────────────────────────────┐
│ Cargo.lock, extensions/checks/Cargo.lock, extensions/product/Cargo.lock: url 2.5.8           │
│ cargo audit --deny unsound --deny yanked: RUSTSEC-2026-0592, exit 1 on each                  │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ SOLUTION ───────────────────────────────────────────────────────────────────────────────────┐
│ cargo update -p url --precise 2.5.9 --manifest-path <each manifest>                          │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ BEFORE ─────────────────────────────┐   ┌─ AFTER ──────────────────────────────┐
│ url 2.5.8, form_urlencoded 1.2.2     │ ▶ │ url 2.5.9, form_urlencoded 1.2.3     │
│ audit: FAILED (3 lockfiles)          │   │ audit: ok                            │
└──────────────────────────────────────┘   └──────────────────────────────────────┘

The two extension lockfiles are inputs of the @specforge/checks and @specforge/product blobs, so
`builtins` reads them stale until the phase's one re-vendor (plan 10-08) rebuilds every blob.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…port saw

Owner decision D3 names X2 but nothing defined it. ADR 0388 defines it exactly, says the gate's
`dogfood` check prints it for SpecForge, taskboard and ledger with no floor until Phase 14, and
records in its context the decisions plans 10-02 to 10-07 build the five report readers on.

┌─ PROBLEM ────────────────────────────────────────────────────────────────────────────────────┐
│ D3 "items with a test_id / items with a test fact": no counted set, no output, no home       │
│ the readers' choices (kind names, ids, dedupe, SARIF level, severity, codes) were unwritten  │
│ ADR 0374 D5: dogfood judges requirements only                                                │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ SOLUTION ───────────────────────────────────────────────────────────────────────────────────┐
│ D1 m = items with a test_id, n = those whose test_id is a test fact's id, any status;        │
│    `X2 p: n/m (x.y%)`, `0/0 (no item has a test_id)`, missing ids sorted beneath             │
│ D2 a pure gate function `dogfood` prints; a failed collect is an error, the value never is   │
│ D3 SpecForge, taskboard (0/0: JS items have no test_id), ledger (a real denominator)         │
│ Context: static_finding (F1), reader -> facts (F2), ids and ~n dedupe (F4), level (F5),      │
│          CVSS v3.1 severity, collector errors, the `reports` pass and code/W104..W107        │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ BEFORE ─────────────────────────────┐   ┌─ AFTER ──────────────────────────────┐
│ docs/adr: 0387 last                  │ ▶ │ 0388 X2 (amends 0374 D5)             │
│ 0374: no amend line for D5           │   │ 0374: "D5 amended by ADR 0388"       │
└──────────────────────────────────────┘   └──────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
X2 had a definition (ADR 0388) and no computation. `gate/src/x2.rs` holds it as pure functions over
the export of a project's items and tests, tested on literal input; `dogfood` collects a scratch
copy of the ledger fixture over its recorded nextest report and logs `X2 ledger: n/m (p%)` with the
items it misses. A failed collect or export is the check's error and names the fixture and step;
the ratio itself never fails the check.

┌─ PROBLEM ────────────────────────────────────────────────────────────────────────────────────┐
│ gate: no function counts items with a test_id against test facts                             │
│ dogfood::run judges requirements only; no project's X2 is ever printed                       │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ SOLUTION ───────────────────────────────────────────────────────────────────────────────────┐
│ x2::read (export -> item/test_id pairs, test ids), x2::ratio, x2::lines; dogfood logs them    │
│ for each FIXTURES row, collected under <target>/gate/x2/<name> with its own specforge.json    │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ BEFORE ─────────────────────────────────┐   ┌─ AFTER ──────────────────────────────────────┐
│ dogfood::run                             │   │ dogfood::run                                 │
│  collect root ▶ export requirement       │ ▶ │  collect root ▶ export requirement ▶ verdict │
│  ▶ requirement_verdict ▶ Ok / Err        │   │  FIXTURES ▶ fixture_x2: copy, specforge.json,│
│                                          │   │   collect (rust-cargo, rust-source,          │
│                                          │   │   rust-test --no-run --report golden)        │
│                                          │   │   ▶ export item,test ▶ x2::read/ratio/lines  │
│                                          │   │   ▶ ctx.log; verdict's Err wins, else X2's   │
└──────────────────────────────────────────┘   └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ADR 0388 D3 names three projects. SpecForge's X2 is read from the dogfood tree the root collects
already filled; taskboard is one more fixture row (javascript-source, then node-test over its
recorded JUnit) and reads `0/0 (no item has a test_id)`, since JavaScript items carry none. The
lines come in the ADR's order, and the `dogfood` row says the check prints them.

┌─ PROBLEM ────────────────────────────────────────────────────────────────────────────────────┐
│ dogfood logged X2 for ledger only; the two projects D3 of the round names printed nothing    │
│ checks.rs: the dogfood row's proves/fix said nothing of X2                                   │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ SOLUTION ───────────────────────────────────────────────────────────────────────────────────┐
│ log_x2 (export item,test ▶ x2 lines) shared by the root tree and every FIXTURES row          │
└──────────────────────────────────────────────────────────────────────────────────────────────┘

┌─ BEFORE ─────────────────────────────────┐   ┌─ AFTER ──────────────────────────────────────┐
│ FIXTURES: [ledger]                       │ ▶ │ log_x2("SpecForge", <target>/gate/dogfood)   │
│ X2 ledger: n/m (p%)                      │   │ FIXTURES: [taskboard, ledger]                │
│ proves: "... fail none (ADR 0374 D5)"    │   │ X2 SpecForge / taskboard: 0/0 (...) / ledger │
│                                          │   │ proves: "... also prints X2 (ADR 0388)"      │
└──────────────────────────────────────────┘   └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every report reader of Phase 10 attributes a file and line to the innermost served item, names
its kind and scheme, and builds ids from untrusted report text. That work now lives once in
specforge-code-facts (ADR 0388, F2, F4), so the LCOV, SARIF, CycloneDX, OSV and API readers
stay small and agree.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ code-facts mints test, item and package facts, but has nothing that maps a report's     │
│ (file, line) onto served `item` places, nothing that names the five report kinds, and   │
│ no rule for placing report text in an id: a `/`, `#`, `~` or a newline would forge a    │
│ separator or a repeat suffix, and one id answered twice makes the host refuse the run.  │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ places.rs indexes served items by file and packages by path; report.rs holds the kinds, │
│ UNKNOWN, id_part (percent-encodes delimiters, whitespace, controls) and Repeats (~n).   │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐  ┌─ AFTER ─────────────────────────────────────┐
│ reader ──> ? (each format would write  │  │ Places::new(&input.facts)                   │
│            its own lookup and escape)  │  │   .innermost("src/lib.rs", 13) -> adds      │
│                                        │  │   .package_of / packages_of_dir / _named    │
│                                        │  │ STATIC_FINDING.scheme + ":" + id_part(rule) │
│                                        │  │ Repeats::default().id(base) -> x, x~2, x~3  │
└────────────────────────────────────────┘  └─────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Report-path normalisation belongs with the minters every reader links (F2), not in the JUnit
reader: `relative` and its six helpers move unchanged from code-junit to code-facts' paths.rs,
with their four tests. `file_uri_path` decodes a SARIF-style `file:` URI (or a relative
reference) to a path and leaves the in-project judgement to `relative`, so `%2E%2E` cannot
climb out. code-junit is the JUnit reader alone.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ junit::relative is the one report-path normaliser, but the LCOV, SARIF, CycloneDX, OSV  │
│ and API readers depend on code-facts, not on the JUnit reader; SARIF writes absolute    │
│ `file:///` URIs (percent-encoded, `/C:/…` on Windows) that nothing decodes.             │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ paths.rs holds joined, relative and file_uri_path; ids::unescape becomes pub(crate).    │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐  ┌─ AFTER ─────────────────────────────────────┐
│ node-test:                             │  │ node-test:                                  │
│   use code_junit::{cases, relative, ..}│  │   use code_facts::{relative, ..}            │
│ facts tests/mint.rs:                   │  │   use code_junit::{cases, Case}             │
│   use code_junit::{cases, relative}    │  │ facts tests/mint.rs: relative from crate    │
│ junit: cases, names, relative          │  │ junit: cases, names                         │
│ (no URI decoding)                      │  │ relative(&file_uri_path(uri)?, cwd)         │
└────────────────────────────────────────┘  └─────────────────────────────────────────────┘

Breaking: specforge_code_junit::relative is gone; use specforge_code_facts::relative.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new rlib, specforge-code-lcov, reads an LCOV tracefile into one CoverageFile per file
section, each SF path made project-relative (outside the project is an Err naming it).
code-facts mints the coverage facts: one per item the innermost holder of the report's
lines (cov:<item id>), one per file for what no item holds (cov:@<file>, no item field).
The reader depends on code-facts, never the reverse (ADR 0388 F2), so a reader edit
re-vendors no builtin.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────┐
│ No reader turned a coverage report into facts; nothing tied a covered line to the  │
│ item that holds it.                                                                │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────┐
│ lcov::read parses the text; code-facts::coverage_facts attributes each line,       │
│ branch and function start with Places::innermost and counts per item.              │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ extensions/code/{facts,junit}      │  │ lcov::read(text, cwd)                        │
│ no coverage model, no reader       │  │   -> Vec<CoverageFile>                       │
│                                    │  │ coverage_facts(&files, &served)              │
│ gate: 25 outside-workspace         │  │   -> cov:rust:demo::add {item, file,         │
│       manifests                    │  │      functions_*, lines_*, branches_*}       │
│                                    │  │   -> cov:@src%2Flib.rs {file, counts}        │
│                                    │  │ gate: 26 manifests (three @code libraries)   │
└────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@code/core 1.2.0 declares the collector-written kind coverage (scheme cov, its item field
drawing the edge covers), and a check pass of its own, reports, sent only the report kinds
so nothing is decoded when no report was collected (ADR 0353, ADR 0388). Its first code,
W104, names a coverage fact that cites no item. The new kinds live in kinds.rs and the pass
with its catalogue in reports.rs, so lib.rs stays far from the size cap.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────┐
│ No kind held a coverage fact, so a pack could not answer one; nothing reported an  │
│ entry whose lines lie in no collected item.                                        │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────┐
│ kinds::report_kinds declares coverage and covers; reports::reports raises W104 on  │
│ a coverage fact with no item; REFERENCES holds the coverage.item row.              │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ @code/core 1.1.0                   │  │ @code/core 1.2.0                             │
│ kinds: test test_run item package  │  │ kinds: ... + coverage (cov)                  │
│ REFERENCES: [Reference; 4]         │  │ REFERENCES: [Reference; 5] (+ covers)        │
│ passes: refs, proof                │  │ passes: refs, proof, reports                 │
│                                    │  │   Input::facts(&REPORT_KINDS)                │
│ codes: E101 W102 W401 I402         │  │ codes: E101 W102 W401 I402 W104              │
└────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The reader takes LCOV 2.2's function groups (FNL:<index>,<start>[,<end>] with one
FNA:<index>,<hits>,<name> per alias) beside the legacy FN/FNDA, so a geninfo 2.2 tracefile
mints the same coverage facts as its FN/FNDA twin. Two fixtures join llvm-cov's: c8's
lcovonly (relative SF, JavaScript items) and LCOV 2.2 (TN, VER, # comments, MCDC). A table
of bad inputs proves each is an Err naming its line or path, and a 100,000-line report
reads in linear time with a u64::MAX count kept exactly.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────┐
│ lcov::read knew only FN/FNDA: an LCOV 2.2 tracefile's functions were ignored, and  │
│ c8 output and hostile input had no test.                                           │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────┐
│ Section keeps each FNL group's start line; each FNA alias becomes a Function there │
│ (line 0 with no FNL), and three snapshots plus a bad-input table pin the reader.   │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ FNL:3,27,34   -> ignored           │  │ FNL:3,27,34   -> group 3 starts at line 27   │
│ FNA:3,3,name  -> ignored           │  │ FNA:3,3,name  -> Function { line: 27,        │
│                                    │  │                   name, hits: 3 }            │
│ fixtures: llvm-cov.info            │  │ fixtures: + c8.info, lcov2.info (js items)   │
│ snapshots: 1                       │  │ snapshots: 3; bad-input table: 14 rows       │
└────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new rlib, specforge-code-api, reads a `cargo public-api` text snapshot
into one ApiEntry per public line; code-facts mints one api_item fact per
entry (api_facts), its id built by ItemId::rust so a trait-impl member
carries `<Type as Trait>`, citing the one served item its path names.

┌─ PROBLEM ────────────────────────────────────────────────────────────┐
│ READ-05: no reader turns an API snapshot into facts, and code-facts  │
│ has no api_item minter, so Phase 12's E533 has nothing to compare.   │
└──────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ───────────────────────────────────────────────────────────┐
│ read_rust_text (reader crate) -> ApiEntry -> api_facts (code-facts). │
└──────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────────────────────────────────┐
│ extensions/code/{core,facts,junit,lcov}; no api_item minted anywhere │
└──────────────────────────────────────────────────────────────────────┘
┌─ AFTER ──────────────────────────────────────────────────────────────┐
│ extensions/code/api  read_rust_text(text) -> Vec<ApiEntry>           │
│        │                                                             │
│        v                                                             │
│ code-facts  api_facts(&entries, &served) -> Vec<Fact>                │
│   api:rust:example_api::<Struct as Debug>::fmt  item -> rust:...     │
│   api:rust:example_api::enums::E::V  (variant: no item)              │
│ ApiKind::NAMES = ItemKind::NAMES + variant, reexport, extern_crate,  │
│ other; repeats merge (same signature) or take ~2 (another)           │
│ gate: 27 manifests outside the workspace (four @code libraries)      │
└──────────────────────────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@code/core declares the kind api_item (scheme api) with the reference
item -> item (edge api_of), the vocabulary of ApiKind::NAMES and the
fields path, visibility, signature and tag. The reports pass is sent it
and raises W104 on an entry whose kind an item can have and that cites
no item; a variant, re-export, extern crate, other or crate root raises
nothing.

┌─ PROBLEM ────────────────────────────────────────────────────────────┐
│ api_facts mints api_item facts no extension declares, so the host    │
│ would refuse them, and an unmapped entry would pass silently.        │
└──────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ───────────────────────────────────────────────────────────┐
│ Declare the kind beside coverage and extend W104 to it.              │
└──────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────────────────────────────────┐
│ REFERENCES [5]       REPORT_KINDS [coverage]    W104: coverage only  │
└──────────────────────────────────────────────────────────────────────┘
┌─ AFTER ──────────────────────────────────────────────────────────────┐
│ REFERENCES [6] + api_item.item -> item (api_of, together: false)     │
│ REPORT_KINDS [coverage, api_item]                                    │
│ kinds::report_kinds: c.kind("api_item") + c.edge("api_of")           │
│ reports: W104 when kind is in ItemKind::NAMES and no item is cited   │
└──────────────────────────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
read_js_model reads an api-extractor .api.json doc model: every member
below each EntryPoint of the root Package, at any depth, becomes an
ApiEntry. api_facts gives it the id api:js:<package>::<name path>, with
no source file, and cites the one served js item of that package with
that name path. An overload takes ~2. Bad input fails whole: text that
is no JSON, nesting past serde_json's limit, a root that is no Package,
and a member with no kind or name, named by its JSON path.

┌─ PROBLEM ────────────────────────────────────────────────────────────┐
│ Only Rust snapshots read; READ-05 asks for JavaScript too, and the   │
│ Rust reader's bad-line and unknown-keyword cases had no test.        │
└──────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ───────────────────────────────────────────────────────────┐
│ A second explicit entry point, read_js_model; no format sniffing.    │
└──────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────────────────────────────────┐
│ specforge-code-api: read_rust_text                                   │
└──────────────────────────────────────────────────────────────────────┘
┌─ AFTER ──────────────────────────────────────────────────────────────┐
│ specforge-code-api: read_rust_text, read_js_model                    │
│   Package > EntryPoint > Class Widget > Method render                │
│     -> api:js:%40demo%2Fwidget::Widget.render                        │
│        item js:@demo/widget/src/widget.ts::Widget.render             │
│   Function parse (twice) -> ::parse, ::parse~2                       │
│   members[0].members[3]: a member has no kind  (Err)                 │
└──────────────────────────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new rlib, specforge-code-sarif, reads a SARIF 2.1.0 log into one SarifResult per result,
and code-facts mints a static_finding fact per result (sarif:<tool>/<rule>#<file>:<line>,
~2 on a repeat), citing the innermost served item holding its line, else the package
holding its file. The level is what the log states or unknown (F5); a clippy-shaped fixture
and its accepted snapshot show both citations.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ No reader turned a lint tool's SARIF report into facts: READ-02 had no crate, no model │
│ and no minter, and static_finding (STATIC_FINDING, 10-02) was a name with no facts.    │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ specforge_code_sarif::read parses the log; specforge_code_facts::finding_facts mints. │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ────────────────────────────────┐
│ extensions/code/{api,lcov} (four libraries)   │ │ extensions/code/sarif: read(text, cwd) │
│ STATIC_FINDING: kind and scheme only          │ │   -> Result<Vec<SarifResult>, String>  │
│ gate: manifests, 27                           │ │ facts: Level, SarifResult,             │
│                                               │ │   finding_facts(results, served)       │
│                                               │ │ gate: manifests, 28 (five, one, one)   │
└───────────────────────────────────────────────┘ └────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… rule

@code/core declares the kind static_finding (scheme sarif; tool, rule, level, message, file,
line, item, package) with the edges found_in and found_in_package, two REFERENCES rows and a
third REPORT_KINDS entry. The reports pass raises W104 for a finding citing neither item nor
package, and the new code W105 for a finding whose rule or level reads unknown, naming which.
The keyword is static_finding, never finding, which @gsd/core declares (F1, E026).

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ finding_facts minted static_finding facts no kind declared, and nothing reported a    │
│ SARIF result whose rule or level its report states nowhere (ROADMAP criterion 2).     │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ kinds::report_kinds declares the kind; reports::reports adds W104/W105 per finding.   │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ REFERENCES: [Reference; 6]                    │ │ REFERENCES: [Reference; 8]              │
│ REPORT_KINDS: [coverage, api_item]            │ │ REPORT_KINDS: [.., static_finding]      │
│ reports: filter(no item).filter_map(W104)     │ │ reports: flat_map(unmapped W104,        │
│ codes: E101 W102 W401 I402 W104               │ │   unknown W105); codes: .. W104 W105    │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two more hand-written fixtures pin the reader's edges. An ESLint log reads its absolute
percent-encoded file:/// URIs and a file given by artifact index alone, a rule with no
metadata and a suppressed result, each citing its js item. A rule-less log keeps what it
cannot map as unknown (a result naming no rule, a rule with no level) and walks the level
chain (kind pass reads none, a rule default note). Two results at one line take ~2. A
14-row table shows each bad log fails whole, naming its value or JSON path.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ Only the clippy shape was read: ESLint's file:/// URIs and artifact index, the level  │
│ chain of SARIF §3.27.10 and the refusals (version, runs, results, URIs outside the    │
│ project, bad indexes) had no test.                                                    │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ eslint.sarif and rule-less.sarif with snapshots, a URI test and an Err table; read    │
│ needed no change.                                                                     │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ fixtures: clippy.sarif, items.json (rust)     │ │ + eslint.sarif, rule-less.sarif,        │
│ snapshots: clippy                             │ │   js items; snapshots: clippy, eslint,  │
│ tests: 2                                      │ │   rule_less; tests: 7 (Err table: 14)   │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new rlib, specforge-code-cyclonedx, reads a CycloneDX 1.4-1.6 JSON BOM into a Bom (root,
components flattened depth first, the root's dependsOn refs), and code-facts mints one
dependency fact per component, dep:<package id>/<purl>, citing the one served package the
BOM's root purl names. direct comes from the BOM's own graph and is absent, never false,
when it states none; a repeated purl merges into one fact of the widest scope (F4).

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ No reader turned an SBOM into facts: READ-03 had no crate, no model and no minter, and │
│ DEPENDENCY (dependency/dep, 10-02) was a name with no facts.                           │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ specforge_code_cyclonedx::read parses the BOM; code-facts' dependency_facts mints.    │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ extensions/code/{api,lcov,sarif}              │ │ extensions/code/cyclonedx: read(text)   │
│ DEPENDENCY: kind and scheme only              │ │   -> Result<Bom, String>                │
│ gate: manifests, 28 (five, one, one)          │ │ facts: Scope, Component, Bom,           │
│                                               │ │   dependency_facts(boms, served)        │
│                                               │ │   -> Result<Vec<Fact>, String>          │
│                                               │ │ gate: manifests, 29 (six, one, one)     │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@code/core declares the dependency kind the CycloneDX reader's facts are minted as (scheme
dep; package, purl, name, version, scope from Scope::NAMES, direct as a bool), the edge
dependency_of to package, and the reports pass raises code/W106 for a dependency whose BOM
component has no purl: kept, named by name and version, but matchable by no other report.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ dependency facts (11e5d40) had no declared kind: the host would refuse them, and the │
│ reports pass had no word for a component no OSV scan or other BOM can be matched to.   │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ Declare dependency + dependency_of; chain purl_less (W106) after unknown (W105).      │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ REFERENCES: [Reference; 8]                    │ │ REFERENCES: [Reference; 9]              │
│ REPORT_KINDS: [coverage, api_item,            │ │ REPORT_KINDS: [... , dependency]        │
│   static_finding]                             │ │ kind dependency, edge dependency_of     │
│ reports: unmapped -> unknown                  │ │ reports: unmapped -> unknown            │
│ codes: E101 W102 W401 I402 W104 W105          │ │   -> purl_less (W106)                   │
│                                               │ │ codes: ... W104 W105 W106               │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two more hand-written fixtures and a table of bad BOMs pin what the Task 1 reader already
does: a cyclonedx-npm BOM (1.6, scoped root, an optional component, nesting flattened, a
purl listed twice merged at the widest scope) and a 1.4 BOM with no dependency graph and a
purl-less component (no direct field on any fact, a dep:<package>/@... id). Ten bad BOMs are
each an error naming the value or key, minting nothing. No reader code changed.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ Only a cargo-shaped 1.5 BOM was tested: npm scopes, nesting, repeats, the 1.4/1.6 gate, │
│ an unknown graph and hostile input were untested claims of read and dependency_facts.  │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ npm and no-purl fixtures with accepted snapshots, and a 10-row error table.           │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ fixtures: cargo.cdx.json, packages.json       │ │ + npm.cdx.json, no-purl.cdx.json        │
│ snapshots: cargo                              │ │ snapshots: cargo, npm, no_purl          │
│ errors: untested                              │ │ errors: 1.3, 2.0, SPDX, no root, root   │
│                                               │ │   elsewhere, root twice, scope          │
│                                               │ │   mandatory, no JSON, no name,          │
│                                               │ │   components no array                   │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new rlib, specforge-code-osv, reads an osv-scanner JSON report into an OsvReport (each
scanned lockfile made project-relative, each package's OSV records), and code-facts mints
one vulnerability fact per OSV id per project package, vuln:<package id>/<OSV id>, citing
the served packages of the lockfile's ecosystem at its directory, else under it. Severity
is the record's own label (GHSA MODERATE reads medium), else unknown. One id met twice
merges into one fact listing every purl and version (F4).

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ No reader turned a vulnerability scan into facts: READ-04 had no crate, no model and   │
│ no minter, and VULNERABILITY (vulnerability/vuln, 10-02) was a name with no facts.     │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ specforge_code_osv::read parses the scan; code-facts' vulnerability_facts mints.      │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ extensions/code/{api,cyclonedx,lcov,sarif}    │ │ extensions/code/osv: read(text, cwd)    │
│ VULNERABILITY: kind and scheme only           │ │   -> Result<OsvReport, String>          │
│ gate: manifests, 29 (six, one, one)           │ │ facts: OsvReport, OsvSource, OsvPackage,│
│                                               │ │   OsvRecord, OsvScore, Severity,        │
│                                               │ │   vulnerability_facts(report, served)   │
│                                               │ │   -> Result<Vec<Fact>, String>          │
│                                               │ │ gate: manifests, 30 (seven, one, one)   │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A record with no severity label now reads the rating of its highest CVSS v3 base score,
computed by the v3.1 formula with the integer Roundup of Appendix A, so the score is an
integer number of tenths and no float boundary flips a rating. A v4-only, v2-only or
malformed-vector record stays unknown, never a guess. The osv reader is tested on a
virtual workspace with a nested npm lockfile and on a 10-row table of hostile scans.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ Severity::of read only database_specific.severity: every RustSec record and every     │
│ unlabelled GHSA record read unknown although its CVSS v3 vector states a score.        │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ facts/src/cvss.rs computes the base score in tenths; Severity::of rates the highest. │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ Severity::of(record)                          │ │ Severity::of(record)                    │
│   label -> severity                           │ │   label -> severity                     │
│   else Unknown                                │ │   else max cvss::base_score(CVSS_V3)    │
│                                               │ │        -> cvss::rating                  │
│                                               │ │   else Unknown                          │
│ osv tests: one scan                           │ │ osv tests: + workspace.json snapshot,   │
│                                               │ │   + 10 hostile scans, each named        │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…severity

@code/core declares the vulnerability kind the OSV reader's facts are minted as: scheme
vuln, package -> package by the edge affects, osv_id, aliases, summary, purl and version,
and a severity vocabulary that is Severity::NAMES. The reports pass is now sent the five
report kinds and raises W107 once per vulnerability whose severity is unknown, naming the
fact and its OSV id. The extension description and crate doc name the kind and the code.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ vulnerability_facts minted a kind no extension declared: a pack's vulnerability facts │
│ would be refused, and an unrated record (v4-only, v2-only, malformed) went unflagged. │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ kinds.rs declares vulnerability and affects; reports.rs chains unrated (W107).       │
└───────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────────┐ ┌─ AFTER ─────────────────────────────────┐
│ REFERENCES: [Reference; 9]                    │ │ REFERENCES: [Reference; 10]             │
│ REPORT_KINDS: [&str; 4]                       │ │ REPORT_KINDS: [&str; 5] + vulnerability │
│ reports: unmapped, unknown, purl_less         │ │ reports: ... purl_less, unrated (W107)  │
│ codes: E101 W102 W401 I402 W104 W105 W106     │ │ codes: ... W106 W107                    │
│ edges: ... found_in_package, dependency_of    │ │ edges: ... dependency_of, affects       │
└───────────────────────────────────────────────┘ └─────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… fed

The one re-vendor of Phase 10, built on linux/amd64 from a plain clone. It rebuilds the eight stale
blobs: @code/core with the five report kinds, the six edges, code/W104 to code/W107 and the
`reports` pass; the five other code-facts linkers; @specforge/checks and @specforge/product, whose
lockfiles the url 2.5.9 bump changed (the product blob comes out byte-identical, only its
inputs.json moves). The declaration snapshots, the builtin vocabulary and the registry snapshots
follow. A pin shows that a report reader feeds no builtin, and the migrate test pins the one error
the frozen corpus now has: its `term coverage` collides with the new `coverage` kind.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────────┐
│ builtins check RED since 10-01: 8 blobs stale                                                │
│   code/core, js/node-test, js/source, rust/cargo, rust/source, rust/test  (code-facts edits) │
│   checks, product                                                (url 2.5.9 lockfile bump)   │
│ the embedded @code/core is 1.1.0: no report kinds, no reports pass, no W104..W107            │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────────┐
│ docker rust:1.99.1 (linux/amd64) ▶ xtask revendor ▶ copy back exactly the changed paths      │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────┐   ┌─ AFTER ────────────────────────────────────────┐
│ code_core.wasm      687,356 B (1.1.0) │   │ code_core.wasm      705,123 B (1.2.0)          │
│ checks.wasm       2,452,015 B         │   │ checks.wasm       2,451,711 B (cap 2,500,000)  │
│ vocabulary: no report kinds           │   │ + coverage api_item static_finding             │
│                                       │   │   dependency vulnerability (@code/core)        │
│ all_builtins_gsd: no static_finding   │   │ static_finding beside @gsd/core, no E026       │
│ old-spec migrate: no error            │   │ old-spec migrate: one E013 (term coverage)     │
└───────────────────────────────────────┘   └────────────────────────────────────────────────┘

Breaking: a project loading @code/core can no longer name an entity `coverage`, `api_item`,
`static_finding`, `dependency` or `vulnerability` (E013).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With the re-vendored @code/core in process, one stored fact of each report kind in its
unmappable shape gets exactly W104 on the coverage, the api_item and the finding, W105 on the
finding, W106 on the purl-less dependency and W107 on the unrated vulnerability, each naming its
fact. The same kinds mapped, and a project with no report fact, get none. `specforge explain`
gives each of the four codes with owner @code/core and level warning, pinned by a snapshot.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────────┐
│ the reports pass was tested only inside the guest crate (cargo test), never through the      │
│ shipped blob, the kernel's pass dispatch and the CLI's explain                               │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────────┐
│ compile a project over component_runtime() with stored report facts; explain each code       │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────┐   ┌─ AFTER ────────────────────────────────────────┐
│ builtins/code_core.rs: refs, proof    │   │ + the_reports_pass_warns_once_per_unmappable_  │
│                                       │   │     report_fact (6 findings, exact)            │
│                                       │   │ + mapped_report_facts_get_no_report_warning    │
│                                       │   │ + a_project_with_no_report_facts_gets_no_...   │
│ explain_declared.rs: @sdk/greet only  │   │ + explain code/W104..W107 (json + snapshot)    │
└───────────────────────────────────────┘   └────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The docs now follow the declarations the re-vendor pinned. The inventory gives @code/core 9 kinds
and 11 edges, with the five report kinds and their fields and edges, their ids, the four codes and
the five reader libraries. A new guide says per format what the reader accepts, mints, cites and
refuses, what stays unmapped, the severity order with the CVSS v3 rule, and the X2 line the gate
prints. ARCHITECTURE, CONTEXT (the readers, and an X2 entry), the docs index and the re-vendor
guide (a reader edit re-vendors nothing) follow.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────────┐
│ inventory row: @code/core 4 kinds, 5 edges; no report kinds, ids or W104..W107 anywhere      │
│ no guide to the report readers; CONTEXT has no X2; revendor.md lists only four libraries     │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────────┐
│ write the shipped declarations into the inventory, a guide and the glossary                  │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────┐   ┌─ AFTER ────────────────────────────────────────┐
│ | `@code/core` | 4 (...) | 5 |         │   │ | `@code/core` | 9 (...) | 11 |                │
│ kinds: test test_run item package     │   │ + coverage api_item static_finding             │
│                                       │   │   dependency vulnerability, their ids          │
│ codes: E101 W102 W401 I402            │   │ + code/W104 .. code/W107                       │
│ docs/guides: no report guide          │   │ + docs/guides/code-report-facts.md             │
└───────────────────────────────────────┘   └────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review WR-03. `unescape` read a pair with `u8::from_str_radix`, which takes a sign, so `%+f` decoded to
0x0F; and one escape run that was no UTF-8 made it return the whole text undecoded, so a stray `%FF`
left every `%2e` and `%20` of a SARIF uri literal. It now decodes `%` and two ASCII hex digits only,
and keeps an invalid run spelled as written while the rest decodes. It moves from ids.rs to report.rs,
next to `id_part`, its encoder.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ paths::file_uri_path ─► ids::unescape                                                  │
│   "%+f"              ─► u8::from_str_radix("+f", 16) = 0x0F  (no percent-encoding)     │
│   "%ff/%2e%2e/a%20b" ─► from_utf8 fails ─► whole text returned, nothing decoded        │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ Decode `%` + two ASCII hex digits; per escape run, keep invalid UTF-8 bytes as written. │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ────────────────────────────────────┐
│ ids::unescape                          │   │ report::unescape (ids, paths import it)    │
│   "src/a%+fb.rs"     → "src/a\u{f}b.rs"│   │   "src/a%+fb.rs"     → "src/a%+fb.rs"      │
│   "%ff/%2e%2e/a%20b" → unchanged       │   │   "%ff/%2e%2e/a%20b" → "%ff/../a b"        │
│   "%C3%A9%C3/x"      → unchanged       │   │   "%C3%A9%C3/x"      → "é%C3/x"            │
└────────────────────────────────────────┘   └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review WR-04 (and WR-01's diagnostics half). Only the LCOV reader passed report text through its
private `shown` (80 characters, control characters escaped); a SARIF uri, an OSV source path or
type, an ecosystem, a package name, a lockfile, a BOM root's purl or name, and the JSON values
CycloneDX and SARIF refuse went into the error verbatim and unbounded, and the `reports` pass put a
fact's path, file, name and OSV id into W104/W106/W107 as written. `shown` moves to code-facts
beside `id_part`, `shown_json` quotes a refused JSON value the same way, and every reader, the two
minters and the `reports` pass use them.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ sarif::place_of        "the uri `{uri}` …"           ─┐                                 │
│ osv::read              "'{kind}' of '{path}' …"       │  ESC ] 0 ; … BEL, or 1 MB of     │
│ vulnerability_facts    "'{other}' of '{name}' …"      ├─ text, reaches the terminal and   │
│ dependency::project_…  "'{purl}' … '{root.name}'"     │  the collect log as written       │
│ core::reports W104-107 "`{path}`", "`{name}`", …     ─┘                                 │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ One exported `shown` / `shown_json` in code-facts, used for every untrusted value.      │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ────────────────────────────────────┐
│ lcov: private fn shown                 │   │ code-facts: pub fn shown, pub fn shown_json│
│ sarif/osv/cyclonedx: raw `{value}`     │   │ every reader: shown(..) / shown_json(..)   │
│ facts minters: raw `{name}`, `{purl}`  │   │ minters: shown(..)                         │
│ reports: field("path") as written      │   │ reports: shown(field("path")), …           │
└────────────────────────────────────────┘   └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review WR-01 and IN-01. A Rust api_item id was `ItemId::rust` of the snapshot's text, unencoded, so
a path `c::a~2` took the id `api:rust:c::a~2`, the very id `Repeats` gave the second signature of
`c::a`, and the second fact overwrote the first in silence; an ESC in a segment reached W104 as
written. A JavaScript name's own `.` was not encoded either, so `"a.b"` and `[a, b]` met as one id.
Each Rust part now goes through `id_part` (a segment keeping the plain space of `<S as Tr>`), the
lookup of the served item still uses the parts as written, each JavaScript name encodes `.` as
`%2E`, and a second insert of one id is a debug assertion.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ api::rust  base = "api:" + ItemId::rust(container, module, owner, name)  (raw text)    │
│   "c::a~2"   → api:rust:c::a~2  ┐                                                       │
│   "c::a(x)"  → api:rust:c::a    ├─ facts.insert(id) overwrites the first: 3 entries,   │
│   "c::a(y)"  → api:rust:c::a~2  ┘  2 facts                                              │
│ api::js    names.join(".") with "a.b" unencoded → [a.b] == [a, b]                       │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ Encode each id part (Rust keeps a plain space, JS encodes `.`); look items up unencoded.│
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ────────────────────────────────────┐
│ api:rust:c::a~2      (forged suffix)   │   │ api:rust:c::a%7E2                          │
│ api:rust:c::b<ESC>[31m                 │   │ api:rust:c::b%1B[31m                       │
│ api:rust:c:x         (crate root)      │   │ api:rust:c%3Ax                             │
│ api:js:…::a.b        for "a.b"         │   │ api:js:…::a%2Eb                            │
│ facts.insert(id, fact)                 │   │ debug_assert!(insert(..).is_none())        │
└────────────────────────────────────────┘   └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review WR-02. `named` kept only the first function of a name, so with `FN:3,new`, `FN:10,new`,
`FNDA:0,new`, `FNDA:5,new` the function at line 3 took both counts (5) and the one at line 10 none,
and `coverage_facts` gave two items the wrong `functions_hit`. FNDA carries no line, so a name's
records now pair by rank: the n-th `FN` and the n-th `FNDA` of one name are one function's, either
order; an FNDA beyond the name's FNs stays at line 0, which no item holds.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ Section::named: HashMap<name, first index>                                             │
│   FN:3,new  FN:10,new  FNDA:0,new  FNDA:5,new                                          │
│   └─ every FNDA:…,new ─► functions[first new] ─► (3,new,5) (10,new,0)                  │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ Per name, a list of its functions and a rank per record kind: nth FN ⇔ nth FNDA.        │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ────────────────────────────────────┐
│ named: HashMap<String, usize>          │   │ named: HashMap<String, Named {             │
│ FNDA → named[name] (the first)         │   │   functions, fns, fndas }>                 │
│ FN   → fills a line-0 first, else push │   │ FN / FNDA → Section::pair(name, record)    │
│ (3,new,5) (10,new,0)                   │   │ (3,new,0) (10,new,5)                       │
└────────────────────────────────────────┘   └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review IN-04. `relative` received the raw `SF` value, so a trailing space or a stray tab or `\r`
made a file no item holds (every line in `cov:@<file>`, a W104 each), and an empty `SF:` was
reported as lying outside the project. The value is trimmed first, and an empty one is its own
error, "SF names no file".

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ read: key == "SF" ─► relative(value, cwd)                                              │
│   "SF:src/a.rs "  ─► "src/a.rs "  (no item holds it)                                   │
│   "SF:"           ─► None ─► "the file `` lies outside the project"                    │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ Trim the SF value; an empty one is "line N: SF names no file".                          │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ────────────────────────────────────┐
│ relative(value, cwd)                   │   │ let value = value.trim();                  │
│                                        │   │ empty → Err("line N: SF names no file")    │
│                                        │   │ relative(value, cwd)                       │
└────────────────────────────────────────┘   └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review WR-05. `vulnerability_facts` returned `Err` on the first package of an ecosystem other than
crates.io or npm, and on the first lockfile no collected package of its type holds, so one
`requirements.txt` beside a `Cargo.lock` threw away every valid cargo and npm finding. Such a
package is now skipped and named, with its version, lockfile, record count and reason, in
`Vulnerabilities::skipped`; the other packages still mint their facts. A package-less fact the
`reports` pass warns about was weighed and not taken: it needs a new id form and a W104 that covers
vulnerabilities, which would change @code/core's kind and code declarations.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────┐
│ vulnerability_facts(report, served) -> Result<Vec<Fact>, String>                       │
│   Cargo.lock        crates.io smallvec  ─► fact ┐                                       │
│   requirements.txt  PyPI      django    ─► Err ─┴─► the cargo fact is lost too          │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────┐
│ Mint what can be placed; name each package that cannot in `skipped`.                    │
└────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ────────────────────────────────────┐
│ -> Result<Vec<Fact>, String>           │   │ -> Vulnerabilities { facts, skipped }      │
│ other ecosystem   → return Err         │   │ other ecosystem   → skipped.push(..)       │
│ no package holds  → return Err         │   │ no package holds  → skipped.push(..)       │
│                                        │   │ 'django' 4.0 in 'requirements.txt'         │
│                                        │   │ (1 record) is skipped: the ecosystem …     │
└────────────────────────────────────────┘   └────────────────────────────────────────────┘

Breaking: `vulnerability_facts` returns `Vulnerabilities` instead of `Result<Vec<Fact>, String>`
(no builtin links it yet; Phase 11's packs call it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leaderiop and others added 28 commits November 25, 2026 14:27
85a7c03 moved vault's `phase 02` two lines up and updated only the vault tree pin, so the A/B
preflight refused on one stale baseline line. The owner approved this single change (14-CONTEXT,
2026-11-25), the only exception to D-02; nothing else under evaluation/gsd-ab/ moves.

┌─ PROBLEM ────────────────────────────────────────────────────────────────────────────────────┐
│ seed.py preflight: vault: - gsd/W103 spec/v1.0.spec:17 / + gsd/W103 spec/v1.0.spec:15        │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ───────────────────────────────────────────────────────────────────────────────────┐
│ tasks.json line 92 names the line the diagnostic is raised on.                               │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ "gsd/W103 spec/v1.0.spec:17"             │  │ "gsd/W103 spec/v1.0.spec:15"                 │
└──────────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The negative control called `x2::floor` itself, so the line in `dogfood::run` that turns every project's
X2 into the check's error was never run by a test: a print-only regression there kept the control green.
The aggregation is now the pure `judge_x2`, which `run` calls and the control asserts through, together
with `outcome`; a literal test pins that one failing project among passing ones fails the whole.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ dogfood::run    once(SpecForge).chain(FIXTURES).filter_map(floor).collect() -> join  (untested) │
│ control         fixture_x2(..) -> x2::floor("ledger", ..)        (skips run's judging path)     │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ One pure judge_x2 decides X2's verdict; run and the control both go through it and outcome.     │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ run:     inline filter_map + join      │   │ run:     outcome(failed, lines, judge_x2(projects))│
│ control: x2::floor("ledger", &x2)      │   │ control: outcome(false, &[], judge_x2([ledger]))   │
│ tests:   none on the aggregation       │   │ tests:   judge_x2 on literal pass/fail/err/0-of-0  │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The X2 floor is a ratio: a fixture whose extractor stopped minting most test ids still read `n/n (100%)`
and passed, so a partial collapse of taskboard's or vault's census was invisible. Each fixture row now
pins how many of its items carry a test id (taskboard 3, ledger 6, vault 3: frozen A/B trees), and
`census` fails a fixture whose count differs, naming both counts. SpecForge is not pinned: its count
moves with every test written.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ x2::floor passes any n/n with n >= 1: taskboard minting 1 of its 3 test ids reads 1/1 (100.0%) │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ Fixture { tests } pins each fixture's census; fixture_x2 checks it after logging its X2 lines.  │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ fixture_x2 -> log_x2(..)               │   │ fixture_x2 -> log_x2(..)                          │
│                                        │   │           .and_then(|x2| census(name, x2, tests)) │
│ Fixture { name, dir, extensions,       │   │ Fixture { .., collects, tests: 3 | 6 | 3 }        │
│           collects }                   │   │                                                   │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The stale-report purge ran only without `--only`, and `report_sets` checks presence, not age: `cargo gate
full --only tests,dogfood` reused whatever guest and gsd reports an earlier run (or another tree) left,
and `--only dogfood`, which the negative control's own message recommended, reused all three. Now a run
that runs dogfood with tests, guests and gsd empties the report dir first, a local run that runs dogfood
without all three is refused before any check starts, naming the missing checks and the command, and CI's
dogfood job keeps judging its shards' artifacts, fresh by construction. Every message that names the
command now names one that works.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ run.rs   purge only when only.is_none()                                                         │
│ dogfood  report_sets: present, of any age    control panic: "cargo gate full --only dogfood"    │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ purges_reports decides from the run's selections: purge with every reporter, else refuse (ci ok).│
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ full --only dogfood   stale reports    │   │ full --only dogfood   refused, names the command  │
│ full --only tests,    stale guests/gsd │   │ full --only tests,    refused (guests, gsd)       │
│   dogfood                              │   │   dogfood                                         │
│ full --only tests,guests,gsd,dogfood   │   │ same                  report dir emptied first    │
│                       no purge         │   │ ci --only dogfood     unchanged (artifacts)       │
│ after: &["tests","guests","gsd"]       │   │ after: &dogfood::REPORTERS                        │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Breaking: `cargo gate full --only <list>` naming dogfood without tests, guests and gsd now refuses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The guests check wrote the nextest store as a TOML literal string, which cannot hold an apostrophe, so a
checkout under `/Users/o'neil/` failed the whole check. The store is now a basic string with `\` and `"`
escaped, which holds a Windows path and an apostrophe alike; only a control character is refused.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ guests::config   dir = '{store}'   refuses any store holding ', \n or \r                         │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ Write the store as an escaped TOML basic string and refuse control characters only.            │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ dir = '/Users/o'neil/r'   -> refused   │   │ dir = "/Users/o'neil/r"                           │
│ dir = 'C:\r\target'                    │   │ dir = "C:\\r\\target"                             │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A guest's slug is its directory under `extensions/` with each `/` a `-`, which is not injective:
`extensions/cargo-test/` exists, and a future `extensions/cargo/test/` would slug alike. The second run
would overwrite the first's nextest config and JUnit report, and X2 would then fail on thousands of
confusing missing ids. The guests check now pairs each manifest with its slug up front and refuses a
duplicate, naming both manifests, before any guest runs.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ guests::run   slug(manifest) per guest: cargo-test/ and cargo/test/ both write cargo-test/     │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ slugged(manifests) pairs each with its slug and refuses a shared one before the first run.     │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ for manifest in guests_of(repo) {      │   │ for (manifest, slug) in                           │
│     let slug = slug(&manifest);        │   │         slugged(guests_of(repo))? {               │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Guests moved from `cargo test` to `cargo nextest run`, which runs no doctest, and the `doctests` check
covers root members only: a Rust doc example added to one of the ten rlib guest libraries would go
untested unseen. The guests check now runs `cargo test --doc` for a guest whose sources hold a runnable
doctest, found as the `doctests` check finds one; today none does, so the run costs nothing.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ guests::run      cargo nextest run per guest   (no doctests)                                   │
│ steps::doctests  root members only             (guests outside the workspace)                  │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ A guest with a runnable doctest also runs cargo test --doc, on the guests' target directory.   │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ nextest run -> clippy wasm, native     │   │ nextest run                                       │
│                                        │   │ -> cargo test --doc  (member_has_doctest only)    │
│                                        │   │ -> clippy wasm, native                            │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`@rust/test`'s cfg predicate assumes a unix host (ADR 0393 D5). On Windows the `#[cfg(unix)]` tests are
compiled out and never reported as skipped, so dogfood failed on a list of missing ids that looked like
real coverage holes. It now refuses up front on a non-unix host and says why.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ windows: dogfood -> X2 SpecForge: n/m, missing <every cfg(unix) test>   (reads as a gap)       │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ dogfood::run refuses first on a non-unix host, naming the assumption and ADR 0393 D5.          │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ windows: full run, then a missing-id   │   │ windows: "dogfood's X2 floor assumes a unix host  │
│          list                          │   │          (ADR 0393 D5): run it on Linux or macOS" │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`.config/nextest-guests.toml` copies the root's `default`, `ci` and `gate` profile bodies, kept in step
by a comment only: the test checked just that `[profile.gate]` and `[profile.ci]` exist, so a retry or
slow-timeout change in the root left the guests behind unseen. A test now compares the three bodies line
for line (blank and comment lines aside; the root's JUnit and override tables are their own tables).

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ .config/nextest.toml  [profile.ci] retries = 1  ->  edited                                     │
│ nextest-guests.toml   [profile.ci] retries = 1  ->  unchanged, no test notices                 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ the_guests_profiles_are_the_roots compares each of the three profile bodies between the files. │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ "Keep the bodies in step" (a comment)  │   │ profile_body(guests, p) == profile_body(root, p)  │
│                                        │   │   for p in default, ci, gate                      │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rts/

The script said it records the fixture's tracked files, but its tar listing sends untracked files and
working-tree edits too, so a recording from a dirty fixture committed reports the committed tree cannot
reproduce. It now refuses a fixture holding an uncommitted or untracked file, after checking every name
and before any container runs. Each fixture's `reports/` is replaced as a whole, so a report no longer
produced goes. The header and the README now say that only c8 itself is pinned: npm resolves its
dependency tree at record time. No report was re-recorded; the golden bytes are unchanged.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ tracked()  ls-files --cached --others   -> untracked files and edits reach the container       │
│ copy step  cp staged/* reports/          -> a dropped report stays committed                    │
│ header     "the exact versions below"    -> c8's dependency tree is resolved fresh              │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ Refuse a dirty fixture up front, empty reports/ before the copy, and state what is pinned.     │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ for f: validate name, record f         │   │ for f: validate name, git status --porcelain      │
│                                        │   │        clean, else exit 1                         │
│                                        │   │ for f: record f                                   │
│ mkdir -p out; cp staged/f/* out/       │   │ rm -rf out; mkdir -p out; cp staged/f/* out/      │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`assert_uploads_or_fails` read only the lines from `name: <artifact>` on, the `with:` block, so an `if:`
naming the wrong shard (say `matrix.shard == 'lint'` for `junit-guests`) would never upload, dogfood
would refuse on main, and the tests stayed green. The helper now reads the whole step from its `- name:`
and asserts its `if:`: push only for each tests partition, and the specs or gsd shard for the guests'
and the gsd report.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ assert_uploads_or_fails  skip_while(!= "name: X")  -> sees with: only, never the step's if:    │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ Read the step from its `- name:` line and assert its `if:` equals the expected condition.      │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ assert_uploads_or_fails(name, report)  │   │ assert_uploads_or_fails(name, report, when)       │
│   path:, if-no-files-found: error      │   │   if: <when>, path:, if-no-files-found: error     │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dogfood is no compiling check, yet its negative control runs `cargo nextest run -p gate`, which builds
the gate's test binary while another check may hold the compile turn. Cargo's directory lock kept it
safe, but it broke the one-compiling-check-at-a-time rule the scheduler holds for memory and disk. The
control now builds with `--no-run` under the compile turn, then runs the test outside it; the log still
gets the one `negative control passed` line.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ dogfood (compiles: false) -> cargo nextest run -p gate ...   builds beside a compiling check   │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ Build the control's binary with --no-run while holding compile_turn, then run it without.      │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ negative_control:                      │   │ negative_control:                                 │
│   nextest run --run-ignored only ..    │   │   { compile_turn; control_nextest(--no-run) }     │
│                                        │   │   control_nextest(--run-ignored only ..)          │
│ run::compile_turn  private             │   │ run::compile_turn, compile_lock_path  pub(crate)  │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The dogfood fix text tells a user how to re-run one guest's test, but left out the
`CARGO_TARGET_DIR=<target>/ext` the guests check builds in: following it rebuilt the guest from scratch
into `extensions/<dir>/target`. The command now carries the variable.

┌─ PROBLEM ──────────────────────────────────────────────────────────────────────────────────────┐
│ fix text: cargo nextest run --manifest-path extensions/<dir>/... -> cold build in <dir>/target │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ─────────────────────────────────────────────────────────────────────────────────────┐
│ Prefix the guest re-run command with CARGO_TARGET_DIR=<target>/ext, the check's own.           │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ───────────────────────────────┐   ┌─ AFTER ───────────────────────────────────────────┐
│ cargo nextest run --manifest-path ..   │   │ CARGO_TARGET_DIR=<target>/ext                     │
│                                        │   │   cargo nextest run --manifest-path ..            │
└────────────────────────────────────────┘   └───────────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (CR-01, CR-02, WR-03, WR-04, IN-02, IN-04) checked the
minted test ids against node v26's JUnit output: a test whose subtest was not
minted, anything inside a skipped call, an empty name and a CRLF template all
gave ids node never reports, and an empty or skipped describe got none though
node reports it as a test case. Every id the guest mints is now one node
reports as a <testcase>; the unit test holds a file node ran against the cases
it wrote. ADR 0393 D4, its Rejected list, the guide, the inventory and the spec
drop the false "node never reports a suite as a test case".

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ calls::read  holds[parent] only when a child was minted; describe never a leaf          │
│              skip modifier a bool; calls inside describe.skip / test.skip minted        │
│ Call::name   "" is a static name: item id `…::`, test id `…#` (node: <anonymous>)      │
│ decoded      a template's CRLF kept as \r\n (node's cooked value has \n)               │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ A call is a test case when it has .skip or no runner call sits inside it, minted or not │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ leaf = role != Suite && !holds[at]         │  │ leaf = call.skip || !holds[at]             │
│ holds[p] = child minted                    │  │ holds[p] = registers(child), minted or not │
│ around = paths[parent]                     │  │ around = None under .skip / { skip }       │
│ describe.skip("d") -> no test id           │  │ describe.skip("d") -> #d, nothing inside   │
│ test("", fn) -> js:app/f.test.js::         │  │ test("", fn) -> no item                    │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (WR-01, WR-02): the test pass read vitest's and jest's
test files too (`*.spec.*`, `tests/`, `__tests__/`, `__mocks__/`), whose test
ids node-test can never report, and it named a fixture package's test file
after the package above it, while node-test names it after the fixture. The
test pass now reads only the files `node --test` runs by default (checked
against node v26.13.0), and only when the package it names a file after is
the one node-test names it after. ADR 0393 D4 and the guide record the rule.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ files::tested  is_test(under): node's, vitest's and jest's patterns, on the package path│
│                a file of a package read_packages dropped falls to the parent's owner    │
│                -> js:app/test/fixtures/proj/a.test.js#x; node-test: js:proj/a.test.js#x │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ tested = node_runs(project path) && owner(read) == owner(every named package) && is_test│
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ parsed(input, &ws, files::tested, TESTS)   │  │ tested = |p| files::tested(&ws, &all, p)  │
│ src/b.spec.ts, tests/g.ts -> test items    │  │ src/b.spec.ts, tests/g.ts -> no item      │
│ test/fixtures/proj/a.test.js -> app's item │  │ test/fixtures/proj/a.test.js -> no item   │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (CR-03): the test pass went through the source pass's
"every file or none" rule, so one test file the reader could not parse (too
large, not UTF-8, withheld by the fs port, past its deadline) failed the whole
collector, with a message calling it a kept source file. Projects that
collected cleanly before phase 14 could fail. A test file is now best-effort:
it gives no item and a W203 warning naming it; a source file keeps its rule.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ files::answered  any NotParsed but Missing -> Err("… reads every kept source file …")  │
│ lib::collect     the test pass used it too: an odd fixture under test/ fails the pack   │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ parsed() takes Option<&mut warnings>: None for sources (error), Some for tests (warn)   │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ parsed(input, &tested, TESTS)?             │  │ parsed(input, &tested, TESTS, Some(&mut w))│
│ test/held.test.js denied -> Err            │  │ -> no item + CollectOutput.warnings line   │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (WR-05, IN-03): `cfg.rs` answered `unix = true` on every
host, so on a Windows `specforge collect` a `cfg(windows)` test a filtered
report lacked was relabelled skipped, and a `cfg(unix)` one stayed missing.
The collector input already carries the canonical project root as `cwd`: its
form (`/…` or `C:\…`) names the family. `unix`, `windows` and every
`target_family` value are now decided from it, and `target_os` on a Windows
host. Which unix the host is, nothing in the input tells, so on a unix host
`target_os = "linux"`/`"macos"` stays unknown; ADR 0393 D5 and the guide say
so precisely, and drop the claim that `target_family` was decided.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ cfg::holds  unix/target_family="unix" -> true, windows -> false, on any host           │
│             target_family = "wasm" unknown; ADR D5 says target_family is decided        │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ Family::of(input.cwd) decides the platform atoms; no root decides nothing               │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ cfg::excludes(attr)                        │  │ cfg::excludes(attr, Family::of(cwd))       │
│ C:\work: cfg(windows) missing -> skipped   │  │ C:\work: cfg(unix) missing -> skipped      │
│ target_family = "wasm" -> unknown          │  │ target_family = "wasm" -> false            │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (WR-06): `@rust/test` judged a test compiled out only by
the cfg attributes directly above it, so the two common ways to gate tests by
platform, `#[cfg(windows)] mod tests { … }` and a file opening `#![cfg(…)]`,
left their tests missing where they cannot run. `@rust/source` now records in
an item's `attrs` every cfg that compiles it out: those on the `mod`
declarations that reach its file, the file's inner `#![cfg]`, each enclosing
module's (outer and inner) and its own, outermost first, once each.
`@rust/test` already excludes a test when any recorded cfg is false.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ items::attrs   only the cfg attributes in the run of lines directly above the item      │
│ rust-tags.scm  no capture of inner attributes; modules::walk passes no cfg to a child   │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ read() takes the inherited cfgs and adds the file's, the enclosing ones and the item's  │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ #[cfg(windows)] mod w { #[test] fn a }     │  │ attrs ["cfg(windows)", "test"]            │
│   -> attrs ["test"]                        │  │                                            │
│ #![cfg(unix)] in plat.rs -> not recorded   │  │ every item of plat.rs carries cfg(unix)   │
│ Module { krate, path, candidates }         │  │ Module { …, cfgs }; Child { …, cfgs }     │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…does

The phase 14 review (WR-07, IN-05): `is_test` called a function a test when
any marker attribute lacked `__guard_only`, but the macro leaves registering
to the attribute below it, so `#[specforge_test(A)] #[specforge_test(B,
__guard_only)]` registers nothing while the item still carried a test id. And
the text scanner that found `__guard_only` misread raw strings and char
literals, which could hide it. A runner attribute now registers the test, else
the lowest spec-link attribute does unless it is a guard; the query finds
`__guard_only` as an identifier token of the attribute, so the grammar reads
the literals and the scanner goes.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ items::is_test     any(marker && !guard_only(text)): ignores which attribute defers     │
│ items::guard_only  hand scan of the text: r#"a"b"# or '"' throws off its string state   │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ runner attribute -> test; else the lowest spec-link one, unless a guard_only match on it│
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ #[specforge_test(A)]                       │  │ no test_id (the macro registers none)     │
│ #[specforge_test(B, __guard_only)] fn top  │  │                                            │
│   -> test_id rust:toy#top                  │  │ rust-tags.scm: @reference.guard_only      │
│ guard_only(&str) scanner                   │  │ (token_tree (identifier) "__guard_only")  │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (WR-08): `exclude_list` refused only empty, absolute,
drive and `..` entries and trimmed one trailing `/`, so `./examples`,
`examples/./shop`, `examples//shop`, `examples//`, `examples\shop` and `.`
were accepted and silently matched no package: the crates they meant to leave
out stayed counted. An entry is now its non-empty, non-`.` segments joined by
one `/`; a `\` or an entry with no segment left is refused like the rest.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ exclude_list  dir = text.strip_suffix('/'): `./x`, `x//y`, `x//`, `x\y`, `.` kept as    │
│               written, and excluded() never matches them against a package path        │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ Normalize to segments; refuse `\`, absolute, drive, `..` and an entry with no segment   │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ "./examples"   -> "./examples" (no match)  │  │ "./examples"   -> "examples"              │
│ "examples//"   -> "examples/" (no match)   │  │ "examples//"   -> "examples"              │
│ "examples\shop", "." -> accepted           │  │ "examples\shop", "." -> collector's error │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 review (WR-09): the `exclude` setting's description said a
manifest under an entry "is read by no collector", and the guide that "every
manifest under it is skipped". Neither holds: `@rust/cargo` reads every
manifest (workspace inheritance needs them) and answers no package for an
excluded one, so `@rust/source` reads no item there, while `@rust/test`,
`@rust/coverage`, `@rust/lint` and `@rust/deps` never consult the setting.
The description, the guide and ADR 0393 D7 now say that. The recorded
`describe_settings.json` follows with the guest's re-vendor.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ setting "exclude".describe   "a manifest in or under one is read by no collector"       │
│ rust-facts.md                "every manifest under it is skipped"                        │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ Say that rust-cargo answers no package there and the tool-running packs still run       │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ "… is read by no collector"                │  │ "@rust/cargo answers no package for a …,  │
│                                            │  │  so @rust/source reads no item there; the │
│                                            │  │  tool-running packs still run over …"     │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…eclare them

The phase 14 review (IN-01): `the_builtins_declare_no_settings` asserts that
only `@specforge/checks` and, since phase 14, `@rust/cargo` declare settings;
its name said none does.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ builtin_vocabulary.rs  the_builtins_declare_no_settings: two builtins are exceptions    │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ Rename it to what it checks                                                             │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────────────────┐  ┌─ AFTER ───────────────────────────────────┐
│ fn the_builtins_declare_no_settings()      │  │ fn only_checks_and_cargo_declare_settings()│
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One linux/amd64 Docker re-vendor (docs/agents/revendor.md, from a plain
clone) rebuilt the four guests whose inputs the review's fixes changed:
`@javascript/source`, `@rust/source`, `@rust/test` and `@rust/cargo`. Every
other blob came out identical; no lockfile, nothing under `gsd/`. The
recorded `rust_cargo/describe_settings.json` takes the reworded `exclude`
description. The builtins total grows 14,538 B to 27,991,688 B, under
`TOTAL_BUDGET` 28,000,000, so the budget stays and the size comment states
the new figures (8,312 B of headroom). No host test pin moved.

┌─ PROBLEM ─────────────────────────────────────────────────────────────────────────────┐
│ build-blobs --check: four guests stale after the review's fix commits                   │
│ declarations/rust_cargo/describe_settings.json: the old exclude description             │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ────────────────────────────────────────────────────────────────────────────┐
│ Rebuild them on the pinned rustc in rust:1.99.1 (linux/amd64), copy back only their paths│
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE (B) ──────────────────────────────┐  ┌─ AFTER (B) ───────────────────────────────┐
│ javascript/source    784,093               │  │ 787,400  (+3,307)                          │
│ rust/source          721,615               │  │ 731,519  (+9,904)                          │
│ rust/test            700,912               │  │ 701,218  (+306)                            │
│ rust/cargo         1,205,725               │  │ 1,206,746 (+1,021)                         │
│ builtins total    27,977,150               │  │ 27,991,688 of TOTAL_BUDGET 28,000,000      │
└────────────────────────────────────────────┘  └────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 security audit (U1): `settings."@rust/cargo".exclude` in
specforge.json is the one setting that shrinks SpecForge's X2 denominator,
and nothing held it: adding `crates` would pass every check. A dogfood test
now reads the list from the file, normalizes each entry as the collector does,
walks every Cargo.toml under it and fails naming each one that is a root
workspace member, a guest the `guests` check runs under nextest, or a `gsd/`
workspace member. `guests_of` becomes crate-visible for it.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────┐
│ specforge.json  @rust/cargo exclude: ["examples", "fixtures", ...]  no check reads it,   │
│                 so "crates" or "gsd" there drops tested crates from X2 silently           │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────┐
│ A gate test: no Cargo.toml under an excluded entry is a root, guest or gsd/ member        │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ exclude += "crates/leaf"  -> gate green   │  │ exclude += "crates/leaf" -> dogfood test     │
│                                           │  │   fails: crates/leaf/*/Cargo.toml listed     │
└───────────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 security audit (U3): the reports a container writes come back as
a tar, unpacked into a staged directory, then `cp "$staged/$fixture"/* "$out"/`
copied them into goldens/<fixture>/reports/. cp follows symlinks, so a
compromised tool could plant one and copy a host file into a golden. The
script now refuses, before any reports directory is touched, when anything
below a staged fixture is not a regular file (a symlink, a device, a FIFO or a
subdirectory, which cp would also trip on halfway), and copies with `cp -P`.
Both are BSD and GNU portable. The recorded goldens are unchanged.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────┐
│ record-reports.sh  tar -x -C "$staged/$fixture"; cp "$staged/$fixture"/* "$out"/          │
│                    a symlink in the container's tar is followed: a host file lands in out │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────┐
│ find "$staged" -mindepth 2 ! -type f non-empty -> exit 1 naming each; then cp -P          │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ staged/taskboard/x.lcov -> /etc/hosts     │  │ "a container wrote something other than a    │
│   copied: goldens/.../x.lcov = hosts      │  │  regular report file, nothing recorded", 1   │
└───────────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 security audit (U4): nothing held the properties that keep
record-reports.sh's containers away from the host. It needs Docker and never
runs in a test, so three tests read its text (comment lines dropped, `\`
continuations joined): each `*_IMAGE` is pinned by `@sha256:` and 64 hex and
every `container` call runs one of them; the script calls docker exactly once,
and that `docker run` takes no volume (`-v` in any short-flag group,
`--volume`, `--mount`, `--volumes-from`), no `--privileged`, no `--cap-add` and
no host network; the fixture allowlist (taskboard, vault, ledger) is intact and
checked before any fixture runs.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────┐
│ gsd/parity/record-reports.sh  digest pins, one `docker run` without mounts, the fixture   │
│                               allowlist: held by review only, an edit could drop any      │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────┐
│ record_script.rs reads the script and asserts each property, naming the one it lost       │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ docker run --rm -iv /:/host ... -> green  │  │ record_reports_runs_one_container_...:       │
│ EXTRA_IMAGE=alpine:3            -> green  │  │   "a volume: -iv"; "EXTRA_IMAGE is not       │
│ taskboard | vault | ledger | x) -> green  │  │   pinned by digest"; "the fixture allowlist" │
└───────────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phase 14 security audit's U3 fix (b0f19e5) had no test: an edit could
drop the refusal or the `-P` and every check would stay green. A test now
reads the script and asserts that `find "$staged" -mindepth 2 ! -type f`
and its `exit 1` come before the one `cp` into the reports directory, and that
the copy is `cp -P "$staged/$fixture"/* "$out"/`.

┌─ PROBLEM ───────────────────────────────────────────────────────────────────────────────┐
│ record-reports.sh  find ... ! -type f -> exit 1; cp -P  held by review only               │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────────────────────┐
│ record_script.rs asserts the refusal precedes the single copy and the copy is cp -P       │
└──────────────────────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ─────────────────────────────────┐  ┌─ AFTER ──────────────────────────────────────┐
│ cp "$staged/$fixture"/* ...  -> green     │  │ "the copy follows no symlink: cp -P"         │
│ odd= (no find)               -> green     │  │ "the non-regular file refusal"               │
└───────────────────────────────────────────┘  └──────────────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ADR 0392 says a pinned test holds which codes land under Codebook::authored_rule,
but the tests named only hand-built codes (gsd.security/E101, code/E101, E016,
E101). This test reads the vendored @gsd/core blob as the registry build does
(extension_codes) and pins its 39 error codes, gsd/E533 and gsd/E535 included,
as landing: a `facts` added to one, or a namespace change, fails it by name.

┌─ PROBLEM ───────────────────────────────────────────────────────────────┐
│ authored_rule(@gsd/core, gsd/E533 | gsd/E535 | ...)  -> no test         │
│ E533/E535 read facts but declare none: they land, and nothing holds it  │
└─────────────────────────────────────────────────────────────────────────┘
┌─ SOLUTION ──────────────────────────────────────────────────────────────┐
│ Judge the real @gsd/core catalog and compare with a pinned list.        │
└─────────────────────────────────────────────────────────────────────────┘
┌─ BEFORE ──────────────────────┐   ┌─ AFTER ────────────────────────────┐
│ codebook.rs: hand-built book  │   │ builtin_codes.rs:                  │
│ validate.rs: hand-built book  │   │   gsd_core.wasm -> extension_codes │
│ real @gsd/core: unpinned      │   │   -> authored_rule per E code      │
│                               │   │   == GSD_CORE_LANDS (39, refused 0)│
└───────────────────────────────┘   └────────────────────────────────────┘

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@leaderiop
leaderiop merged commit 231d888 into main Nov 25, 2026
14 checks passed
@leaderiop
leaderiop deleted the refactor/r6-breadth-2026-11-22 branch November 25, 2026 19:41
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