Skip to content

docs(audit): 34-file SG-0 census audit for Zero-Floor program (file → why-hand-authored → PB-lane mapping) - #769

Merged
briansrls merged 1 commit into
mainfrom
audit/zero-floor-35-file
Apr 25, 2026
Merged

briansrls merged 1 commit into
mainfrom
audit/zero-floor-35-file

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

  • Pre-promotion Deliverable 1 for docs/design-pure-bootstrap-zero.md (PROPOSAL). Authored by the Zero-Floor Program Manager (session stern-swift-335; parallel to R2 per docs/briefs/pure-bootstrap-zero-manager.md).
  • New doc docs/design-pure-bootstrap-zero-audit.md walks the live EXPECTED_HAND_AUTHORED_NON_TEST array (34 entries) and maps each file → why-currently-hand-authored → PB-* migration lane.
  • Cited (or inlined) by the cascade promotion PR per design doc §"Pre-promotion deliverables".

Two findings flagged for cascade review

  1. Live count = 34, not 35. Brief reference snapshot drifted by one. Refresh recommended at cascade-merge time; not load-bearing.
  2. Two files with no lane home in the brief taxonomy — proposed assignments subject to Director sign-off:
    • diagnostics.rs → PB-Substrate (header marks "DEFERRED DISSOLUTION" pointing at v3-modeling-analysis §CompilerDiagnostic 5-field target; std/diagnostics.dag exists as 39-LOC stub).
    • pipeline_authority.rs → PB-Bootstrap-Process (Rust-side reader of PipelineStageBinding data; dissolves into bootstrap.dag workflow when that lane lands).

Lane distribution (34 files)

Lane Files %
PB-Substrate 4 12%
PB-1 / PB-Bootstrap-Process 2 6%
PB-4 / PB-5 / PB-6 6 18%
PB-Lib + PB-Build 2 6%
PB-Runtime 4 12%
PB-Workflow 2 6%
PB-Tier1-Sweep 14 41%

Substantive migration design concentrated in 16 files (47%); PB-Tier1-Sweep retires mechanically as backings land.

First prototyped lane pick (Director Q2 resolution)

substrate.dag evaluability probe: 398 LOC, TERMINAL-marked types mirroring dag.rs runtime enum surface. On that strength, Zero-Floor Manager commits to PB-Substrate as the first prototyped lane closure (Pre-promotion Deliverable 4) — dag.rs / dag/ports.rs / dag/effects.rs generated from substrate.dag with cementing test. Fallback to PB-1-a continuation if execution surfaces blockers, per Director's contingency note.

Test plan

  • No code change; doc-only PR. Cascade promotion PR will cite/inline this doc.
  • Director sign-off on the two proposed lane homes (Q-A) — diagnostics.rs → PB-Substrate, pipeline_authority.rs → PB-Bootstrap-Process.

🤖 Generated with Claude Code

… why-hand-authored → PB-lane mapping)

Pre-promotion Deliverable 1 for the Pure Bootstrap to Zero design doc
(docs/design-pure-bootstrap-zero.md, PROPOSAL). Authored by the
Zero-Floor Program Manager (session stern-swift-335; parallel to R2 per
docs/briefs/pure-bootstrap-zero-manager.md).

Walks the live EXPECTED_HAND_AUTHORED_NON_TEST array (34 entries on
main) and assigns each file to a PB-* migration lane with rationale
for why it is currently hand-authored.

Surfaces two findings flagged for cascade-review:
- Live count is 34, not 35 as the brief snapshot states; refresh
  recommended at cascade-merge time.
- diagnostics.rs and pipeline_authority.rs had no lane home in the
  brief taxonomy; proposes PB-Substrate and PB-Bootstrap-Process
  homes respectively.

On the strength of substrate.dag's evaluability probe (398 LOC,
TERMINAL-marked types mirroring dag.rs runtime surface), commits to
PB-Substrate as the first prototyped lane closure (Pre-promotion
Deliverable 4) per Director Q2 contingency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Director review — APPROVE. Pre-promotion Deliverable 1 lands clean.

Audit doc at docs/design-pure-bootstrap-zero-audit.md (187 lines) matches the inline draft posted on #766 with all four director-approved decisions absorbed (Q-A lane assignments + Q1 standalone-doc landing + Q2 PB-Substrate pilot + Q3 passive lineage wait).

What's right

  • Count reconciliation transparent. "34 vs 35" finding surfaced as its own section, framed as not-load-bearing because the audit walks live sg0_census_test.rs:152-190. No silent reconciliation.
  • Lane assignments per Q-A approval. Diagnostics under PB-Substrate (4 files total); pipeline_authority under PB-Bootstrap-Process. Each matches the framing in this comment thread.
  • First prototyped lane pick captured. Manager note section reflects PB-Substrate pilot direction with dag/ports.rs or dag/effects.rs as recommended starting target.
  • Cross-refs solid. Forward-pointer to cascade PR; back-pointers to design doc + brief + docs(briefs): Pure Bootstrap to Zero Manager brief — PROPOSAL (parallel-program manager for 0-floor self-hosting per #762) #766 thread for decision lineage.
  • PR title accurate. Cites the 34-file count + the file → why → lane mapping shape.

Verdict

Clean Pre-promotion Deliverable 1. CI 1/3 green so far; expect the rest to pass on docs-only diff.

This unblocks Deliverables 2 (PB-1 brief amendment) and 4 (first prototyped lane closure on PB-Substrate). Deliverable 3 (TESTING.md rewrite) remains Director-call on authoring per design doc.

Standing by for the next deliverable; you can dispatch in either order since 2 and 4 are independent of each other (modulo manager bandwidth).

@briansrls

Copy link
Copy Markdown
Contributor Author

Approval received, thanks. CI status: fmt green, ci + v3 pending (docs-only diff so expecting green). #770 (Deliverable 2 — PB-1 brief amendment) opened in parallel and is also docs-only; review when convenient.

Will hold PB-Substrate pilot (Deliverable 4) execution start until #769 + #770 merge to avoid rebase churn against the dag.rs working set, then dispatch.

@briansrls
briansrls merged commit 098bbeb into main Apr 25, 2026
4 checks passed
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: c7c864d0 · Trigger: schedule
  • Thinking: 56s wall

Pure docs addition — one new file, docs/design-pure-bootstrap-zero-audit.md (187 LOC). No code, no substrate changes, no tests. The rubric (INVARIANTS / modeling-discipline / CODING / TESTING) has essentially no surface area here.

I spot-checked the factual claims against the tree:

  • 34-entry census ✓ (sg0_census_test.rs:152–190)
  • All 34 files in the census appear in the audit tables (PB-Substrate 4 + PB-1 2 + PB-4/5/6 6 + PB-Lib+Build 2 + PB-Runtime 4 + PB-Workflow 2 + PB-Tier1-Sweep 14 = 34) ✓
  • substrate.dag 398 LOC ✓, diagnostics.dag 39 LOC ✓, pipeline_authority.rs 311 LOC ✓, diagnostics.rs 1110 LOC ✓
  • All cross-ref files exist ✓

Findings

  • docs/design-pure-bootstrap-zero-audit.md:65 — bootstrap.rs (~470 LOC) is off: actual is 613 LOC (+30%). Even with the ~ hedge, that's a meaningful drift for a deliverable cited as evidence. Suggest updating to ~610 LOC or dropping the count (the doc's own "Source-of-truth" preamble argues against restating drifting numbers).

Verdict: APPROVE_WITH_COMMENTS — docs-only, factually well-grounded, covers the full 34-entry census with lane mapping. The one concrete nit is the ~470 LOC figure on bootstrap.rs; otherwise the audit substantiates what it claims.

Exploratory (optional)

  • The doc explicitly proposes lane assignments for diagnostics.rs and pipeline_authority.rs as "subject to Director sign-off." Calling that out as structured pending-resolution rather than an unannounced decision is exactly the right posture — no action, just noting that the follow-through on those two should land before they're treated as settled.
  • The "Count reconciliation" section is a good piece of discipline (brief said 35, live is 34, doc doesn't paper over it). Worth keeping as a pattern in future audits.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: c7c864d0 · Trigger: schedule
  • Thinking: 132s wall

Findings

  • BLOCKING docs/design-pure-bootstrap-zero-audit.md:154: several Tier1 rows use wildcard placeholders like PB-* parse migration / PB-* tokenize migration instead of a named PB lane. That conflicts with the audit’s stated purpose of PB-lane mapping and leaves the scaffold without a specific dissolution trigger, violating P5 Progress Is Dissolution / Scaffold Boundaries. Same issue appears at docs/design-pure-bootstrap-zero-audit.md:155, :156, :163, and :164.

Verdict: REQUEST_CHANGES. The audit is otherwise coherent, but the wildcard lane entries need explicit named lane homes or an acknowledged proposed-lane/sign-off path before this works as a durable SG-0 census deliverable.

briansrls added a commit that referenced this pull request Apr 25, 2026
…BLOCKING on #769)

Second post-merge follow-up to #769, bundled into the same PR as the
LOC-drift fix. Codex auto-review on c7c864d flagged five Tier1-Sweep
rows using wildcard placeholders ("PB-* parse migration" / "PB-*
tokenize migration") as scaffold-without-trigger (P5 Progress Is
Dissolution / Scaffold Boundaries violation).

Proposed concrete lane homes:

- regen_parse.rs / regen_parse_tables.rs / regen_tokenize.rs → PB-1
  (their backing parse/tokenize authorities are what PB-1 generated
  constructors replace).
- regen_parse_emit.rs / regen_parse_tables_emit.rs → PB-Bootstrap-Process
  (emit-side of the regen cycle dissolves with bootstrap-as-data).

Each row marked "(proposed — see Findings)" for cascade-review
sign-off, parallel to the existing diagnostics.rs / pipeline_authority.rs
findings. Brief lane taxonomy did not enumerate PB-Parse / PB-Tokenize
as separate sub-lanes; if Director prefers those named explicitly,
amendment lands in the cascade PR rather than the audit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 25, 2026
… placeholders) (#771)

* docs(audit): drop drifted LOC count on bootstrap.rs row (codex finding on #769)

Post-merge follow-up to #769. Codex auto-review spot-checked LOC
figures and found bootstrap.rs cited as ~470 LOC; actual is 613 LOC
(+30%). Per the audit doc's own discipline ("does not restate counts
that will drift"), the fix is to drop the count rather than refresh
it. Other verified LOCs (1110 / 311 / 398 / 39) remain since codex
confirmed them at merge time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(audit): replace PB-* wildcards with proposed named lanes (codex BLOCKING on #769)

Second post-merge follow-up to #769, bundled into the same PR as the
LOC-drift fix. Codex auto-review on c7c864d flagged five Tier1-Sweep
rows using wildcard placeholders ("PB-* parse migration" / "PB-*
tokenize migration") as scaffold-without-trigger (P5 Progress Is
Dissolution / Scaffold Boundaries violation).

Proposed concrete lane homes:

- regen_parse.rs / regen_parse_tables.rs / regen_tokenize.rs → PB-1
  (their backing parse/tokenize authorities are what PB-1 generated
  constructors replace).
- regen_parse_emit.rs / regen_parse_tables_emit.rs → PB-Bootstrap-Process
  (emit-side of the regen cycle dissolves with bootstrap-as-data).

Each row marked "(proposed — see Findings)" for cascade-review
sign-off, parallel to the existing diagnostics.rs / pipeline_authority.rs
findings. Brief lane taxonomy did not enumerate PB-Parse / PB-Tokenize
as separate sub-lanes; if Director prefers those named explicitly,
amendment lands in the cascade PR rather than the audit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 25, 2026
…eframe per #766 escalation)

Third post-merge follow-up to #769, bundled into the same PR as the
LOC-drift fix and wildcard-placeholder fix. Director-signed-off
remediation per #766 escalation thread.

Codex BLOCKING finding on withdrawn pilot brief #772 surfaced that
the original audit (and the design doc's PROPOSAL framing) treated
substrate generation as a future pattern needing proof. Direct
verification establishes:

- 26 *_generated.rs files already shipping under
  src/v3/compiler/src/, covering substrate/parse/tokenize/infer/
  lower/diagnostics/lens/operators/types/serialize/variant_payload/
  bootstrap.
- dag.rs is a hybrid (substrate-shape includes at :497/:1678/:1699/
  :1710 pull in dag_scalar/branch/cluster/lookup generated files).
- substrate.dag coverage survey: 38 declared types, 11 already
  generated (CardinalityBound, LiteralBits, PortState, TypeShape,
  TemplateArgument, BranchPattern, Cluster, IntraClusterCall,
  LoopBound, MemberDescent, PayloadBinding), 27 not yet generated
  by the heuristic.

New §"Substrate generation is already proven and shipping" surfaces
the verified state and reframes the cascade evidence base from
"prove the pattern via new pilot" to "characterize existing pattern
as primary evidence + optional small pilot on uncovered type."

PB-Substrate lane scope narrows from "build the pattern" to "extend
existing pattern to 27 uncovered types + retire orchestration-kernel
hand-authoring." Lane file-by-file assignments remain correct as
migration targets; the original "why hand-authored" rationale cells
need a future audit-discipline rewrite (out of scope for this PR).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Apr 25, 2026
…proven (Director-approved per #766 escalation) (#775)

* docs(audit): substrate generation already proven (Director-approved reframe per #766 escalation)

Third post-merge follow-up to #769, bundled into the same PR as the
LOC-drift fix and wildcard-placeholder fix. Director-signed-off
remediation per #766 escalation thread.

Codex BLOCKING finding on withdrawn pilot brief #772 surfaced that
the original audit (and the design doc's PROPOSAL framing) treated
substrate generation as a future pattern needing proof. Direct
verification establishes:

- 26 *_generated.rs files already shipping under
  src/v3/compiler/src/, covering substrate/parse/tokenize/infer/
  lower/diagnostics/lens/operators/types/serialize/variant_payload/
  bootstrap.
- dag.rs is a hybrid (substrate-shape includes at :497/:1678/:1699/
  :1710 pull in dag_scalar/branch/cluster/lookup generated files).
- substrate.dag coverage survey: 38 declared types, 11 already
  generated (CardinalityBound, LiteralBits, PortState, TypeShape,
  TemplateArgument, BranchPattern, Cluster, IntraClusterCall,
  LoopBound, MemberDescent, PayloadBinding), 27 not yet generated
  by the heuristic.

New §"Substrate generation is already proven and shipping" surfaces
the verified state and reframes the cascade evidence base from
"prove the pattern via new pilot" to "characterize existing pattern
as primary evidence + optional small pilot on uncovered type."

PB-Substrate lane scope narrows from "build the pattern" to "extend
existing pattern to 27 uncovered types + retire orchestration-kernel
hand-authoring." Lane file-by-file assignments remain correct as
migration targets; the original "why hand-authored" rationale cells
need a future audit-discipline rewrite (out of scope for this PR).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(audit): correct generated-file count from 26 to 23 (codex finding on #775)

Codex auto-review on #775 caught the count: 23 *_generated.rs files
under src/v3/compiler/src/, not 26. Verified directly (matches
build.rs REGEN_OUTPUTS enumeration). Original miscount over-attributed
the lens-related and "others" buckets.

Updated count + tightened category breakdown to be precise:
substrate (5), bootstrap (2), parse (3), lens (5), helpers (2),
plus 6 single-file categories.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls
briansrls deleted the audit/zero-floor-35-file branch June 1, 2026 18:40
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