Repository navigation
R3 gate #87: lens_cementing_test_discipline_complete #2639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f0363cd
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls 7e2eba6
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls 0d3b5b8
docs(r3): promote gate #87 to CONSUMER_LANDED + PASSING
briansrls 23e4e70
test(v3): make gate #87 cost_target_realization receipt behavior-driven
briansrls 58bd298
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls 7214c67
fix(v3): INVARIANTS P5(b) in-source receipt for gate #87 integration
briansrls c00d71c
docs(r3): refresh Cluster M risk row after #86 lands on main
briansrls ec73700
Merge remote-tracking branch 'origin/main' into session/sleek-swift-736
briansrls 0fdcdfe
docs(v3): make gate #87 P5(b) module receipts merge-diff honest
briansrls 58cd1c0
Merge remote-tracking branch 'origin/main' into session/sleek-swift-736
briansrls 9f6354c
Merge remote-tracking branch 'origin/main' into session/sleek-swift-736
briansrls 45a4346
Merge remote-tracking branch 'origin/main' into session/sleek-swift-736
briansrls b41babd
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls 7f90952
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls df25da5
ci: SG-0 PR-body append for #2639 (gate #87 census +1)
briansrls fe2b71f
Merge remote-tracking branch 'origin/main' into session/sleek-swift-736
briansrls 957392c
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls 239f223
WIP: R3 gate #87: lens_cementing_test_discipline_complete
briansrls ebc6eab
chore: sync slow-test ratchet comment with default 47
briansrls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SG-0 hand-path delta: +1 | ||
|
|
||
| SG-0 pairing: (b) https://github.com/gunb-ai/gunbc/issues/2609 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_cost.dag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // R3 gate #87 — `LensRegistryEntry` `cost` (complexity.dag) Lane-E harness on merge-sort | ||
| // (`r1_merge_sort_pair.v3` program text; same authority as `r1_gates.dag` `complexity_merge_sort_v3_matches_v2_oracle`). | ||
| // | ||
| // T-LaneE stubs: `DeclarationRef` lowering only (bodies `miss_int_lookup()` — **not** consulted). | ||
| // `DifferentialEquals(v3_program_cost, v2_oracle_cost, …)` → `test_runner::eval_lane_e_differential_cost_lineage`: | ||
| // host forward-fold vs emit `lens_cost::cost_of` (see `r1_gates.dag` comment block ~`v3_program_cost`). | ||
|
|
||
| module v3.compiler.tests.t_r3.gate_87_cementing_regen_cost | ||
|
|
||
| import std.substrate { Dag, PortId } | ||
| import std.verification { | ||
| DifferentialEquals, | ||
| ProgramOutputBind, | ||
| TestClaim, | ||
| TestSuite | ||
| } | ||
| import v3.std.lookup { Lookup, miss_int_lookup } | ||
|
|
||
| fn v3_program_cost(d: Dag, port_id: PortId) -> Lookup<Int> = | ||
| miss_int_lookup() | ||
|
|
||
| fn v2_oracle_cost(d: Dag, port_id: PortId) -> Lookup<Int> = | ||
| miss_int_lookup() | ||
|
|
||
| data merge_sort_out: Int = 0 | ||
|
|
||
| data gate87_merge_sort_program_input: ProgramOutputBind = { | ||
| output_ref: merge_sort_out | ||
| } | ||
|
|
||
| data gate87_merge_sort_v3_matches_v2_oracle: TestClaim = { | ||
| name: "cementing_regen_cost", | ||
| source: "import std.list { List, cons, singleton, empty }\n\nlet xs: List<Int> = cons(2, singleton(1))\n\nfn merge_sort_pair(xs: List<Int>) -> List<Int> =\n match xs {\n Empty => empty()\n Cons(p0) =>\n match p0.tail {\n Empty => xs\n Cons(p1) =>\n match p1.tail {\n Empty =>\n if p0.head < p1.head\n then cons(p0.head, singleton(p1.head))\n else cons(p1.head, singleton(p0.head))\n Cons(_) => xs\n }\n }\n }\n\nlet merge_sort_out: List<Int> = merge_sort_pair(xs)\n", | ||
| file_name: "r3_gate_87_merge_sort_pair.v3", | ||
| predicate: DifferentialEquals( | ||
| v3_program_cost, | ||
| v2_oracle_cost, | ||
| gate87_merge_sort_program_input | ||
| ), | ||
| requires: [] | ||
| } | ||
|
|
||
| data r3_gate_87_cementing_regen_cost_suite: TestSuite = { | ||
| name: "r3-gate-87/cementing/regen/cost", | ||
| claims: [gate87_merge_sort_v3_matches_v2_oracle] | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_cost_symbolic.dag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // R3 gate #87 — `LensRegistryEntry` `cost_symbolic` (`cost.dag`) cementing in `.dag` form. | ||
| // `SymbolicCostExprEquals` applies the emitted symbolic-cost lens to `TestClaim.source` | ||
| // and compares against a frozen `SymbolicCost` witness (same pattern as | ||
| // `symbolic_cost_expr_equals_smoke` in `m1_5_verification_test.rs`). | ||
|
|
||
| module v3.compiler.tests.t_r3.gate_87_cementing_regen_cost_symbolic | ||
|
|
||
| import std.algebra { SymbolicCost } | ||
| import std.verification { SymbolicCostExprEquals, TestClaim, TestSuite } | ||
|
|
||
| data gate87_symbolic_cost_expected: SymbolicCost = ConstantCost(0) | ||
|
|
||
| data cementing_regen_cost_symbolic_claim: TestClaim = { | ||
| name: "cementing_regen_cost_symbolic", | ||
| source: "let lit: Int = 7", | ||
| file_name: "r3_gate_87_symbolic_lit.v3", | ||
| predicate: SymbolicCostExprEquals(gate87_symbolic_cost_expected), | ||
| requires: [] | ||
| } | ||
|
|
||
| data r3_gate_87_cementing_regen_cost_symbolic_suite: TestSuite = { | ||
| name: "r3-gate-87/cementing/regen/cost_symbolic", | ||
| claims: [cementing_regen_cost_symbolic_claim] | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/v3/compiler/tests/dag/t_r3_gate_87_cementing_regen_cost_target_realization.dag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // R3 gate #87 — `LensRegistryEntry` `cost_target_realization` (`.dag` harness placeholder). | ||
| // Rust consumer receipts: `lens_cost_target_realization_test.rs`. | ||
|
|
||
| module v3.compiler.tests.t_r3.gate_87_cementing_regen_cost_target_realization | ||
|
|
||
| import std.verification { Compiles, TestClaim, TestSuite } | ||
|
|
||
| data cementing_regen_cost_target_realization_claim: TestClaim = { | ||
| name: "cementing_regen_cost_target_realization", | ||
| source: "let _: Int = 0", | ||
| file_name: "r3_gate_87_cost_target_realization_smoke.v3", | ||
| predicate: Compiles, | ||
| requires: [] | ||
| } | ||
|
|
||
| data r3_gate_87_cementing_regen_cost_target_realization_suite: TestSuite = { | ||
| name: "r3-gate-87/cementing/regen/cost_target_realization", | ||
| claims: [cementing_regen_cost_target_realization_claim] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BLOCKING: The +1
src/v3Rust-test addition is paired only to issue #2609; INVARIANTS.md P5 requires a checkable receipt, and a deferral must name the lane plus a concrete ROADMAP row.