From 44ec12cb69cd3bacc5a169928f73b9873be4016b Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:37:25 -0500 Subject: [PATCH] Kernel rig plan self-test: a solidcore pin change runs every area and the ladder A solidcore bump changes only the root Cargo.toml and Cargo.lock, which neither PATHS-ALL nor the workflow's trigger paths list, so it ran no rig. The tests want a change to the solidcore lines of those files to run everything, another dependency's change in them to run nothing, and the workflow to trigger on both files. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- scripts/ci/test_kernel_rig_plan.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/ci/test_kernel_rig_plan.py b/scripts/ci/test_kernel_rig_plan.py index 1c3bc1a67..fa1201297 100644 --- a/scripts/ci/test_kernel_rig_plan.py +++ b/scripts/ci/test_kernel_rig_plan.py @@ -74,6 +74,22 @@ class Synthetic(unittest.TestCase): self.assertEqual(self.select("crates/engine/src/cmd/view_navigation.rs"), ([], True)) self.assertEqual(self.select("tests/kernel-cases/EXEMPT"), ([], True)) + def test_a_solidcore_pin_change_runs_every_area(self): + moved = ( + "--- a/Cargo.lock\n+++ b/Cargo.lock\n@@ -1,3 +1,3 @@\n name = \"solidcore\"\n" + '-source = "git+https://github.com/tangency-labs/solidcore?rev=97ed188#97ed188"\n' + '+source = "git+https://github.com/tangency-labs/solidcore?rev=8ddce90#8ddce90"\n' + ) + everything = (["fillets", "shell", "ladder"], True) + self.assertEqual(plan.select(self.root, ["Cargo.lock", "Cargo.toml"], pin_diff=moved), everything) + + def test_another_dependency_change_runs_nothing(self): + bumped = '--- a/Cargo.lock\n+++ b/Cargo.lock\n@@ -1,2 +1,2 @@\n name = "serde"\n-version = "1.0.1"\n+version = "1.0.2"\n' + self.assertEqual(plan.select(self.root, ["Cargo.lock", "Cargo.toml"], pin_diff=bumped), ([], False)) + # A context line that names solidcore is no change to its pin. + context = '--- a/Cargo.toml\n+++ b/Cargo.toml\n@@ -1,2 +1,2 @@\n solidcore = { git = "https://github.com/tangency-labs/solidcore" }\n-a = 1\n+a = 2\n' + self.assertEqual(plan.select(self.root, ["Cargo.toml"], pin_diff=context), ([], False)) + def test_everything_runs_every_area(self): self.assertEqual(plan.select(self.root, [], everything=True), (["fillets", "shell", "ladder"], True)) @@ -148,6 +164,12 @@ class Real(unittest.TestCase): with self.subTest(glob=g): self.assertTrue(any(t.match(sample(g)) for t in triggers), f"{g}: not under the workflow's trigger paths") + def test_the_workflow_triggers_on_the_pin_files(self): + triggers = [plan.glob_regex(g) for g in trigger_globs()["pull_request"]] + for f in plan.PIN_FILES: + with self.subTest(file=f): + self.assertTrue(any(t.match(f) for t in triggers), f"{f}: not under the workflow's trigger paths") + def test_a_ui_change_runs_nothing(self): self.assertEqual(plan.select(ROOT, ["crates/ui-egui/src/app.rs", "docs/kernel-cases.md", "README.md"]), ([], False))