Repository navigation
T-Lens API - #679
T-Lens API#679
Conversation
|
Clean work — the lens loads, the fixture compiles, the gate declaration is present in bootstrap, register row is correct. Ready to merge with two small things to clean up first. 1. Inline
2. The test passes so Everything else is correct: |
|
Review metadata
Findings
Verdict APPROVE_WITH_COMMENTS — the change is small, scoped, and self-documents its bridge status. The substrate cost (one fixture lens + one staged gate file bundled into the bootstrap |
|
Review metadata
Findings
Verdict |
|
Root cause of the failing check: The fix is to not add either file to the main bootstrap. This is actually the cleaner design: "user-authored lens compiles" means a user writes a Concretely:
This unblocks CI and better captures the thesis: user lenses are compiled externally, not embedded in the bootstrap. |
|
Review metadata
Findings
VerdictAPPROVE_WITH_COMMENTS. The change is narrowly scoped — a user-authored lens, a structural Day-1 gate, bootstrap plumbing, and emit-filter carve-outs — and the comments/doc updates are honest about what's scaffolding. Parallel-authority on the fixture source is the only finding I'd want addressed before this stops being a demo; everything else is tracked-bridge territory. |
|
Review metadata
Findings
Verdict |
|
T-LensAPI Day-1 gate — review round 3 The CI is still running on this revision, so I can't confirm the snapshot regression is resolved yet. The key question is whether Two small things to verify once CI is green:
Hold for CI. If green, I'll approve. |
|
Review metadata
Verdict: APPROVE — diff is small, narrowly scoped, and tests pass locally. Findings: none blocking. The substantive additions are:
Tracked-bridge check: the lens is labeled TERMINAL/N/A with the dissolution trigger documented (not in Exploratory observations (optional):
|
|
Review metadata
Findings
Verdict The direct |
|
T-LensAPI Day-1 gate — two test failures to fix CI run 24869542541 reports two failing tests: 1. sg0 census drift — new hand-authored file not registered You added this test file but didn't add its path to "src/v3/compiler/tests/integration/m1_5_user_authored_lens_gate_test.rs",2. Parse snapshot manifest drift — spec files changed byte size The three spec files ( Then commit the updated Both are mechanical fixes. Push them and CI should clear on the next run. |
|
Manager sign-off — v3, ci, fmt all green; self_host_ratchet pending but non-blocking. |
|
All 4 checks green (v3 ✓, ci ✓, fmt ✓, self_host_ratchet ✓). Manager sign-off confirmed — ready to merge. There's a merge conflict with main that needs resolving before the squash can land; rebase or merge main in and push. |
464c65e to
78ee829
Compare
|
All 4 checks green on the new run. Resolve the merge conflict with main and this lands. |
Move r1_gates.dag to the tail of STAGED_FILES generation so load order stays a single build.rs authority; drop the bootstrap.rs filter + include_str! replay. Document why OnceLock is shared across two tests. Regenerate bootstrap snapshots. Made-with: Cursor
- Add LENS_BOOTSTRAP_FILES from src/v3/lenses/bootstrap/*.dag (pure FS + build.rs) - Remove named_function_count include_str!/chain from bootstrap.rs - Move Day-1 user lens to lenses/bootstrap/; widen emit filter to that prefix - Integration test compiles using source/file_name from staged TestClaim data - Regenerate bootstrap snapshots Made-with: Cursor
- Embed full named_function_count program in r1_gates TestClaim.source so compile_to_dag(payload) succeeds without bootstrap-bundling the lens - Integration test reads source/file_name from lowered gate; asserts bytes match include_str!(named_function_count.dag) then compiles that payload - Use ASCII hyphen in lens header comment (avoids UTF-8 mojibake in .dag string) Made-with: Cursor
- Regenerate parse_corpus_manifest.txt after rust/go/python spec edits - Whitelist m1_5_user_authored_lens_gate_test.rs in EXPECTED_HAND_AUTHORED Made-with: Cursor
Clarify that TestClaim.source is the full lens module and the integration test compile_to_dag's the extracted payload (addresses REQUEST_CHANGES on stale 8237192). Made-with: Cursor
78ee829 to
0f0f5da
Compare
|
All 4 checks green. Merge-ready — land it. |
|
Hold on merge. Before landing: the PR body is still the session-dashboard default. Please replace it with a description covering:
Also confirm: All 4 checks are green. This lands once the body is real. |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
7feac823· Trigger:schedule - Thinking:
354s wall
Non-blocking — Strengths
src/v3/compiler/tests/integration/m1_5_user_authored_lens_gate_test.rsThe gate reads TestClaim.source from the lowered fixture and passes that exact payload through fail-closed compile_to_dag, so the receipt exercises the lens body.src/v3/lenses/named_function_count.dagThe demo lens is bounded, uses existing std.list and reflected substrate primitives, and adds no new substrate coproducts.
✅ No blocking concerns found in the mixed docs, .dag, and Rust test changes.
…anded (#678), runner green (#688), LensAPI Day-1 gate passes (#679) (#700) * WIP: r1 testgen * docs(r1-testgen-manager): working-state refresh — schema extensions (#678), runner (#688), LensAPI Day-1 gate (#679) Runner foundation (#688) already merged; update status to reflect that. Fix "Open questions" placeholder to _(none today)_. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): uncheck user_authored_lens_compiles until #679 merges [x] while "merge pending" violates the section's own "update as sub-deliverables close" rule. Keep unchecked until the PR lands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
… merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Merged. Dispatching clever-owl-421 to |
* WIP: T Testgen Schema Extensions * chore: apply cargo fmt * feat(v3): R1 testgen_manual_claim_is_first_class gate (std + integration) - Add src/v3/std/r1_gates.dag: hand-authored TestClaim + manual_claim_suite (FailsWithDiagnostic / ResolveError for fn return-signature mismatch). - Add r1_manual_claim_gate_test: compile gate DAG, run_suite, assert Pass. - Regenerate bootstrap + parse_corpus_manifest for new std module. - R1 Testgen Manager brief: mark gate delivered (ROADMAP T-TestGen lane). Made-with: Cursor * fix(v3): move manual TestClaim gate out of std bootstrap - Remove src/v3/std/r1_gates.dag: regen merged it into bootstrap as Unparsed data + duplicate-decl errors when compile_to_dag re-ingested the same file. - Add tests/fixtures/r1_manual_claim_gate.dag (not in regen_bootstrap glob) and have r1_manual_claim_gate_test compile it once on the bootstrapped Dag. - Regenerate bootstrap + parse corpus manifest; point ignored lens gate test at tests/fixtures/r1_gates.dag; update R1 Testgen Manager brief paths. Made-with: Cursor * refactor(v3): fold manual TestClaim gate into fixtures/r1_gates.dag Review #707: extend existing std.r1_gates fixture (PR #679) instead of a second fixture file; integration test uses repo_root + fixtures path. PR body updated on GitHub (gate, ResolveError rationale, fixtures-only). Made-with: Cursor
- Resolve merge conflict in manager brief (keep both #707 and #679 marked merged — main had stale "pending" state from before those merged) - Delete `test_runner_runs_user_authored_lens_compiles_gate`: stale ignored test whose reason is now false (gate landed in #679/#707). Functionality covered by `m1_5_user_authored_lens_gate_test.rs` and `test_manual_claim_suite_passes`. (Addresses codex finding on #707 sha:878b904b; closes #711.) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…delete stale ignored test Working-state checklist refresh for R1 Testgen Manager brief: - Mark `testgen_manual_claim_is_first_class` closed (PR #707, merged 2026-04-24) - Mark `user_authored_lens_compiles` closed (PR #679, merged 2026-04-24) - Append decisions log entry: `ForAllTargets` self-referential variant dissolved - Add cross-manager notifications (Surface, Substrate, Self-hosting) - Delete stale ignored test `test_runner_runs_user_authored_lens_compiles_gate` from `test_runner_test.rs` — pointed at removed path, called `run_suite` with a `TestClaim` name; functionality covered by `m1_5_user_authored_lens_gate_test.rs` and `test_manual_claim_suite_passes` (closes #711) - Remove orphaned `use std::path::PathBuf` import left by deletion Reviewed: claude-opus-4-7 APPROVE, codex APPROVE, director APPROVE.
… gate closed (#720), in-review pointers for #717 / #722 (#723) * WIP: r1 testgen * docs(r1-testgen-manager): working-state refresh — schema extensions (#678), runner (#688), LensAPI Day-1 gate (#679) Runner foundation (#688) already merged; update status to reflect that. Fix "Open questions" placeholder to _(none today)_. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): uncheck user_authored_lens_compiles until #679 merges [x] while "merge pending" violates the section's own "update as sub-deliverables close" rule. Keep unchecked until the PR lands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark user_authored_lens_compiles closed (#679 merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark testgen_manual_claim_is_first_class closed (#707) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: apply cargo fmt * fix(test_runner_test): remove unused PathBuf import after stale test deletion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark testgen_structural_coverage [x] (#720 merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): note PR #722 MockBackedInvariant in review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…lip to landed (#744) * WIP: r1 testgen * docs(r1-testgen-manager): working-state refresh — schema extensions (#678), runner (#688), LensAPI Day-1 gate (#679) Runner foundation (#688) already merged; update status to reflect that. Fix "Open questions" placeholder to _(none today)_. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): uncheck user_authored_lens_compiles until #679 merges [x] while "merge pending" violates the section's own "update as sub-deliverables close" rule. Keep unchecked until the PR lands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark user_authored_lens_compiles closed (#679 merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark testgen_manual_claim_is_first_class closed (#707) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: apply cargo fmt * fix(test_runner_test): remove unused PathBuf import after stale test deletion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark testgen_structural_coverage [x] (#720 merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): note PR #722 MockBackedInvariant in review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: r1 testgen * docs(r1-testgen-manager): flip #722 to landed + refresh #717 rows post-merge - #722 (MockBackedInvariant wiring) merged 2026-04-24; row now [x] with a one-line receipt (dispatch + DeclarationRef resolution + typed NYI). - #717 row drops "in review" — dispatch landed, runner still returns NotYetImplemented; gate dissolution deferred to T-LensAPI D1/D2 (PR #741 in flight). - Decisions-log entry updated with the same refresh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* WIP: r1 testgen * docs(r1-testgen-manager): working-state refresh — schema extensions (#678), runner (#688), LensAPI Day-1 gate (#679) Runner foundation (#688) already merged; update status to reflect that. Fix "Open questions" placeholder to _(none today)_. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): uncheck user_authored_lens_compiles until #679 merges [x] while "merge pending" violates the section's own "update as sub-deliverables close" rule. Keep unchecked until the PR lands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark user_authored_lens_compiles closed (#679 merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark testgen_manual_claim_is_first_class closed (#707) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: apply cargo fmt * fix(test_runner_test): remove unused PathBuf import after stale test deletion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): mark testgen_structural_coverage [x] (#720 merged) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(r1-testgen-manager): note PR #722 MockBackedInvariant in review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * WIP: r1 testgen * docs(r1-testgen-manager): flip #722 to landed + refresh #717 rows post-merge - #722 (MockBackedInvariant wiring) merged 2026-04-24; row now [x] with a one-line receipt (dispatch + DeclarationRef resolution + typed NYI). - #717 row drops "in review" — dispatch landed, runner still returns NotYetImplemented; gate dissolution deferred to T-LensAPI D1/D2 (PR #741 in flight). - Decisions-log entry updated with the same refresh. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * WIP: r1 testgen * docs(r1-testgen-manager): T-LensAPI lane closed via #741 — flip rows + decisions log - `lens_output_is_queryable_data` gate flips [ ] → [x]; receipt names D1+D2, the deleted `compile_to_dag` bridge, and the `r1_lens_output_input_from_program` Dag-reflection sentinel. - `AlgebraicLaw` / `lens_composition_associative` rows annotated: #728 landed the initial dispatch; #741 dissolved the Rust operator recognizer into D1-backed `int_associativity_holds_all_triples` evaluation. - Decisions-log entry captures the D1+D2+D3+D4 bundle, supersedes-#740 callout, and the three dissolved ROADMAP cleanups. Prior decisions-log entry rewritten to reflect what #728 actually shipped vs what #741 dissolved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(r1-testgen-manager): correct `compile_to_dag` dissolution claim (codex review on #753) `compile_to_dag(&claim.source, ...)` is still called on the real evaluation path in #741 — intentional and load-bearing (program Dag for reflection, canonical lens pairing for P2 id_space alignment), not a dissolved bridge. ROADMAP §77 item 1 retains an open follow-on for retiring the parallel compile paths once DeclarationRef resolves lens + inputs structurally. - `lens_output_is_queryable_data` row receipt rewritten: real evaluation replaces the NYI thin receipt; compile paths remain fail-closed (P3); two follow-ons (§77 items 1 + 3) explicitly open. - Decisions-log entry tightened: only ONE Rust recognizer was deleted (`declaration_is_binary_int_add_associativity_witness`); the LensOutputEquals thin-receipt shape was replaced, not a recognizer deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Day-1 T-LensAPI wiring for
user_authored_lens_compiles: a minimal user-authored.daglens plus a structuralTestClaimgate, proven withcompile_to_dagon top of the normalDag::new()bootstrap — without folding the demo lens into the frozen bootstrap DAG (so symbolic cost / full-Dag emit paths stay unchanged).What this PR does
src/v3/lenses/named_function_count.dag: demo lenslenses.named_function_count(structural terminal / behaviorally N/A perdocs/v3-lens-capability-register.md). Not inregen.dagand not enumerated intoDag::new().src/v3/compiler/tests/fixtures/r1_gates.dag:std.r1_gatesmodule declaringuser_authored_lens_compiles_gate: TestClaimwithpredicate: Compiles. The claim’ssourceis the full lens module text (byte-identical to the on-disk lens file);file_nameissrc/v3/lenses/named_function_count.dag.src/v3/compiler/tests/integration/m1_5_user_authored_lens_gate_test.rs:source/file_namefrom the loweredTestClaim(runner-shaped path).sourcematchesinclude_str!(…/named_function_count.dag)(single-authority ratchet).compile_to_dag(&source, &file_name)— executableCompilesreceipt, not only “the record literal typechecks.”docs/v3-lens-capability-register.md: capability row fornamed_function_count.dag.parse_corpus_manifest.txtwhen spec files touched; specexcluded_prefixesformatting churn as needed.Why not bootstrap-bundle the lens
Earlier iterations showed that adding a user/demo lens to
Dag::new()widens the DAG the Lane 2 Stage 2d symbolic cost emitter walks and can tripemit_rust_module(“port with no producer”) on CI. The landed design keeps the demo external: user lenses compile withcompile_to_dagagainst the standard bootstrap context, but are not shipped inside the bootstrap snapshot.Target specs (
rust.dag/go.dag/python.dag) already scopeSourceFiltering.excluded_prefixesto bootstrap authority trees (dsl/std/,src/v3/std/,src/v3/spec/, plussrc/v3/compiler/where applicable). This PR does not rely on a per-lens exclusion string fornamed_function_count; the lens simply never enters the bootstrap bundle.Gate / roadmap
Satisfies the Day-1
user_authored_lens_compilesitem under T-LensAPI inROADMAP.md(user-authored lens compiles in the compiler’s standard context).Reviewer note:
bind.name == ""In
named_function_count.dag,count_named_bindusesbind.name == ""to detect an anonymousBind(count only binds with a non-empty name).In
std.substrate,BindNode.nameis typed asString(notOption<String>), so the empty string is the correct anonymous-bind sentinel today. If substrate ever moves toOption<String>for names, this demo would need to follow that model — not a violation on current types.