Skip to content

fix(qa): §6i mutation markers naming a CI workflow step always classify test_not_in_diff — the diff list only greps .test./.spec. files #1276

Closed

Description

@admarble

Tier: mechanical Found: 2026-10-01, #1265 QA rounds 1–3 (PR #1275).

Problem. /qa §6i builds the "diff test files" list from git diff origin/main...HEAD --diff-filter=AM --name-only | grep -E '\.(test|spec)\.' (skills/qa/SKILL.md:2595, mirrored in .claude/skills and templates/skills). A gate test that is a CI workflow step can therefore never classify valid.

AC

  • AC-1: §6i's diff-file list also includes changed .github/workflows/*.yml / *.yaml files, in all three skill copies. Evidence: grep -n "github/workflows" skills/qa/SKILL.md .claude/skills/qa/SKILL.md templates/skills/qa/SKILL.md matches the §6i command in each, plus npm run lint:skill-sync
  • AC-2: A gate test in src/lib/workflow/mutation-marker.test.ts (or a skill-section test scoped to §6i) asserts that a marker naming a workflow file present in the list classifies valid, and one absent from it classifies test_not_in_diff. Evidence: the test, mutation-verified by removing the workflow pattern from §6i's command

Non-Goals

  • Verifying that the named workflow step actually ran (same trust model as .test.ts markers: file-level only).

May touch

  • skills/qa/SKILL.md, .claude/skills/qa/SKILL.md, templates/skills/qa/SKILL.md, a §6i test

Activity

  1. added
    bug
    qa
    on Oct 1, 2026
  2. admarble commented on Oct 3, 2026

    @admarble
    ContributorAuthor

    Runner context (2026-10-03, main @ a14229f) — read before exec

    • Four skill copies, not three. Since fix(plugin): ship a slim ./plugin folder — the repo-root plugin pulls ~700 MB of dev dependencies into every install and fails directory review limits #1265, plugin/skills/qa/SKILL.md is a fourth mirror, and scripts/check-skill-sync.ts:41 enforces it. Apply the §6i change to templates/skills/, .claude/skills/, skills/ and plugin/skills/, or npm run lint:skill-sync (the AC-1 Evidence) fails. The AC-1 grep names three paths. Also check plugin/skills/qa/SKILL.md.
    • Prior fixes: git log -S on the §6i diff-list grep finds only its introduction (feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939, 22b4ca8). This isn't a recurring class, so a local fix in the §6i command is the right shape. Leave the §6i deleted_tests count at :1237 as it is. It counts deleted tests, and workflow files don't belong in that count.
    • Mutation marker: the failedTest field in the PR-body SEQUANT_MUTATION marker must start with the test file path (src/lib/workflow/mutation-marker.test.ts > …). A describe-block name in that position floors §6i at AC_NOT_MET. Use a mutation that still compiles (remove the workflow alternative from the §6i command string). The suite's global setup builds first.
    • exec and qa phases: do not run the full npm test. Run only the targeted files (npx vitest run src/lib/workflow/mutation-marker.test.ts plus any §6i skill-section test), in the foreground. CI runs the full suite. A full run hits the 30-minute phase wall.
  3. admarble commented on Oct 3, 2026

    @admarble
    ContributorAuthor

    Complexity: Simple (2 ACs, 3 directories)

    AC Quality Check

    • AC-1 Evidence is vacuous. grep -n "github/workflows" skills/qa/SKILL.md … already matches :1127 (build-affecting-files prose) on unchanged code, so it gates nothing. Tighten to a grep scoped to the §6i command: sed -n '/^### 6i/,/^### 6j\|^## /p' <copy> | grep -c 'github/workflows' (0 today, ≥1 after), for all four copies (skills/, .claude/skills/, templates/skills/, plugin/skills/), plus npm run lint:skill-sync. AC-2's mutation-verified test is the real gate.
    • AC-1 names three paths; plugin/skills/qa/SKILL.md is the fourth mirror (see runner-context comment).

    Scope Assessment

    Non-Goals: present (no check that the workflow step actually ran). Verdict: ✅ SCOPE_OK (1 feature, 2 AC, 3 dirs).

    Acceptance Criteria

    AC-1: §6i diff-file list includes changed workflow files

    Verification: Integration Test (skill-section test + lint:skill-sync)
    Scenario: Given a PR changing .github/workflows/x.yml → When §6i builds the list → Then the file is in it.

    AC-2: Gate test for valid / test_not_in_diff

    Verification: Unit Test
    Scenario: Given a marker failedTest = .github/workflows/x.yml > step → When classified with the list produced by §6i's own filter → Then valid; with the workflow absent from the list → test_not_in_diff.

    Implementation Plan

    1. In skills/qa/SKILL.md:2595 change the filter to grep -E '\.(test|spec)\.|^\.github/workflows/.*\.ya?ml$'. Leave :1237 (deleted_tests) untouched. Also update the §6i prose/table (Verified row) to say "test or workflow file".
    2. Mirror byte-identically to .claude/skills, templates/skills, plugin/skills; run npm run lint:skill-sync.
    3. Add a §6i skill-section test (e.g. src/lib/workflow/mutation-marker-6i-skill.test.ts, name must contain .integration. or set its own timeout if it spawns): extract the §6i bash block only (between ### 6i and next ###), pull the grep -E '…' pattern, apply it to sample --name-only output (workflow yml/yaml, .test.ts, a non-workflow .yml, nested .github/workflows/sub/…), feed result to classifyMutationMarker. Do not match the whole file (CLAUDE.md gate-test scoping).
    4. Mutation-verify: remove the workflow alternative from the §6i command, confirm that test fails, restore. Record Mutation-verified: AC-2 — …; src/lib/workflow/mutation-marker-6i-skill.test.ts > … failed; restored. with the SEQUANT_MUTATION marker whose failedTest starts with the test file path.
    5. Run only targeted vitest files (no full npm test).

    Design Review

    1. Where does this belong? The skill's §6i input command; classifyMutationMarker is correct.
    2. Simplest approach: one extra grep alternative. Rejected: widening classifyMutationMarker to accept any file (loses the in-diff check).
    3. Pattern/recurrence: git log -S finds only feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939's introduction; not a recurring class, local fix is right.

    Open Questions

    1. Include .yaml and nested dirs? — Recommendation: yes, per AC-1 (^\.github/workflows/.*\.ya?ml$). Impact: low.
    2. Merge conflict with feat(qa): enforce the follow-up ledger — every deferred item resolves to filed/fixed/dropped; sibling scans search the defect class #1249 (in flight, edits qa/SKILL.md in all 4 copies) — Recommendation: land independently; different section, resolve by merge if needed.

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Mechanical skill-text fix with one gate test; testgen unnecessary.

    Label Review

    Current: bug, qa — no change.

  4. added
    planned
    on Oct 3, 2026
  5. added a commit that references this issue on Oct 3, 2026
  6. admarble commented on Oct 3, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 2/2 met

    Gaps:

  7. added a commit that references this issue on Oct 3, 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

    bugplannedqa

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions