Skip to content

feat(testing): flag absence-only and never-called tests in /testing:test-value #8826

Description

@kyle-sexton

Refs: #7581
Refs: #7555

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:audit rule ids (plugins/testing/skills/test-value/SKILL.md:150).
    "Checks little" lists rule-mock-only-oracle, rule-recomputed-derived, rule-weak-oracle,
    rule-throw-only-oracle and rule-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).
  • /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 forms not.toBeNull and not.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 is totalCart(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-oracle and §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.
  • 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
      whatever totalCart does. It asserts the total totalCart returns instead.
  • Add a changelog fragment under .changes/testing/ with bump: minor and one ### Added bullet
    naming the two checks. testing is in fragment mode (scripts/fragment-plugins.txt:87).
    Write it by hand in the shape of an existing testing fragment, named
    <branch-slug>-<8 hex>.md (this run cannot run scripts/new-changelog-fragment.sh). Do not bump plugin.json
    or CHANGELOG.md.

  • Update the upstream record docs/upstream/cursor-pstack.md so that it names testing:test-value
    in three places:

    • In the row at :100, add a testing:test-value link to the Ours cell, in the same form as the
      existing testing:write link.
    • Append one sentence to that row's Decision cell: testing:test-value now takes the
      paired-presence fix and the never-called shape as judgment-only checks.
    • Add testing:test-value to 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).

Known calls (2026-10-21):

  • Prose only. /testing:audit gets 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 is cant-fail-scan.sh and .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.md is 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.md adds 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 in test-value/SKILL.md also appears in plugins/testing/skills/audit/SKILL.md's
    rule table, and the diff adds no rule-* id (read from the diff).
  • The diff does not touch the description: line in test-value/SKILL.md or any file under
    plugins/testing/skills/audit/ (read from the diff).
  • evals.json has 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.md changes only two lines, the
    principle-test-behavior-not-implementation row and its index line. Each change only adds text
    naming testing: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 --check passes.
  • CI's check-skills passes on the PR (skill gate, eval sets). This is a PR check; this run does
    not run it.
  • CI's lint-repo passes on the PR (markdown). This is a PR check; this run does not run it.

Out of scope:

  • Any /testing:audit rule, adapter or script change. This includes adding absence matchers to the
    weak patterns in js-jest.yaml and running the precision run. The audit rules follow that run
    (D8, Q18).
  • The description: frontmatter of test-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:write and /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-implementation at 118e73b0, 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 tdd skill 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

  1. added
    status: ready
    on Oct 21, 2026
  2. added
    agent-ready
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readystatus: ready

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions