Repository navigation
Affected-set-driven CI runner — Bazel-replacement via lens/affected_set.dag (Node-level rerun frontier consumed by CI) #3556
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
26 commits
Select commit
Hold shift + click to select a range
b6a153b
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 985b329
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 4a2c3ce
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 1822a75
fix: rustfmt v4_workflow_ci_runner smoke test (CI fmt gate)
briansrls 848f48e
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 52ea35a
fix(ci): SG-0 PR-body append + correct RerunNodeSet/AffectedSet types…
briansrls 9253ab8
fix(ci): SG-0 pairing (c) requires dispatch keyword + gunb-ai/gunbc#3…
briansrls 2d52572
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 95e0870
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls a90a613
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls ed34471
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls ae7aadf
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 4b8547b
fix(ci): v4 bootstrap compile + cross-module-ready ci_runner imports
briansrls 15b22d0
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls eb81d36
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 625970a
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 948b975
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 1dc60ea
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 4bf3c8c
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 24de3c3
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 8f6ff20
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 821f011
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls f8b5148
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 429261c
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 744d092
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
briansrls 33a1a52
WIP: Affected-set-driven CI runner — Bazel-replacement via lens/affec…
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SG-0 hand-path delta: +1 | ||
|
|
||
| SG-0 pairing: (c) follow-up dispatch via gunb-ai/gunbc#3556 — T-21/T-24 Wave-0 net +1 on `EXPECTED_HAND_AUTHORED_TEST` for `v4_workflow_ci_runner_dag_smoke_test.rs` (INVARIANTS §P5(b) parse smoke on `workflow/ci.dag` selection entrypoints). Dissolves when Node-level TestClaim CI selection runs via `.dag` harness / host runner (subtree work-items A/B/C). |
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
192 changes: 192 additions & 0 deletions
192
src/v3/compiler/tests/integration/v4_workflow_ci_runner_dag_smoke_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,192 @@ | ||
| //! **Layer:** integration | ||
| //! | ||
| //! T-21/T-24 Wave-0: `src/v4/workflow/ci.dag` (`v4.workflow.ci`) exposes affected-set-driven | ||
| //! `TestClaim` roster selection over `RerunNodeSet` (kernel `filter`/`any`/`contains`; | ||
| //! evaluation-node projection in `verification.dag`). Receipt | ||
| //! claims live in `src/v4/test/claim/workflow/affected_set_ci_runner.dag`. | ||
| //! | ||
| //! **TESTING.md:** M1(2.7) tokenize/parse gate; full `compile_to_dag` import merge | ||
| //! deferred until cross-module v4 load lands (same posture as peer v4 smoke tests). | ||
| //! | ||
| //! **ROADMAP:** `ROADMAP.md` § **Nine lanes** row **T-PB-B** / `pb_rust_tests_outside_residual_zero`; | ||
| //! **TASKS.md** T-21 + T-24. | ||
| //! | ||
| //! **Dissolution:** remove when `.dag` TestClaim execution covers these claims without | ||
| //! this hand-Rust parse harness. | ||
|
|
||
| use v3_compiler::parse_for_test; | ||
| use v3_compiler::parse_surface::SurfaceItem; | ||
| use v3_compiler::tokenize_for_test; | ||
|
|
||
| const CI_DAG: &str = include_str!("../../../../v4/workflow/ci.dag"); | ||
| const CI_DAG_PATH: &str = "src/v4/workflow/ci.dag"; | ||
| const CLAIM_DAG: &str = | ||
| include_str!("../../../../v4/test/claim/workflow/affected_set_ci_runner.dag"); | ||
| const CLAIM_PATH: &str = "src/v4/test/claim/workflow/affected_set_ci_runner.dag"; | ||
|
|
||
| fn parse_module(source: &str, path: &str) -> v3_compiler::parse_surface::SurfaceModule { | ||
| let tokens = | ||
| tokenize_for_test(source, path).unwrap_or_else(|e| panic!("{path}: tokenize: {e:?}")); | ||
| parse_for_test(&tokens, path).unwrap_or_else(|e| panic!("{path}: parse: {e:?}")) | ||
| } | ||
|
|
||
| fn module_paths(module: &v3_compiler::parse_surface::SurfaceModule) -> Vec<Vec<&str>> { | ||
| module | ||
| .items | ||
| .iter() | ||
| .filter_map(|item| match item { | ||
| SurfaceItem::Module { path, .. } => { | ||
| Some(path.iter().map(String::as_str).collect::<Vec<_>>()) | ||
| } | ||
| _ => None, | ||
| }) | ||
| .collect() | ||
| } | ||
|
|
||
| fn import_includes_name( | ||
| module: &v3_compiler::parse_surface::SurfaceModule, | ||
| path: &[&str], | ||
| name: &str, | ||
| ) -> bool { | ||
| module.items.iter().any(|item| { | ||
| let SurfaceItem::Import { | ||
| path: item_path, | ||
| names, | ||
| .. | ||
| } = item | ||
| else { | ||
| return false; | ||
| }; | ||
| item_path.len() == path.len() | ||
| && item_path | ||
| .iter() | ||
| .zip(path.iter()) | ||
| .all(|(a, &b)| a.as_str() == b) | ||
| && names.iter().any(|n| n == name) | ||
| }) | ||
| } | ||
|
|
||
| fn surface_declares_fn(module: &v3_compiler::parse_surface::SurfaceModule, name: &str) -> bool { | ||
| module.items.iter().any(|item| match item { | ||
| SurfaceItem::Fn { | ||
| name: item_name, .. | ||
| } | ||
| | SurfaceItem::FnExternalBody { | ||
| name: item_name, .. | ||
| } => item_name == name, | ||
| _ => false, | ||
| }) | ||
| } | ||
|
|
||
| fn surface_declares_test_claim_data( | ||
| module: &v3_compiler::parse_surface::SurfaceModule, | ||
| name: &str, | ||
| ) -> bool { | ||
| use v3_compiler::parse_surface::SurfaceType; | ||
| module.items.iter().any(|item| match item { | ||
| SurfaceItem::Data { | ||
| name: item_name, | ||
| ty: SurfaceType::Named { name: ty_name, .. }, | ||
| .. | ||
| } => item_name == name && ty_name == "TestClaim", | ||
| _ => false, | ||
| }) | ||
| } | ||
|
|
||
| #[test] | ||
| fn v4_workflow_ci_dag_tokenizes_and_parses() { | ||
| let _module = parse_module(CI_DAG, CI_DAG_PATH); | ||
| } | ||
|
|
||
| #[test] | ||
| fn v4_workflow_ci_test_claim_selection_entrypoints() { | ||
| let module = parse_module(CI_DAG, CI_DAG_PATH); | ||
| assert_eq!( | ||
| module_paths(&module), | ||
| vec![vec!["v4", "workflow", "ci"]], | ||
| "{CI_DAG_PATH}: module authority path" | ||
| ); | ||
| for name in [ | ||
| "ci_select_from_rerun_nodes", | ||
| "ci_select_from_affected_set", | ||
| "test_claim_in_rerun_frontier", | ||
| ] { | ||
| assert!( | ||
| surface_declares_fn(&module, name), | ||
| "{CI_DAG_PATH}: must declare {name}" | ||
| ); | ||
| } | ||
| assert!( | ||
| import_includes_name( | ||
| &module, | ||
| &["v4", "lens", "affected_set"], | ||
| "affected_set_rerun_nodes" | ||
| ), | ||
| "{CI_DAG_PATH}: must import affected_set_rerun_nodes from T-21 lens" | ||
| ); | ||
| assert!( | ||
| import_includes_name( | ||
| &module, | ||
| &["v4", "std", "verification"], | ||
| "test_claim_evaluation_touches_rerun_frontier" | ||
| ), | ||
| "{CI_DAG_PATH}: must import subtree-aware frontier membership from verification" | ||
| ); | ||
| assert!( | ||
| import_includes_name( | ||
| &module, | ||
| &["v4", "std", "verification"], | ||
| "test_claim_ci_selection_fail_closed" | ||
| ), | ||
| "{CI_DAG_PATH}: must import fail-closed diagnostic selection guard from verification" | ||
| ); | ||
| assert!( | ||
| import_includes_name(&module, &["v4", "std", "algebra"], "filter"), | ||
| "{CI_DAG_PATH}: must import filter from std.algebra" | ||
| ); | ||
| } | ||
|
|
||
| #[test] | ||
| fn v4_workflow_affected_set_ci_runner_claim_dag_tokenizes_and_parses() { | ||
| let _module = parse_module(CLAIM_DAG, CLAIM_PATH); | ||
| } | ||
|
|
||
| #[test] | ||
| fn v4_workflow_affected_set_ci_runner_claim_wiring() { | ||
| let module = parse_module(CLAIM_DAG, CLAIM_PATH); | ||
| assert_eq!( | ||
| module_paths(&module), | ||
| vec![vec![ | ||
| "v4", | ||
| "test", | ||
| "claim", | ||
| "workflow", | ||
| "affected_set_ci_runner" | ||
| ]], | ||
| "{CLAIM_PATH}: module authority path" | ||
| ); | ||
| for name in ["ci_select_from_rerun_nodes", "ci_select_from_affected_set"] { | ||
| assert!( | ||
| import_includes_name(&module, &["v4", "workflow", "ci"], name), | ||
| "{CLAIM_PATH}: must import {name} from canonical workflow/ci authority" | ||
| ); | ||
| } | ||
| for claim in [ | ||
| "ci_runner_narrow_selection_claim", | ||
| "ci_runner_fail_closed_superset_claim", | ||
| "ci_runner_shape_collision_claim", | ||
| "ci_runner_inner_frontier_claim", | ||
| ] { | ||
| assert!( | ||
| surface_declares_test_claim_data(&module, claim), | ||
| "{CLAIM_PATH}: must declare structural receipt `{claim}`" | ||
| ); | ||
| } | ||
| assert!( | ||
| surface_declares_fn(&module, "ci_runner_narrow_selection_holds") | ||
| && surface_declares_fn(&module, "ci_runner_fail_closed_superset_holds") | ||
| && surface_declares_fn(&module, "ci_runner_shape_collision_holds") | ||
| && surface_declares_fn(&module, "ci_runner_inner_frontier_holds"), | ||
| "{CLAIM_PATH}: receipt predicates must exercise ci selection entrypoints" | ||
| ); | ||
| } |
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
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.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.