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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
jyviko
2026-11-02 20:37:25 -05:00
parent d2882754fa
commit 44ec12cb69
+22
View File
@@ -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))