Skip to content

R3 gate #106: show_correct_code_diagnostic_coverage (T-Tests-As-Data-Completeness + Substrate canvas) - #3134

Merged
briansrls merged 7 commits into
mainfrom
session/still-owl-68
May 14, 2026
Merged

briansrls merged 7 commits into
mainfrom
session/still-owl-68

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session still-owl-68.
Pushing to session/still-owl-68 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

@briansrls
briansrls marked this pull request as ready for review May 14, 2026 18:58
briansrls added a commit that referenced this pull request May 14, 2026
…ments

Add SG-0 hand-authored integration test receipt row for
t_gate_106_show_correct_code_diagnostic_coverage_test.rs per INVARIANTS §P5.
Split sg0 census comments so gate #58 dissolution block sits only above its path.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressed composer-2 REQUEST_CHANGES (review artifact /api/reviews/12073)

  1. INVARIANTS §P5 / SG-0 table — Added a matching receipt row for src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs in INVARIANTS.md §"SG-0 hand-authored integration test receipts", placed ASCII-before the existing t_gate_58_... row.

  2. Census comment pairing — Split sg0_census_test.rs comments so gate Claude/review remaining tasks h o hy1 #106 has its own short block immediately above its census path; the long gate feat: implement Lane 1 Review/SDLC core (W1-W7) #58 dissolution / P5 deferral block now sits only above t_gate_58_apply_lens_self_application_test.rs.

Pushed: af2d47a81. CI should re-run on the new HEAD.

briansrls added a commit that referenced this pull request May 14, 2026
PR #3134 adds one EXPECTED_HAND_AUTHORED_TEST path; CI prepends
scripts/ci-merge/sg0-pr-body-append.<pr>.txt for sg0 discipline checks.
Pair gate #106 harness add with Verification Gap 9 dispatch anchor in
r3-verification-manager brief.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

briansrls commented May 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Verified (cursor composer-2 approve / review 12142) against e97180aee

  • P5 / SG-0: INVARIANTS SG-0 table row for t_gate_106_show_correct_code_diagnostic_coverage_test.rs is present; sg0_census_test.rs carries the census literal with the gate Claude/review remaining tasks h o hy1 #106 comment + P5 pointer to that row; scripts/ci-merge/sg0-pr-body-append.3134.txt documents +1 with (c) pairing to docs/briefs/r3-verification-manager.md.
  • Census sort: lens_register_correspondence_test.rs appears before no_coercion_cost_dimension_ratchet_test.rs in EXPECTED_HAND_AUTHORED_TEST order (strict ASCII pv < *p); cargo test -p v3-compiler sg0_expected_list_is_sorted_and_unique passes locally on this branch when run.
  • Harness scope: t_gate_106_show_correct_code_diagnostic_coverage_test.rs remains substrate shape locks on generated_full_bootstrap_dag() plus one compile_to_dag → apply_correction_and_reparse live-correction smoke — consistent with integration-layer thesis/diagnostic receipts.

Merge readiness (still-owl-68): GitHub Checks for workflow 25881144647 show fmt / ci / v3 / self_host_ratchet green on this HEAD. dashboard-ops reviews gunb-ai/gunbc#3134 still reports checks_state: pending and only 1/2 dashboard approvals (cursor on this SHA; codex review on an older SHA remains verdict: unknown in the dashboard rollup). Per session merge policy I am not squash-merging until the dashboard shows ≥2 distinct approvals, no REQUEST_CHANGES, and checks green in that summary.

— sent from still-owl-68

@briansrls

Copy link
Copy Markdown
Contributor Author

Item 12178 (composer-2 approve) — verified against b51bfe963

  • Harness t_gate_106_show_correct_code_diagnostic_coverage_test.rs: bootstrap substrate locks + one compile_to_dag → apply_correction_and_reparse roundtrip (unchanged intent).
  • INVARIANTS.md SG-0 row for that path present (same P5 Mechanism (b) surface).
  • sg0_census_test.rs includes the census literal plus the gate Claude/review remaining tasks h o hy1 #106 comment/P5 pointer.
  • scripts/ci-merge/sg0-pr-body-append.3134.txt still documents net +1 with (c) pairing to docs/briefs/r3-verification-manager.md.
  • ci.yml uses scripts/ci-merge/sg0-pr-body-append.${{ github.event.pull_request.number }}.txt — correct; no workflow edit needed for .3134 append lands.

GitHub Actions run 25882015222 for this headSha reports success.

Merge readiness: dashboard-ops reviews still gates 2 distinct approving providers. Current rollup counts approve twice from cursor (reviews 12142, 12178) as one distinct provider for that rule; codex on an older headSha is still unknown here, so the dashboard ready flag stays false and I am not squash-merging from this worker until that summary clears.

— sent from still-owl-68

briansrls and others added 3 commits May 14, 2026 20:17
…ments

Add SG-0 hand-authored integration test receipt row for
t_gate_106_show_correct_code_diagnostic_coverage_test.rs per INVARIANTS §P5.
Split sg0 census comments so gate #58 dissolution block sits only above its path.

Co-authored-by: Cursor <cursoragent@cursor.com>
PR #3134 adds one EXPECTED_HAND_AUTHORED_TEST path; CI prepends
scripts/ci-merge/sg0-pr-body-append.<pr>.txt for sg0 discipline checks.
Pair gate #106 harness add with Verification Gap 9 dispatch anchor in
r3-verification-manager brief.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/still-owl-68 branch from a4f590b to df8f426 Compare May 14, 2026 20:18
briansrls and others added 2 commits May 14, 2026 20:19
…land

Restores strict path ordering in the SG-0 integration-test receipt table:
r3_gate_62 negative-bridge audit row follows r3_gate_60 (both r3_gate_*).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

briansrls commented May 14, 2026 •

Copy link
Copy Markdown
Contributor Author

dashboard follow-up (@claude/opus artifact 12214 / Claude review on earlier SHA)

Re-verified the finding against current HEAD 41385ed: gate #106 integration test (compile_to_dag → apply_correction_and_reparse), INVARIANTS P5 (b) row, SG-0 census literal (+ gate #106 / #58 ASCII ordering preserved), sg0-pr-body-append.3134.txt (+1 / Gap 9 / gate #106; pairing (c) per docs/briefs/r3-verification-manager.md) — unchanged intent; pattern matches landed #58/#88-style rows.

Already addressed on latest push: merged origin/main (includes #3111 gate #62 negative-bridge receipt) and fixed INVARIANTS SG-0 table ASCII ordering (symbolic_* … gate_106 … gate_58; r3_gate_62_* after r3_gate_60 before symbolic_*).

Merge status (gh): mergeStateStatus BLOCKED by branch-protection (gh pr merge … --squash fails without --admin/--auto); fresh approvals likely needed on 41385eda.

dashboard-ops was stale (CONFLICTING, older HEAD) vs GitHub (MERGEABLE) until refresh.

— sent from still-owl-68

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 41385eda · Trigger: manual
  • Comparison: main @ a92ae6fd ... session/still-owl-68 @ 41385eda
  • Conversation: View conversation

1. Story of the diff

This PR adds a tracked R3 gate #106 receipt for “show the correct code” diagnostics. The new integration harness is wired into tests/integration.rs at src/v3/compiler/tests/integration.rs:232-233, registered in the SG-0 hand-authored test census at src/v3/compiler/tests/integration/sg0_census_test.rs:752-757, and paired with an INVARIANTS row at INVARIANTS.md:352 plus a PR-body append file at scripts/ci-merge/sg0-pr-body-append.3134.txt:1-4.

The load-bearing test file asserts that the bootstrapped substrate carries Correction, CorrectionWitness, RetirementPlan, and a mandatory Diagnostic.correction field, then exercises one real type-mismatch diagnostic from source text through compile_to_dag → correction → apply_correction_and_reparse → compile_to_dag at src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:228-263. That directly serves the thesis-level diagnostic intent: diagnostics should point to the structurally correct program, not only report that the current program is wrong. chatgpt-review-f8621e6b-7587-4f…

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

Compliant — the diff does not mutate substrate definitions; it adds a consumer/ratchet over the existing bootstrapped substrate. The substrate authority remains generated_full_bootstrap_dag(), read by tests such as gate_106_diagnostic_record_carries_mandatory_correction_field at src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:158-197, rather than introducing a parallel Rust data model.

  1. INVARIANTS.md + modeling-discipline.md.

Compliant — fail-closed / illegal-state discipline is respected by locking Diagnostic.correction as mandatory and typed to substrate Correction, not nullable or warning-text-shaped: src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:192-195 asserts the field points at Correction. The new hand-Rust scaffold is also explicitly tracked: INVARIANTS P5 requires scaffolds to have named dissolution triggers, and this PR’s row says the harness dissolves when row #106 obligations are carried by .dag TestClaim / generated harness without the Rust anchor at INVARIANTS.md:352. chatgpt-review-d305eb83-3654-45…

  1. CODING.md.

Compliant — the added helpers are free functions over explicit inputs (fn conj_field_labels(dag: &Dag, ...), fn conj_field_ty(dag: &Dag, ...), fn variant_payload_field_ty(dag: &Dag, ...)) at src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:17, :27, and :59; no object-style hidden state or new production impurity surface is introduced. The panics/unwraps are in test code, not library code.

  1. TESTING.md.

Finding — NON-BLOCKING: the variant-payload “lock” is currently a field-existence/type check, not a full payload-shape lock. The live variant test only asks for the witness field at src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:204, and the deferred variant test only asks for reason / retirement_plan at src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:216 and :221. If either payload Conj gains an extra field, these tests still pass, despite the INVARIANTS row claiming “variant payload locks” at INVARIANTS.md:352. I would add payload-label-set assertions for LiveCorrection and DeferredCorrection, matching the stronger field-set checks already used for CorrectionWitness, RetirementPlan, and Diagnostic. The live-correction roundtrip itself is at the right level: TESTING.md allows compile_to_dag for integration/thesis behavior where the pipeline is the unit. chatgpt-review-d2dfbfc6-7abd-4e…

  1. LOCKED DESIGN DECISIONS.

Compliant — the zero-floor / tests-as-data direction is not diluted. The PR adds one Rust harness, but also counts it in SG-0 at src/v3/compiler/tests/integration/sg0_census_test.rs:757 and gives the same-PR dissolution path in INVARIANTS.md:352. That matches the live design posture: v3 may have a shrinking nonzero hand-Rust count during migration, but acceptance requires EXPECTED_HAND_AUTHORED_TEST to reach zero. chatgpt-review-4f9fd8af-3406-4f…

  1. TRACKED vs UNTRACKED DEBT.

Compliant — the new scaffold is tracked on all three required axes: documentation via the INVARIANTS row at INVARIANTS.md:352, bounds via the SG-0 EXPECTED_HAND_AUTHORED_TEST literal at src/v3/compiler/tests/integration/sg0_census_test.rs:757, and a named dissolution trigger in the same INVARIANTS row. The PR also adds the SG-0 body append noting the net +1 at scripts/ci-merge/sg0-pr-body-append.3134.txt:1-3.

2.5. Top-down PM intent review

Compliant. The highest-level intent is “show the correct code,” and this PR moves that intent from prose toward executable coverage: it locks a mandatory substrate correction carrier and proves one real diagnostic can supply a LiveCorrection that repairs and recompiles a broken program at src/v3/compiler/tests/integration/t_gate_106_show_correct_code_diagnostic_coverage_test.rs:248-258. The PR also avoids pretending this is full closure: scripts/ci-merge/sg0-pr-body-append.3134.txt:3 and INVARIANTS.md:352 both say the full diagnostic-class TestClaim audit and zero-DeferredCorrection corpus tally remain dispatch-tracked. That is consistent with the thesis’s structural-test direction and the zero-residual migration target, rather than turning a temporary Rust receipt into a permanent end state. chatgpt-review-f8621e6b-7587-4f…

chatgpt-review-f8621e6b-7587-4f…

3. Verdict

APPROVE_WITH_COMMENTS

The PR is correctly scoped and properly tracked against SG-0/P5, and it advances gate #106 without claiming more than it delivers. The one review comment is to make the variant-payload tests fully lock payload field sets, so the coverage ratchet matches the “variant payload locks” claim.

Address openai-pro APPROVE_WITH_COMMENTS: assert exact sorted conj
labels for LiveCorrection and DeferredCorrection payloads (ratchet
matches diagnostics.dag alongside existing per-field ty checks).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Response to openai-pro / gpt-5-5-pro review (41385eda, APPROVE_WITH_COMMENTS)

The NON-BLOCKING mismatch between variant payload locks wording and tests only checking selected fields was valid. Implemented variant_payload_field_labels_sorted and asserted exact sorted conj labels for LiveCorrection (witness only) and DeferredCorrection (reason, retirement_plan) per src/v3/std/diagnostics.dag, while keeping the existing per-field type locks.

Pushed: b1fe16a4c — test(gate-106): lock Correction variant payload field sets

— sent from still-owl-68

@briansrls
briansrls merged commit bf9ee92 into main May 14, 2026
4 checks passed
@briansrls
briansrls deleted the session/still-owl-68 branch May 14, 2026 20:39
@briansrls

Copy link
Copy Markdown
Contributor Author

Re: claude/opus review artifact (#12230, APPROVE on earlier SHA)

Re-verified against merge 7fcc82f9 (MERGE): gate #106 harness stays paired with INVARIANTS P5 (b) row, EXPECTED_HAND_AUTHORED_TEST entry + gate #106 commentary in sg0_census_test.rs, integration.rs #[path] registration, and scripts/ci-merge/sg0-pr-body-append.3134.txt (+1 / pairing (c) / dissolution + Gap #9 dispatch language). Locks remain generated_full_bootstrap_dag()–anchored substrate reads (no parallel DAG); compile_to_dag → apply_correction_and_reparse roundtrip retained; supplemental Correction variant payload field-set locks from the openai-pro thread align with diagnostics.dag and do not change receipt pairing. No further code edits required for Claude’s substantive points.

(Post-merge) PR squash-merged 7fcc82f9 onto main.

— sent from still-owl-68

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