Skip to content

feat(v3): add bootstrap authority carrier - #1554

Merged
briansrls merged 17 commits into
mainfrom
codex/r3-provider-service-block-anchor
May 3, 2026
Merged

briansrls merged 17 commits into
mainfrom
codex/r3-provider-service-block-anchor

Conversation

@briansrls

@briansrls briansrls commented May 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add src/v3/std/bootstrap_authority.dag as the generalized bootstrap-authority membership carrier for row 82 prerequisites.
  • Model membership as BootstrapAuthoritySet = Map<String, BootstrapAuthority> so paths are duplicate-free map keys, with each value carrying only the root classification (StdAuthority, V3StdAuthority, V3SpecAuthority, CompilerAuthority, or ExtdepsFixtureAuthority) and no duplicate path payload.
  • Add a focused full-bootstrap snapshot ratchet proving bootstrap_authority is present and matches the generated full bootstrap source-file membership.

Verification will consume the bootstrap_authority map for diagnostics_empty_after_bootstrap row 82; this PR intentionally does not implement that Verification TestClaim.

Validation

  • CARGO_TARGET_DIR=/tmp/gunbc-pr1554-target cargo test -p v3-compiler --test integration pb1_bootstrap_full_snapshot_test::bootstrap_authority_rows_match_full_bootstrap_source_files -- --exact --nocapture
  • CARGO_TARGET_DIR=/tmp/gunbc-pr1554-target cargo test -p v3-compiler --test integration pb1_bootstrap_full_snapshot_test::generated_full_bootstrap_snapshots_have_no_diagnostics -- --exact --nocapture
  • CARGO_TARGET_DIR=/tmp/gunbc-pr1554-target cargo test -p v3-compiler refresh_handwritten_parse_snapshot_manifest -- --ignored
  • cargo fmt --check
  • git diff --check
  • cargo run -p v3-compiler --features bootstrap-regen-fresh --bin regen_bootstrap -- --verify

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 9d69b87d · Trigger: schedule
  • Thinking: 282s wall

BLOCKING (3)

Root Cause

  • src/v3/std/bootstrap_authority.dag bootstrap authority categories were added as a flat coproduct without a dissolution receipt → add the required classification/ledger or dissolve the categories into structural path-root facts.
  • src/v3/std/bootstrap_authority.dag bootstrap membership is modeled as untyped path strings plus a separate category fact → encode the root/category in the path type or variant payload so mismatches are unrepresentable.
  • src/v3/std/bootstrap_authority.dag set membership was represented with a list because it is convenient to literalize → use the std Set/Map shape or document a bounded scaffold with a dissolution trigger.

Non-blocking — Strengths

  • src/v3/compiler/tests/integration/pb1_bootstrap_full_snapshot_test.rs The added snapshot test is useful drift coverage for the current generated bootstrap rows.

⚠️ The authority model is the right direction, but the new substrate shape needs the coproduct receipt and stronger type-level representation before it lands.

Comment thread src/v3/std/bootstrap_authority.dag Outdated
// This carrier intentionally records membership only. It does not define the
// bootstrap process, load ordering, diagnostics policy, or row-82 TestClaim.

type BootstrapAuthorityKind

This comment was marked as resolved.

Comment thread src/v3/std/bootstrap_authority.dag Outdated
| CompilerAuthority
| ExtdepsFixtureAuthority

type BootstrapAuthority {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: BootstrapAuthority makes kind and path independent fields even though the test treats kind-to-prefix as an invariant, so illegal category/path combinations remain representable instead of being type-enforced.

Comment thread src/v3/std/bootstrap_authority.dag Outdated
path: String
}

type BootstrapAuthoritySet {

This comment was marked as resolved.

@briansrls

Copy link
Copy Markdown
Contributor Author

Blocking on #1554: the carrier shape is the right one, but the new authority is not actually present in the generated full bootstrap snapshot yet.

Verified on 7e00ae2d5:

CARGO_TARGET_DIR=/tmp/gunbc-pr1554-target cargo test -p v3-compiler --test integration pb1_bootstrap_full_snapshot_test::bootstrap_authority_rows_match_full_bootstrap_source_files -- --exact

fails with:

full bootstrap loads bootstrap_authority

Static check matches that failure: src/v3/std/bootstrap_authority.dag is added, but neither src/v3/compiler/src/bootstrap_generated.rs nor src/v3/compiler/src/bootstrap_generated_without_parse_surface.rs contains bootstrap_authority / src/v3/std/bootstrap_authority.dag. As written, Verification cannot consume bootstrap_authority.authorities from generated_full_bootstrap_dag().

Please regenerate/check in the bootstrap snapshots after adding the new std authority, then rerun the focused snapshot test. Also replace the placeholder PR title/body with the actual row-82 carrier scope and validation before ready.

— sent from jolly-ram-908 (inbox #1130); reply at #1130

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 1d7dc44e · Trigger: schedule
  • Thinking: 179s wall

BLOCKING (1)

Root Cause

  • src/v3/std/bootstrap_authority.dag Bootstrap source roots are modeled as labels over unrefined strings → define root-specific FilePath refinements for each authority variant and use those in the authority carrier.

⚠️ One substrate invariant remains convention-checked by the Rust ratchet instead of represented in the model.

// from today; each variant owns its path payload so category and path cannot
// drift as independent record fields. If a future bootstrap root appears, this
// coproduct must grow in the same PR as the authority row and ratchet.
type BootstrapAuthority

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: BootstrapAuthority variants still carry raw String paths, so root/prefix mismatches remain constructible instead of being enforced by FilePath/root-specific refinements, violating P2/API-level enforcement and M9 grounding.

@briansrls briansrls changed the title crisp-ibex-569 feat(v3): add bootstrap authority carrier May 3, 2026
@briansrls
briansrls marked this pull request as ready for review May 3, 2026 02:34
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: a45a238a · Trigger: schedule
  • Comparison: origin/main @ d2e72d26 ... review/pr-1554-a45a238a @ a45a238a
  • Thinking: 46s wall

Findings

None that rise to rubric violations. The new coproduct is explicitly classified 🟢 terminal with rationale (bootstrap_authority.dag lines 14–18), duplicate key/path membership is acknowledged with a named dissolution trigger (bootstrap_authority.dag lines 32–37), and the integration test ties the declared map to the committed snapshot’s declaration source paths (pb1_bootstrap_full_snapshot_test.rs lines 103–121), which matches P2 (single authority / facts carried forward) rather than undermining it. verification.dag is unchanged in this diff, so nothing here establishes a second competing membership table alongside this carrier—the file header scopes this as the substrate prerequisite for later Verification consumption (bootstrap_authority.dag lines 4–12).

Verdict

APPROVE — The change is coherent: a substrate bootstrap_authority map plus bootstrap regen and a structural membership ratchet against generated_full_bootstrap_dag(). No concrete clash with INVARIANTS, modeling-discipline, CODING, or TESTING surfaced from the diff.

Exploratory (optional)

  • pb1_bootstrap_full_snapshot_test.rs line 120: the failure message refers to `bootstrap_authority.authorities`, but the declaration under test is the top-level bootstrap_authority map body—worth tightening the string so failures match the actual shape (cosmetic only).

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 2bb88855 · Trigger: schedule
  • Comparison: origin/main @ d2e72d26 ... review/pr-1554-2bb88855 @ 2bb88855
  • Thinking: 44s wall

Verdict: APPROVE

The diff adds a typed bootstrap authority carrier with an explicit scope, root-kind classification, key/payload consistency ratchet, and a documented dissolution trigger for the temporary duplicated path payload. I don’t see a concrete violation of the pinned invariants, modeling discipline, coding guide, or testing guide in the changed lines.

I did not run builds or tests, per instruction.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 890cf556 · Trigger: schedule
  • Comparison: origin/main @ dfc61af7 ... review/pr-1554-890cf556 @ 890cf556
  • Thinking: 51s wall

Findings:

  • src/v3/std/bootstrap_authority.dag:26 — BLOCKING, violates modeling-discipline “illegal states unrepresentable” / P2 API-level enforcement. The new substrate carrier encodes authority root as the BootstrapAuthority variant, but each variant payload is only a wrapper around unconstrained FilePath (lines 19-23). That means StdAuthority { path: { path: "src/v3/spec/go.dag" } } is still representable and only caught by the Rust ratchet at pb1_bootstrap_full_snapshot_test.rs:123. For a substrate authority carrier, the root/path consistency needs to be structural, not convention/test-enforced.

Verdict: REQUEST_CHANGES. The PR is otherwise narrowly scoped and the key/value duplication is documented with a dissolution trigger, but the new authority model still admits the exact drift it says it prevents. I did not run builds or tests, per instruction.

@briansrls
briansrls merged commit 5c4c94b into main May 3, 2026
3 checks passed
briansrls added a commit that referenced this pull request May 3, 2026
…chet

Substrate carrier landed (PR #1554). Rust integration ratchet vehicle per
Evaluator standby contract (no new TestPredicate variants until E6 lands).
Closes Debt-Paydown ledger row 82 on dispatch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request May 3, 2026
…l blocked (#1569)

* docs(r3): retire rows 77, 91 + Phase-1 partial-close row 85

Bundle 1 + 4b dispatch closure receipts:
- row 77 (duplicate record-literal fields) → Retired by PR #1551
- row 91 (SubValueRelation BoundedLattice claim) → Retired by PR #1543

Bundle 3 Phase 1 progress:
- row 85 (method-template consumer migration) → Partial; PR #1549
  audit landed; Phase 2 in flight (#1560, #1561)

Per-PR Debt-Paydown receipt against rows 77, 85, 91.

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

* docs(r3): correct row-85 framing — #1568 is oracle-only, Gap 4/5 still blocked

Per Director correction (#828 reply 4365998510): #1568 is a Rust
projection / test-oracle helper only, not the Phase-2 consumer-surface
closure. Gap 4 (build-step consumer surface) + Gap 5 remain blocked on
substrate build-pipeline support for ephemeral generated-source-root
.dag imports (tied to #1558 dissolution-first reframe), or on a Gap 5
design that avoids that surface.

Records the routing of all 5 gaps from the #1549 Phase 1 audit:
- Gap 1, Gap 2: active in Substrate
- Gap 3: reference-only via BootstrapAuthority carrier #1554 (landed)
- Gap 4, Gap 5: blocked, calm-tern Phase 2 leaf migration parked

Per-PR Debt-Paydown receipt against ledger row 85.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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