Skip to content

R1 Census Close - #763

Merged
briansrls merged 11 commits into
mainfrom
session/merry-moth-13
Apr 25, 2026
Merged

briansrls merged 11 commits into
mainfrom
session/merry-moth-13

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Opened from session-dashboard for session merry-moth-13.

@briansrls

Copy link
Copy Markdown
Contributor Author

Director draft review — APPROVE direction, two observations.

Lane B (R1 Census Close) first slice is well-scoped and captures the right cross-manager signals.

What's right

SG-0 NON_TEST census −1: lens_depth.rs retired. Reading the file's own header ("Second observational lens. Purpose: validate the v3 success bar empirically — a new observational lens over the substrate should land in tens of lines with zero substrate modifications"), this was a validation experiment for the M0 success bar, not a production lens. Outright deletion is the right move — there's no production consumer to migrate. CI L-8 scope adjustment is correct (the exclusion is no longer needed).

SG-0 TEST census −1: t_pb_b_1_tests_dag_smoke_test.rs retired. This is the first slice of pre-Rust-deletion checklist item (4) per r1-testgen-manager.md. The brief edit captures the sign-off in exactly the format the checklist requires: explicit #[test] → TestClaim mapping in the Decisions log, with stronger-coverage verification (runner test evaluates ClaimResult::Pass for every claim in each suite, where the deleted test only checked compile_to_dag cleanly).

Bundled discipline. Two reductions + brief refresh + supporting cleanup in one PR — matches the bundling-over-fragmentation pattern. Easier to review as a single coherent unit than four separate PRs.

Two observations

1. Brief edit by worker, not manager.
Testgen manager session is archived. Worker authoring the testgen brief refresh as part of Lane B work is the right pattern given no standing manager — captures the item (4) sign-off where it needs to live (single-source checklist in testgen brief). No conflict with established convention; just naming the pattern explicitly so future readers see it as deliberate not accidental.

2. Pace expectation for full Lane B close.
Two deletions per PR is a sustainable per-iteration unit. SG-0 NON_TEST floor target is ≤5 (or 2-3 per PR #756); current floor likely ~30+ pre-this-PR. At ~2 per PR, that's ~10-15 PRs to floor. Not a complaint — just naming the cadence so we don't expect Lane B to close in 1-2 sweeps. The fill-queue model handles this fine.

Minor flag

The brief refresh adds a 2026-04-25 decision log entry but main is dated 2026-04-24. If today is still 2026-04-24, that's a date-stamp typo. Worth checking before flipping to ready.

Otherwise green from here. Flip to ready when you want auto-reviews; expect them to land cleanly.

@briansrls
briansrls marked this pull request as ready for review April 24, 2026 23:38
- Use 2026-04-24 for Lane B sign-off entries (was 2026-04-25).
- Disambiguate two same-day Decisions log bullets: (Lane B / #763) vs (PR #751).

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

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

Verdict: APPROVE — diff is purely retirement work and the receipts line up.

Two coordinated retirements, well-grounded:

  1. lens_depth.rs removed. Unused observational lens — no in-tree consumer. All wiring is consistently updated: dsl/gunbc/compiler.dag GeneratedCrate filelist, lib.rs mod line, sg0_census_test.rs EXPECTED_HAND_AUTHORED_NON_TEST, the L-8 invariant scope (docs/invariants/l-8-...md), and the L-8 CI scanner (.github/workflows/ci.yml drops the grep -v lens_depth.rs carve-out). Remaining lens_depth mentions are in historical/design docs (docs/history/..., docs/lens-library-design.md, M1_DESIGN.md, etc.) — those are appropriately retrospective and not broken references.

  2. t_pb_b_1_tests_dag_smoke_test.rs removed. The deleted file's three #[test]s each have a strictly-stronger runner counterpart in t_pb_b_1_dag_runner_test.rs (*_suite_passes_through_runner, asserting ClaimResult::Pass for every claim — same include_str! .dag sources). tests/integration.rs, sg0_census_test.rs, and the four briefs (r1-selfhosting-manager.md, r1-testgen-manager.md, t-pb-b-1.md, t-pb-b-brief-d.md) are updated coherently; the Decisions log entry on 2026-04-25 names each #[test] → TestClaim mapping, satisfying the four-point Testgen guard for this slice. The compile-smoke caveat is correctly narrowed to the Brief D .v3 path.

No INVARIANTS / modeling / CODING / TESTING violations observed in the diff. This is a clean dissolution of redundant scaffolding with named, satisfied dissolution triggers.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: d6a03928 · Trigger: schedule
  • Thinking: 152s wall

Findings

  • BLOCKING src/v3/compiler/tests/integration/t_pb_b_1_tests_dag_smoke_test.rs:20: deleting this removes the only assertion that the outer tests/dag/*.dag modules lower with empty diagnostics. The replacement is described as “strictly stronger” in docs/briefs/r1-testgen-manager.md:249, but runner evaluation is not the same claim: it proves embedded TestClaim.source behavior, not that the declaring .dag harness has no diagnostics. This weakens TESTING.md’s behavior coverage and the fail-closed compile-boundary receipt. Add the empty-diagnostics assertion to the runner test helper or keep the smoke coverage.
  • NON-BLOCKING docs/briefs/r1-testgen-manager.md:243: this adds a future-dated “2026-04-25” decision log entry while the review date is 2026-04-24. Since the docs are being used as live coordination state, this violates the “Documentation Describes Live State” discipline; record the actual landed/sign-off date or keep it as pending.

Verdict: REQUEST_CHANGES. The code deletion is close, but the replacement coverage is not actually equivalent to the removed diagnostic check.

Codex #763: deleting compile-smoke removed the only assertion that
declaring tests/dag/*.dag modules lower with empty module diagnostics.
lower() now asserts dag.diagnostics().is_empty() before run_suite.

Docs: replace 'strictly stronger' framing with explicit split — empty
outer harness diagnostics (same retired smoke) vs embedded TestClaim
evaluation. Sync t-pb-b-1 + tests/dag README; non-blocking date issue
already fixed on branch (2026-04-24).

Made-with: Cursor

@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: 0b001c14 · Trigger: schedule
  • Thinking: 232s wall

BLOCKING (1)

Root Cause

  • src/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs runner harness treats run_suite pass as subsuming wrapper-module diagnostic cleanliness → assert dag.diagnostics().is_empty() in the runner load helper before retiring the smoke.

⚠️ One small test-harness fix would make the deletion match the documented replacement claim.

Comment thread docs/briefs/r1-testgen-manager.md Outdated
`test_runner_data_bodies_reject_requires_empty_call_today`); PR #735
merged on main (`cf59f2288` — `CostBounded` witness for the candidate
claims is stable). **Deleted Rust tests** (file
`t_pb_b_1_tests_dag_smoke_test.rs` removed) and **replacement** (strictly

This comment was marked as resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6a03928ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 138 to 140
#[path = "integration/t_pb_b_1_dag_runner_test.rs"]
mod t_pb_b_1_dag_runner_test;
#[path = "integration/t_pb_b_1_tests_dag_smoke_test.rs"]
mod t_pb_b_1_tests_dag_smoke_test;
#[path = "integration/t_pb_b_brief_d_fixture_smoke_test.rs"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore diagnostics-empty gate for landed .dag fixtures

Removing t_pb_b_1_tests_dag_smoke_test drops the only check that each landed src/v3/compiler/tests/dag/*.dag module lowers with empty module diagnostics. The remaining t_pb_b_1_dag_runner_test path is not equivalent because its lower helper accepts Err(CompileError::Semantic(dag)), and run_suite does not assert dag.diagnostics().is_empty(), so semantic errors outside the exercised claims can now slip through while all three runner tests still pass.

Useful? React with 👍 / 👎.

…review)

Review concern: match on Semantic looked like accepting errors without a
compile-clean check. In reality compile_to_dag only returns Ok when
diagnostics are empty; Semantic implies non-empty diagnostics.

lower() now returns only on Ok and panics on Err(Semantic) with
diagnostics, making the empty-harness guarantee explicit and matching
the retired smoke test.

Made-with: Cursor
Restores a grep-visible compile-smoke receipt on the Ok path; Semantic
still panics. Complements the Ok-only contract from compile_to_dag.

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 13a406c5 · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR closes two small “census close” loops by deleting redundant implementation/test surfaces and tightening the ratchets that used to accommodate them. On the lens side, it retires the hand-written lens_depth.rs observational lens whose public API returned a primitive usize carrier (src/v3/compiler/src/lens_depth.rs:39), removes it from the generated crate file list (dsl/gunbc/compiler.dag:92) and public module exports (src/v3/compiler/src/lib.rs:40), then removes the CI carve-out so every remaining src/v3/compiler/src/lens_*.rs file is scanned for collapsed primitive-returning wrappers (.github/workflows/ci.yml:239-242).

On the test side, it deletes the standalone t_pb_b_1_tests_dag_smoke_test.rs registration and file (src/v3/compiler/tests/integration.rs:140-141, src/v3/compiler/tests/integration/t_pb_b_1_tests_dag_smoke_test.rs:1-50), but preserves that smoke test’s actual receipt by adding the empty-module-diagnostics assertion into t_pb_b_1_dag_runner_test::lower before runner evaluation (src/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs:25-31). The docs, README, and census test are then aligned around the new shape: the runner-backed test is the single landed .dag host, the deleted smoke file is marked redundant, and the remaining Rust-deletion inventory stays gated by Testgen sign-off (docs/briefs/r1-testgen-manager.md:254-268).

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — this does not change Dag-resident substrate types, dag.rs, cross-pass carriers, or new variants. The only .dag change is implementation-manifest cleanup: removing "lens_depth.rs" from the generated crate list at dsl/gunbc/compiler.dag:92.

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

Compliant — P3/L-8 fail-closed typed-carrier discipline is strengthened, not weakened: the old primitive-returning lens API is deleted (src/v3/compiler/src/lens_depth.rs:39), and the CI scope now scans every lens_*.rs file without a lens_depth.rs exception (.github/workflows/ci.yml:239-242). The test-runner path also stays fail-closed by asserting that each outer .dag harness has no module diagnostics before evaluating embedded TestClaim predicates (src/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs:25-31).

  1. CODING.md.

Compliant — the PR removes a method/object-style DepthLens<'a> surface rather than adding one (src/v3/compiler/src/lens_depth.rs:24-39), and the only added Rust behavior is a small local free-function helper with explicit source/file inputs and a direct output Dag (src/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs:20-31). No new production impurity or hidden dependency is introduced.

  1. TESTING.md.

Compliant — the redundant compile-only smoke file is deleted only after its actual behavioral receipt is folded into the runner-backed integration path: lower preserves the empty outer-harness diagnostics check (src/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs:25-31), while the Testgen decision log maps each deleted #[test] to the corresponding runner suite/claim coverage (docs/briefs/r1-testgen-manager.md:254-265). This is a net consolidation of duplicate integration coverage, not a silent test deletion.

  1. LOCKED DESIGN DECISIONS.

N/A — I do not see a locked thesis/design decision being altered. The invariant-doc edit narrows an obsolete L-8 exception by stating that lens_depth.rs is retired and no .dag migration carve-out remains (docs/invariants/l-8-lens-rust-surfaces-preserve-typed-failure-carriers.md:57-59).

  1. TRACKED vs UNTRACKED DEBT.

Compliant — no new scaffold or TODO is introduced. The remaining Rust-deletion work is explicitly bounded and tracked: the docs say the rest of the inventory remains open until a follow-on sign-off entry lands (docs/briefs/r1-testgen-manager.md:119-123), and the decision log names the remaining slice plus the dissolution trigger: a separate log entry must name each #[test] → TestClaim pair (docs/briefs/r1-testgen-manager.md:265-268).

3. Verdict

APPROVE

I did not find a diff-line-supported invariant violation. The PR removes an obsolete primitive-returning lens carve-out, preserves the deleted smoke test’s actual receipt inside the runner path, and keeps the remaining deletion work tracked rather than pretending the broader inventory is done.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 48d041e3 · Trigger: schedule
  • Thinking: 61s wall

Findings: None blocking. The change is narrowly scoped: retire one unused observational lens (lens_depth.rs) and one redundant compile-smoke test (t_pb_b_1_tests_dag_smoke_test.rs), with the receipt rolled into t_pb_b_1_dag_runner_test::lower. CI L-8 carve-out and compiler.dag GeneratedCrate listing are updated coherently. The retirement is a documented, bounded, named-trigger dissolution (Testgen Decisions log 2026-04-24 + per-#[test] mapping), so it sits cleanly within the tracked-debt rule.

Verdict: APPROVE — no invariant or modeling-discipline violation in the diff.

Exploratory observations (optional):

  • lower() in t_pb_b_1_dag_runner_test.rs:18-46 asserts dag.diagnostics().is_empty() inside the Ok arm. Per lib.rs:1068-1078, compile_to_dag already enforces Ok ⟺ empty diagnostics (invariant C-8), so the inner assert! is unreachable on intent. Reading the commit history this was deliberately re-added on review feedback as an explicit receipt; no objection, just flagging that a comment like // belt-and-suspenders against C-8 drift; unreachable today could spare the next reader the double-take.
  • Stale references to lens_depth survive in docs/lens-library-design.md, docs/substrate-reflection-design.md, docs/invariants/layer-opacity.md (line 204 — passing mention only), src/v3/M1_DESIGN.md:96, and src/v3/DOWNSTREAM_REQUIREMENTS.md:127,423. None are in the diff and none break correctness, but if the dissolution log entry wants a clean trail, a follow-up sweep would be cheap.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 48d041e3 · Trigger: schedule
  • Thinking: 189s wall

Findings

  • src/v3/compiler/src/lens_depth.rs:1 deletes the lens_depth module, but current-facing docs still say it ships or is migration-pending (docs/lens-library-design.md, docs/substrate-reflection-design.md, src/v3/M1_DESIGN.md, src/v3/DOWNSTREAM_REQUIREMENTS.md). That violates INVARIANTS P1 / “Documentation Describes Live State.” The PR updates the L-8 doc to say lens_depth is retired, so the remaining live docs should be aligned too.

Verdict
APPROVE_WITH_COMMENTS — the code/test changes look mechanically sound, and the narrow checks passed: cargo test -p v3-compiler t_pb_b_1_dag_runner_test and cargo test -p v3-compiler sg0_. The only concern is stale live documentation after deleting lens_depth.

- Belt-and-suspenders comment: explain redundant assert for reviewers/grep
  (api-review on 48d041e).
- Design/requirements docs: mark lens_depth M0 experiment retired; fix counts
  and migration lists (optional follow-up from same review).

History snapshots under docs/history/ left unchanged on purpose.

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 6f5cd68a · Trigger: schedule
  • Thinking: 54s wall

Verdict: APPROVE

This is a tight cleanup PR. Two retirements, both consistently propagated:

  1. lens_depth.rs deletion — unused observational lens (M0 experiment). Deletion is fully wired through lib.rs, dsl/gunbc/compiler.dag (stage0 GeneratedCrate manifest), sg0_census_test.rs (hand-authored census ratchet), CI L-8 scope (.github/workflows/ci.yml), the L-8 invariant doc, and the design docs (lens-library-design.md, substrate-reflection-design.md, layer-opacity.md, M1_DESIGN.md, DOWNSTREAM_REQUIREMENTS.md). Single-authority preserved — no orphaned references except in docs/history/*, which is correct since those are historical narratives.

  2. t_pb_b_1_tests_dag_smoke_test.rs retirement — its compile-smoke receipt is folded into t_pb_b_1_dag_runner_test::lower (with explicit dag.diagnostics().is_empty() assertion + descriptive panic on Err(Semantic)). The (4) first Rust deletion batch partial sign-off is named in the Testgen Decisions log with #[test] → TestClaim mapping, satisfying the four-point guard the briefs specify. Census, integration mod list, and all four briefs are updated coherently.

Modeling-discipline check: the lower helper now requires Ok (empty module diagnostics) and panics on Err(Semantic) — that's a strengthening over the retired smoke's Ok-or-Semantic pattern, and the comment correctly notes Ok ⟺ empty is the lib.rs invariant being doubled-up against C-8 drift. Reasonable belt-and-suspenders for a harness assertion.

No findings against the diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 6f5cd68a · Trigger: schedule
  • Thinking: 131s wall

Verdict: APPROVE

No findings. The diff retires unused lens_depth cleanly, updates the SG-0 census and stage0 manifest, and preserves the deleted compile-smoke coverage through the runner-backed test path.

Verified locally:
cargo check -p v3-compiler
cargo test -p v3-compiler --test integration t_pb_b_1 -- --nocapture
cargo test -p v3-compiler --test integration sg0_census_test -- --nocapture
L-8 wrapper grep passed.

@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: 6f5cd68a · Trigger: schedule
  • Thinking: 229s wall

Non-blocking — Strengths

  • src/v3/compiler/tests/integration/t_pb_b_1_dag_runner_test.rs The runner replacement preserves the retired smoke's compile-clean receipt while adding real TestRunner::run_suite predicate coverage.

✅ No blocking concerns; the prior deletion-coverage gap is closed.

…763)

Inline review: clarify that lower does not treat Err(Semantic) as success;
Ok arm includes explicit empty-diagnostics assert. Refutes stale 'strictly
stronger' / Semantic acceptance concern at Decisions log.

Made-with: Cursor
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

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

Verdict: APPROVE — clean close-out PR. Two tightly scoped retirements (lens_depth.rs dead module + redundant t_pb_b_1_tests_dag_smoke_test) with the doc surface, manifests, and census ratchets all updated in lockstep.

Findings: none blocking.

What I verified:

  • lens_depth.rs deletion is consistent end-to-end: lib.rs mod removed, dsl/gunbc/compiler.dag stage0.hand_maintained_src list pruned, sg0_census_test::EXPECTED_HAND_AUTHORED_NON_TEST line replaced with a retirement comment, L-8 grep no longer needs the carve-out (docs/invariants/l-8-…md:54-59, ci.yml:236-244). Grep for DepthLens|depth_of outside docs returns zero hits — no orphan consumers.
  • The compile-smoke retirement is not a coverage loss: t_pb_b_1_dag_runner_test.rs:26-46 folds the empty-module-diagnostics receipt into the lower helper, with an explicit assert!(dag.diagnostics().is_empty()) on the Ok arm and a panic! on Err(Semantic). That is actually stricter than the retired smoke (which accepted Err(Semantic) with empty diagnostics — a contradictory case in practice given lib.rs). t_pb_b_brief_d_fixture_smoke_test is correctly left on the looser pattern with a doc note.
  • The per-claim #[test] → TestClaim mapping in r1-testgen-manager.md Decisions log satisfies the four-point guard for the partial sign-off; remaining inventory (thesis_validation_test.rs, pipe_desugar.rs) is explicitly held under the same guard until a follow-on entry — meets the "tracked-debt: documented + bounded + named trigger" bar.
  • Historical docs (docs/history/*, M0_RETROSPECTIVE.md) still mention lens_depth — appropriate; those are dated narratives, not live spec.

Exploratory observations:

  • t_pb_b_1_dag_runner_test::lower:39-46 panics on Err(CompileError::Semantic(_)) even though lib.rs guarantees that branch is unreachable when diagnostics are empty. The comment acknowledges it as belt-and-suspenders against C-8 drift; that's defensible but the Err(Semantic) arm is dead in practice. If you ever want to tighten, you could collapse to dag = compile_to_dag(...).unwrap_or_else(...) + the empty-diag assert. Non-blocking — current shape preserves the named connection to the retired test for grep-ability, which is the stated intent.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: c32deed6 · Trigger: schedule
  • Thinking: 146s wall

Verdict: APPROVE

Diff is narrowly scoped and looks clean. I don’t see any concrete violations of the pinned invariants, modeling discipline, coding guidance, or test discipline.

Verified:

  • rg found no live lens_depth references outside history/docs.
  • git diff --check origin/main...HEAD passed.
  • cargo test -p v3-compiler t_pb_b_1_dag_runner_test -- --nocapture passed.
  • cargo test -p v3-compiler sg0_census_test -- --nocapture passed.

@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: c32deed6 · Trigger: schedule
  • Thinking: 444s wall

Non-blocking — Strengths

  • src/v3/compiler/src/lib.rs Retiring lens_depth removes the only public lens_*.rs primitive-returning API from the crate surface, aligning the L-8 ratchet with the current lens set.
  • docs/briefs/r1-testgen-manager.md The item (4) sign-off is bounded to the redundant T-PB-B-1 compile-smoke slice and keeps the remaining Rust-deletion inventory behind the same explicit Testgen guard.

✅ No blocking concerns; the PR closes the prior smoke-coverage gap and shrinks the Rust lens scaffold without introducing a new substrate shape.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 888baac6 · Trigger: schedule
  • Thinking: 151s wall

Verdict: APPROVE

No concrete invariant, coding, or testing violations found in this diff. I verified the changed paths with:

cargo test -p v3-compiler t_pb_b_1_dag_runner_test
cargo test -p v3-compiler sg0_census_test

@briansrls
briansrls merged commit 4d2423d into main Apr 25, 2026
4 checks passed
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