You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pregate: a removed test named by a package.json script or Makefile runs that file's unrelated tests (same blind spot on main for edits) #3537
Pregate lanes: when a removed test is named by a runner-config file, such as a package.json script or a Makefile target, pregate runs that file's own tests, for example a version or format test, instead of the script that names the test. Main has the same blind spot when that script is edited. Found by the GSTA-137 adversarial pass at f943239 (fixtures P1 and P1py).
#3534 makes a removed test run the tests of every remaining non-Markdown file that mentions its name (without the extension). When that file is package.json ("smoke": "node --test test/alpha.test.js") or a Makefile (python3 -m unittest tests.test_alpha), "its tests" are whatever tests exercise package.json or the Makefile. Those are usually version or format checks, not the smoke script. So the removal passes, and running the stale script (npm run smoke, make smoke) then fails. Main 6f27f0c refuses the removal with PREGATE_NO_LANE.
On main, editing that same script so it breaks also runs only package.json's own tests. So this is a general gap: pregate does not know that a runner-config entry invokes a test. It is not specific to removals.
Possible fixes:
Treat package.json scripts, Makefile targets and workflow run: steps that name a test as invoking it. Run that test when it exists; refuse a removed test such an entry names unless a dependencies entry covers it.
Or have pregate run any script or target that names a touched test.
Activity