mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 02:25:55 +00:00
Kernel rig: an area's PATHS names only its own files, never the shared core
The booleans area also reruns on sketch projection from the model. The selection self-test fails on an area glob that matches a file PATHS-ALL already covers, so a whole-crate glob cannot creep in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,20 @@ class Real(unittest.TestCase):
|
||||
rx = plan.glob_regex(g)
|
||||
self.assertTrue(any(rx.match(t) for t in tracked), f"{area}: {g} matches no file")
|
||||
|
||||
def test_an_area_names_only_its_own_files(self):
|
||||
# The shared core is in PATHS-ALL; an area's PATHS repeating it (or a whole crate's
|
||||
# folder) would only blur what the area is about.
|
||||
ls = ["git", "ls-files", "--cached", "--others", "--exclude-standard"]
|
||||
files = subprocess.run(ls, cwd=ROOT, check=True, capture_output=True, text=True).stdout.split("\n")
|
||||
shared = plan.read_globs(os.path.join(ROOT, plan.CASES, "PATHS-ALL"))
|
||||
core = {f for f in files if plan.matches(shared, f)}
|
||||
for area, globs in plan.areas(ROOT).items():
|
||||
for g in globs:
|
||||
rx = plan.glob_regex(g)
|
||||
overlap = sorted(f for f in core if rx.match(f))
|
||||
with self.subTest(area=area, glob=g):
|
||||
self.assertFalse(overlap, f"{area}/PATHS: {g} names shared-core files (PATHS-ALL): {overlap[:3]}")
|
||||
|
||||
def test_the_workflow_triggers_on_every_glob(self):
|
||||
events = trigger_globs()
|
||||
self.assertEqual(events["pull_request"], events["push"])
|
||||
|
||||
@@ -2,16 +2,19 @@
|
||||
# besides the shared core in ../PATHS-ALL. One git pathspec glob a line, relative to the
|
||||
# repository root; `#` starts a comment.
|
||||
# Combine, cuts, holes, patterns, split, mirror, draft, emboss, remove, press/pull, delete face,
|
||||
# coils, text, surface extend/thicken, and bodies moved between components.
|
||||
# coils, text, surface extend/thicken, sketches projected from the model, and bodies moved between
|
||||
# components.
|
||||
crates/doc/src/body_transfer.rs
|
||||
crates/doc/src/body_transfer_sheet.rs
|
||||
crates/doc/src/eval_more.rs
|
||||
crates/doc/src/eval_surface.rs
|
||||
crates/doc/src/hole_reference.rs
|
||||
crates/doc/src/project.rs
|
||||
crates/doc/src/thread_catalog.rs
|
||||
crates/engine/src/cmd/component.rs
|
||||
crates/engine/src/cmd/delete.rs
|
||||
crates/engine/src/cmd/features_more.rs
|
||||
crates/engine/src/cmd/sketch_project.rs
|
||||
crates/engine/src/cmd/surface.rs
|
||||
crates/kernel/src/assemble.rs
|
||||
crates/kernel/src/delete_face.rs
|
||||
|
||||
Reference in New Issue
Block a user