Repository navigation
Description
Agent Brief
Type: Feature
Summary: Add two judgment-only checks to /testing:test-value §5: an absence check with no
paired presence case, and a test whose assertions never reach the subject's output. Each gets its
fix. Add three eval cases. Prose and eval JSON only: no /testing:audit rule, adapter or script
changes.
Problem: Two shapes of test pass when the code under test does nothing, and test-value does not
name either one.
- Absence only. Every assertion checks that a value is empty or missing (
toEqual([]),
toBeUndefined,is None,Assert.Empty). An implementation that does nothing passes it. - Never called. Every assertion reads data the test built itself, so the result is the same
whatever the subject does.
The detector does not catch the first shape, and test-value's taxonomy has no entry for either.
Current behavior (read at origin/main ad020d08b5):
- §5's tables are keyed to
/testing:auditrule ids (plugins/testing/skills/test-value/SKILL.md:150).
"Checks little" listsrule-mock-only-oracle,rule-recomputed-derived,rule-weak-oracle,
rule-throw-only-oracleandrule-snapshot-only(:162-170). None of them is an absence-only
shape. - The "Judgment only" list (
:179-196) is the place for shapes that have no rule. The entries
closest to these two shapes are different defects:- "a negative test that passes for an unrelated reason" (
:185-186); - "a fixture that supplies the outcome the code should produce ... or a store asserted on that the
path under test never writes" (:187-188).
- "a negative test that passes for an unrelated reason" (
/testing:audit's rule table has no absence or never-called rule (plugins/testing/skills/audit/SKILL.md:41-55).
Its JS weak-oracle patterns match only the presence formsnot.toBeNullandnot.toBeUndefined
(plugins/testing/skills/audit/adapters/js-jest.yaml:70)./testing:write's hollow-out run already covers the never-called case at authoring time. Its
worked example istotalCart(cart); expect(cart.items).toHaveLength(3);, and its fix is to "point
them at what the subject returns or changes" (plugins/testing/skills/write/context/write.md:88).
test-value, the skill that reviews and fixes tests, does not name this case.- The upstream record says pstack keeps "an absence asserted beside a case where the effect
happens" as behavior, and that nothing taken from that unit has moved
(docs/upstream/cursor-pstack.md:100). - test-value's evals have 4 cases. None covers either shape
(plugins/testing/skills/test-value/evals/evals.json:3-52, ids 1-4). - A mock-interaction absence (
expect(fn).not.toHaveBeenCalled()) is already a mock-verify match.
The adapter strips it as a mock-interaction chain (js-jest.yaml:91-92,:107), so it falls under
rule-mock-only-oracle(audit/SKILL.md:45) and §2 (test-value/SKILL.md:88-94). The new check
covers value absences only.
Desired behavior:
-
Append two bullets to the "Judgment only" list in
plugins/testing/skills/test-value/SKILL.md,
after the bullet at:196. Change no existing line.- An absence check with no paired presence case. Every assertion checks that a value the
subject returns or changes is empty or missing (toEqual([]),toBeUndefined,is None,
Assert.Empty), and no case in the test (or its table) shows the same code producing it for
another input. A do-nothing implementation passes. Fix: add the paired case, where a different
input produces the value and the test asserts it exactly. For example,
expect(validateOrder(valid).errors).toEqual([])is paired with
expect(validateOrder(noSku).errors).toEqual(['sku required']). When the absence is the
contract and a paired presence case already exists, the test is kept. Do not delete or rewrite
an absence assertion for its shape alone. A mock-interaction absence stays under
rule-mock-only-oracleand §2. The bullet names no mock matcher. - Assertions that never reach the subject. The subject is never called, or it is called but
every assertion reads only values the test built (its own literals, fixtures or mocks). Fix:
assert what the subject returns or changes. Point to/testing:write's hollow-out run as the
way to show it (swap the subject's functions for ones that return nothing and expect red),
rather than restating that run.
- An absence check with no paired presence case. Every assertion checks that a value the
-
Add three cases to
plugins/testing/skills/test-value/evals/evals.json(ids 5, 6, 7). Leave cases
1-4 unchanged:- 5. A test whose only assertion is
expect(validateOrder(valid).errors).toEqual([]).
Expected: the output names the absence check with no paired presence case, and says an
implementation that always returns no errors passes it. It adds an invalid-order case that
asserts the exact error list, and names no audit rule id for the shape. - 6. The same assertion, in a test that also asserts
expect(validateOrder(noSku).errors).toEqual(['sku required']). Expected: the output keeps the
test and does not ask to delete or rewrite the absence assertion. - 7.
const cart = { items: [a, b, c] }; totalCart(cart); expect(cart.items).toHaveLength(3);.
Expected: the output says every assertion reads data the test built, so the test passes
whatevertotalCartdoes. It asserts the totaltotalCartreturns instead.
- 5. A test whose only assertion is
-
Add a changelog fragment under
.changes/testing/withbump: minorand one### Addedbullet
naming the two checks. testing is in fragment mode (scripts/fragment-plugins.txt:87).
Write it by hand in the shape of an existingtestingfragment, named
<branch-slug>-<8 hex>.md(this run cannot runscripts/new-changelog-fragment.sh). Do not bumpplugin.json
orCHANGELOG.md. -
Update the upstream record
docs/upstream/cursor-pstack.mdso that it namestesting:test-value
in three places:- In the row at
:100, add atesting:test-valuelink to the Ours cell, in the same form as the
existingtesting:writelink. - Append one sentence to that row's Decision cell:
testing:test-valuenow takes the
paired-presence fix and the never-called shape as judgment-only checks. - Add
testing:test-valueto the index line at:415.
Leave everything else in the file unchanged, and use no em dash: the file is on the purged list
(scripts/em-dash-purged-paths.txt:109). - In the row at
Known calls (2026-10-21):
- Prose only.
/testing:auditgets no rule now. The owner decided the checks go into test-value now,
and audit rules come only after a precision run, as advisory (Q18; D8; GUIDE 92 restored this
after an audit). The detector iscant-fail-scan.shand.awk, whose patterns live in the
adapter YAML. This lane cannot add or edit shell scripts. - Judgment-only placement, not a table row. §5's tables are keyed to audit rule ids, and neither
shape has one. - The absence wording is "no paired presence case", not "absence-only". This is the D58 wording
change in the approved design check (GUIDE 116, as recorded in
.work/poteto-review/design-check/batch-2.md, item 58, change 3; this run cannot read.work/,
so this line is the record). It
follows upstream's move away from banning assertion shapes, which led runs to delete contract
tests. That is why eval case 6 checks the keep path. - The description frontmatter stays unchanged, so the always-loaded listing text does not grow.
The added text sits in the skill body, which loads only when the skill is invoked. The evidence
for the addition is the gap above plus the owner's decision. The new eval cases are what measure
it. - Additive only. No existing line of
SKILL.mdis changed or removed, so no before-and-after eval
run is owed (AGENTS.md, skill criteria). - No upstream specific is restated. The body names no pstack, PR or author. Framework matcher names
appear only as examples, the way §5 already uses them (SKILL.md:158,:168).
Key interfaces:
plugins/testing/skills/test-value/SKILL.md(§5 "Judgment only" list).plugins/testing/skills/test-value/evals/evals.json..changes/testing/<branch-slug>-<8 hex>.md.docs/upstream/cursor-pstack.md(row at:100, index line at:415).
Done when:
- The diff to
plugins/testing/skills/test-value/SKILL.mdadds lines and removes or changes none,
and the added lines sit inside the "Judgment only" list (read from the diff). - The added text names the paired presence case as the fix for an absence check, and says a test
that already has one is kept. It names asserting what the subject returns or changes as the fix
for assertions that never reach the subject, and points to/testing:write's hollow-out run
(read from the diff). - Every
rule-*id intest-value/SKILL.mdalso appears inplugins/testing/skills/audit/SKILL.md's
rule table, and the diff adds norule-*id (read from the diff). - The diff does not touch the
description:line intest-value/SKILL.mdor any file under
plugins/testing/skills/audit/(read from the diff). -
evals.jsonhas cases 1-4 unchanged and new cases 5, 6 and 7 as described above (read from the
diff). - The diff to
docs/upstream/cursor-pstack.mdchanges only two lines, the
principle-test-behavior-not-implementationrow and its index line. Each change only adds text
namingtesting:test-value, and the file still has no em dash (read from the diff). -
plugins/skill-quality/scripts/check-evals-quality.sh plugins/testing/skills/test-value/evals/evals.json
exits 0. -
scripts/check-changelog-fragments.sh --checkpasses. - CI's
check-skillspasses on the PR (skill gate, eval sets). This is a PR check; this run does
not run it. - CI's
lint-repopasses on the PR (markdown). This is a PR check; this run does not run it.
Out of scope:
- Any
/testing:auditrule, adapter or script change. This includes adding absence matchers to the
weakpatterns injs-jest.yamland running the precision run. The audit rules follow that run
(D8, Q18). - The
description:frontmatter oftest-value. - Editing or merging the existing judgment-only bullets at
SKILL.md:185-188. - The other gaps the pstack unit found: assert the payload, not only the count, at unmanaged
boundaries; prompt templates under constant restatement. - Upstream's two-imagined-edits test as a replacement for the shape taxonomy.
/testing:writeand/testing:cleanup.
Origin:
- The absence fix (pair the absence with a case where a different input produces the effect) and
the shape where the test asserts on data it built itself. Hers: Lauren. The source is pstack's
principle-test-behavior-not-implementationat118e73b0, as summarized in
.work/poteto-review/pstack-units/skill-principle-test-behavior-not-implementation.md:25-31. At
88d47514b8, an absence asserted beside a case where the effect happens is kept as behavior
(docs/upstream/cursor-pstack.md:100). This run must not fetch those sources (github.com is not a
lane host). The summaries here are the record. - Matt's: no counterpart. His
tddskill claims tests worth keeping but contains no check for this
(.work/poteto-review/topic2/tests.md:84). - The owner's decisions:
- D8 (tests that cannot fail; precision run before blocking rules).
- Q18 (checks into test-value now, audit rules advisory after a precision run).
- GUIDE 92 (restores that after the audit).
- GUIDE 116 (approved design check: the "no paired presence case" wording).
- Ours:
- placing both checks in the judgment-only list;
- pointing at the existing hollow-out run;
- the three eval cases, including the keep case;
- the upstream-record sentence.
Do not run with: the other #7581 slices that edit plugins/testing/ (C1, C3, C4).
Size Small, Complexity Low, Uncertainty Known.
Slice of #7581 (Phase 13), drafted by the poteto-review lane from the thread's recorded decisions.
Activity