Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e4d008d
WIP: R3 gate #6: lens testgen dot rs retired
briansrls May 9, 2026
c689da7
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
fa836d3
fix(v3): list lens_testgen_body.txt in stage0 hand_maintained_src (P2)
briansrls May 9, 2026
0ce170d
fix(v3): lens_producer census counts testgen body fragment (P5)
briansrls May 9, 2026
3c861b7
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
d5e24b1
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
be3cd18
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
635210a
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
9cc876d
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
21f663a
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
09cb05d
fix(docs): R4-carve supersession marker on TC3 brief line (CI)
briansrls May 9, 2026
53fe4f7
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
fe3bf98
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
7ee0dc8
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
058732e
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
016cdb6
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
84a9adc
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
514aa9a
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
f75bfb4
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
9fdcacb
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
58734b0
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
0874bb7
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
2992f7e
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 9, 2026
6545017
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
375a9db
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
5a0d971
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
591366d
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
360c826
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
a848e70
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
cfffa21
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
982b07d
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
d60a8d4
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
3383d00
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
24f13ce
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
49f9a82
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
25cc9d6
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
7cef683
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
24aabfa
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
76b37fc
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
4c8e4d9
Merge origin/main into session/wise-crane-831
briansrls May 10, 2026
50029ea
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
54357fd
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
3f595c9
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
78e60d7
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
fb6dd8d
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
bf672a7
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
0ab30cb
Merge remote-tracking branch 'origin/main' into session/wise-crane-831
briansrls May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dsl/gunbc/compiler.dag
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ data stage0: GeneratedCrate = {
"python_target.rs",
"rust_target.rs",
"infer.rs",
"lens_testgen.rs",
// R3 gate #6: `lens_testgen.rs` retired — body is this hand-authored include fragment
// (`lens_apply.rs` `include!`). Must stay in `hand_maintained_src` so stage0 recursive
// freshness diff does not treat it as generated drift (P2 boundary discipline).
"lens_testgen_body.txt",
"lib.rs",
"lower.rs",
"pipeline_authority.rs",
Expand Down
7 changes: 7 additions & 0 deletions src/v3/compiler/src/lens_apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2822,4 +2822,11 @@ fn get_x(point: Point) -> Int = point.x
}
}

// R3 gate #6 (`lens_testgen_dot_rs_retired`): the standalone `lens_testgen.rs` file is removed
// from SG-0 hand-Rust census; this nested module preserves the stable `v3_compiler::lens_testgen`
// surface (re-exported from `lib.rs`) until PB-Runtime owns testgen end-to-end.
pub mod lens_testgen {
include!("lens_testgen_body.txt");

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: Including a hand-maintained source-dir fragment without carrying lens_testgen_body.txt into compiler.dag::stage0.hand_maintained_src makes the recursive stage0 freshness diff treat it as generated drift, violating P2 boundary discipline.

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.

Verified: `lens_testgen_body.txt` was missing from `dsl/gunbc/compiler.dag` → `stage0.hand_maintained_src`. Added it (ASCII-sorted next to `infer.rs`) with a short P2/stage0-freshness note in fa836d3.

}

pub use substrate_reflection::reflect_behavior_list;
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// R3 gate #6 (`lens_testgen_dot_rs_retired`): former `lens_testgen.rs` body, included from `lens_apply.rs`.
// Dissolution trigger: PB-Runtime `.dag` testgen authority owns this logic end-to-end; delete this
// fragment and the `pub mod lens_testgen` wrapper, then drop the path from
// `EXPECTED_HAND_AUTHORED_FRAGMENTS` in `sg0_census_test.rs`.

use crate::dag::{
AtomPayload, Dag, Declaration, DeclarationId, Field, FieldValue, LiteralBits, TypeConnective,
};
Expand Down
2 changes: 1 addition & 1 deletion src/v3/compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3755,7 +3755,7 @@ mod int_literal_ranges;
/// T-LensAPI D1: bounded lens interpreter over substrate-shaped [`FieldValue`]
/// (see module docs in `lens_apply.rs`).
pub mod lens_apply;
pub mod lens_testgen;
pub use lens_apply::lens_testgen;

/// Effect-enumeration lens. Authority lives in
/// `src/v3/lenses/effect_enumeration.dag`; the Rust projection is
Expand Down
13 changes: 11 additions & 2 deletions src/v3/compiler/src/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3628,10 +3628,19 @@ impl<'a> TestRunner<'a> {
) {
return ClaimResult::Fail(reason);
}
let entries = match sg0_census_list_entries(&list_constant_name) {
let mut entries = match sg0_census_list_entries(&list_constant_name) {
Ok(entries) => entries,
Err(reason) => return ClaimResult::Fail(reason),
};
// Gate #6: `lens_testgen.rs` retired into `lens_testgen_body.txt` (SG-0 fragment
// ratchet). The lens-producer census must still count that surface until `.dag`
// dissolution removes it (PB review #2392 — P5 progress-is-dissolution).
if list_constant_name == "expected_hand_authored_non_test" {
match sg0_census_list_entries("expected_hand_authored_fragments") {
Ok(fragments) => entries.extend(fragments),
Err(reason) => return ClaimResult::Fail(reason),
}
}
let count = entries
.iter()
.filter(|path| is_lens_producer_census_path(path))
Expand Down Expand Up @@ -4954,7 +4963,7 @@ fn is_lens_producer_census_path(path: &str) -> bool {
matches!(
path,
"src/v3/compiler/src/lens_apply.rs"
| "src/v3/compiler/src/lens_testgen.rs"
| "src/v3/compiler/src/lens_testgen_body.txt"
| "src/v3/compiler/src/bin/regen_lens.rs"
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/v3/compiler/tests/integration/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ impl RustcHarness {
// and m1_5_testgen_test — and m1_5 had already drifted to the weaker
// "only check MissingCost, don't validate sign" shape. These helpers
// are the single expression of the fixture-side invariant: all three
// test consumers route through them, and lens_testgen's own Option-
// returning variant in `src/v3/compiler/src/lens_testgen.rs:bind_cost_of`
// test consumers route through them, and lens testgen's own Option-
// returning variant in `src/v3/compiler/src/lens_testgen_body.txt:bind_cost_of`
// uses the same two panic paths (it diverges only in treating
// "bind not found" as `None` instead of panic, which is a legitimate
// API-shape difference, not an interpretation difference).
Expand Down
7 changes: 4 additions & 3 deletions src/v3/compiler/tests/integration/sg0_census_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ const EXPECTED_HAND_AUTHORED_NON_TEST: &[&str] = &[
"src/v3/compiler/src/int_literal_ranges.rs",
"src/v3/compiler/src/lens_apply.rs",
"src/v3/compiler/src/lens_t_las_carrier.rs",
// T-PB-A: `lens_depth.rs` retired — unused observational lens (no in-tree consumer).
"src/v3/compiler/src/lens_testgen.rs",
"src/v3/compiler/src/lib.rs",
"src/v3/compiler/src/lower.rs",
// R3 gate #94: cost-lens memory-peak compose + enforcement authority (ties `dominant`/max_path).
Expand Down Expand Up @@ -635,7 +633,10 @@ const EXPECTED_HAND_AUTHORED_TEST: &[&str] = &[
// itself `foo.txt` would silently escape the ratchet otherwise.
// Every entry here names a dissolution trigger in its own file header.
// Sorted; one path per line, relative to the workspace root.
const EXPECTED_HAND_AUTHORED_FRAGMENTS: &[&str] = &["src/v3/compiler/parse_parser_body.txt"];
const EXPECTED_HAND_AUTHORED_FRAGMENTS: &[&str] = &[
"src/v3/compiler/parse_parser_body.txt",
"src/v3/compiler/src/lens_testgen_body.txt",
];

// Non-`.rs` files under `src/v3/compiler/` whose content is produced
// by a named generator (an `#[ignore]`'d refresh test, a `regen_*`
Expand Down
Loading