Repository navigation
R3 gate #88: lens_application_carrier_landed (T-Lens-Application-Surface) #3125
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 all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7419a70
test(T-LAS): CI ratchet for §1.8 gate #88 lens application carriers
briansrls ce8d255
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
briansrls 469dfb2
ci: prepend SG-0 PR-body pairing for census +1 (#3125)
briansrls 216ef72
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
briansrls f02f34c
docs(INVARIANTS): P5 receipt for t_lens_application_carrier_test (gat…
briansrls 8c7481e
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
briansrls 60200af
ci: align SG-0 pairing #3125 brief with Slice A gates #88–#91
briansrls af9387a
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
briansrls a677298
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
briansrls 2881289
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
briansrls d0c5a4b
Merge remote-tracking branch 'origin/main' into session/fierce-koi-780
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,2 @@ | ||
| SG-0 hand-path delta: +1 | ||
| SG-0 pairing: (c) T-LAS Slice A substrate dispatch tracked docs/briefs/r3-v-t-lens-application-surface-execution-split-worker.md (§Execution slice A — gates #88–#91 incl. lens_application_carrier_landed) |
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
74 changes: 74 additions & 0 deletions
74
src/v3/compiler/tests/integration/t_lens_application_carrier_test.rs
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,74 @@ | ||
| //! **Layer:** integration | ||
| //! | ||
| //! §1.8 / R3 gate **`lens_application_carrier_landed` (#88)** — T-Lens-Application-Surface: | ||
| //! `EnforcedApplication<Output, Budget, Projected>` and `IntrospectApplication<Output>` template | ||
| //! declarations in `src/v3/std/lens_application.dag` stay structurally aligned with | ||
| //! `docs/design-lens-application-surface.md` §2 (`../INVARIANTS.md` P2 / practice-5 sibling). | ||
| //! | ||
| //! Companion substrate (gate #89 `SectionRef`, gate #90 `LensEnforcement` / `EnforceableLens`) shares | ||
| //! the same module; this harness pins only the two **top-level application** carriers for #88. | ||
|
|
||
| use std::collections::HashSet; | ||
|
|
||
| use v3_compiler::dag::{Dag, TypeConnective}; | ||
| use v3_compiler::generated_full_bootstrap_dag; | ||
|
|
||
| fn conj_field_labels(dag: &Dag, name: &str) -> HashSet<String> { | ||
| let decl = dag | ||
| .declaration_by_name(name) | ||
| .unwrap_or_else(|| panic!("`{name}` missing from full bootstrap")); | ||
| match &decl.connective { | ||
| TypeConnective::Conj { children } => children.iter().map(|f| f.label.clone()).collect(), | ||
| other => panic!("`{name}` is not a Conj: {other:?}"), | ||
| } | ||
| } | ||
|
|
||
| #[test] | ||
| fn r3_gate_88_enforced_application_carrier_shape_locked() { | ||
| let dag = generated_full_bootstrap_dag(); | ||
| let enforced = dag | ||
| .declaration_by_name("EnforcedApplication") | ||
| .expect("EnforcedApplication missing from full bootstrap"); | ||
| assert_eq!( | ||
| enforced.type_params.len(), | ||
| 3, | ||
| "EnforcedApplication must carry Output, Budget, Projected parameters" | ||
| ); | ||
|
|
||
| let labels = conj_field_labels(&dag, "EnforcedApplication"); | ||
| let expected: HashSet<&str> = [ | ||
| "enforceable_lens", | ||
| "section", | ||
| "budget", | ||
| "diagnostic_severity", | ||
| "span", | ||
| ] | ||
| .into_iter() | ||
| .collect(); | ||
| let actual: HashSet<&str> = labels.iter().map(String::as_str).collect(); | ||
| assert_eq!( | ||
| actual, expected, | ||
| "EnforcedApplication field set drifted from T-LAS Slice A design doc §2" | ||
| ); | ||
| } | ||
|
|
||
| #[test] | ||
| fn r3_gate_88_introspect_application_carrier_shape_locked() { | ||
| let dag = generated_full_bootstrap_dag(); | ||
| let intro = dag | ||
| .declaration_by_name("IntrospectApplication") | ||
| .expect("IntrospectApplication missing from full bootstrap"); | ||
| assert_eq!( | ||
| intro.type_params.len(), | ||
| 1, | ||
| "IntrospectApplication must carry a single Output parameter" | ||
| ); | ||
|
|
||
| let labels = conj_field_labels(&dag, "IntrospectApplication"); | ||
| let expected: HashSet<&str> = ["lens", "section", "span"].into_iter().collect(); | ||
| let actual: HashSet<&str> = labels.iter().map(String::as_str).collect(); | ||
| assert_eq!( | ||
| actual, expected, | ||
| "IntrospectApplication field set drifted from T-LAS Slice A design doc §2" | ||
| ); | ||
| } |
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: Adding a new
EXPECTED_HAND_AUTHORED_TESTpath without a same-PR P5 receipt violates INVARIANTS.md P5, which requires exactly one checkable receipt for new hand-Rust tests.