Remove lint rule B7, and keep advisory rules out of the briefs #294
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
Lint rule B7 ("the test file imports the module under test") misfired three times in #279, each time costly, though it only advises and never blocks:
app.js→mortgage.jsfor the same reason.const app = await import('../app.js'), so the agent moved code into a helper,dom-harness.mjs; the step's test-only check refused it, and the run failed after 905 s.It also flags every browser spec and any black-box test of an app over HTTP or the command line. What it means to catch (a test asserting on its own data) is caught elsewhere: B1 (mocks), the lanes running the tests against the real code, the scenario check, and the judge.
Agents act on any rule they're shown, advice included.
Fix
Done when
ban-checkhas no B7, no brief lists an advisory rule, and a spec-test step that adds a test-only helper succeeds.From #279, runs 133, 134 and 136. Replaces #278.
A false B7 finding makes the spec-test step add a helper, which fails the runto Remove lint rule B7, and keep advisory rules out of the briefsShipped in PR #297 (
1d98b25). B7 is gone from the lint, its brief text and the guide.ban-checkprints only the rules that block (B1, B2, B6),--allfor every rule, and the briefs list only those. The test-only refusal now ends "a test's helper goes under a test directory, such as test/", and the scenario-test brief says the same. Tests: a dynamicimport(), a helper import, a Playwright-only spec and a file with no imports all lint clean.Verified on run 137 (llama.cpp): apply ran
ban-checkonce and it printed[].agent.write-spec-tests, the step run 136 failed on B7, passed first time: itsban-checkprinted one B6 finding (a blocking rule), the agent tagged the test, and the next check printed[]. No agent mentioned a recorded rule.