Skip to content

test(#1512): convert execute-class prose gates to run the skill's command; delete checksum-class gates per the F-11 table and D-3 - #1565

Merged
admarble merged 6 commits into
mainfrom
feature/1512-test-skills-convert-execute-class-prose-gates-to-r
Oct 20, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/1512-test-skills-convert-execute-class-prose-gates-to-r

Conversation

@admarble

@admarble admarble commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

All 12 execute-class gates now run the command their skill names, and the 11 checksum-class gates are deleted. The affected-test run passed: 22 files, 393 tests. The branch is pushed as feature/1512-test-skills-convert-execute-class-prose-gates-to-r; no PR was opened, because under sequant run the orchestrator opens it.

What changed

  • New extractor, __tests__/helpers/skill-fence.ts. It reads .claude/skills/<skill>/SKILL.md and returns one fence, section or region. It throws if the anchor is missing or matches more than once. It only reads; each test runs the command itself, so the AC-2 grep still sees the spawn in the test file. It makes one rewrite: npx sequant becomes node dist/bin/cli.js. It also removes every SEQUANT_* variable from the environment, so the lock tests don't turn into no-ops when the suite runs inside an orchestrated phase.
  • Lock tests (fullsolve, merger, release): the acquire fence and every release site run against the built CLI with a temp lock directory. Each test checks that the lock file records skipPidCheck: true and is gone after the release.
  • Snippet tests (qa §6e, spec Rule Touchpoints, qa markdown-only): the skill's own npx tsx -e fence runs inside a temp repo, where git diff origin/main...HEAD produces the real changed-file list. The hand-copied snippets are gone.
  • Single-command tests:
    • Worktree guard: the exec, qa and loop guard fences run against one valid case and three failures (missing path, foreign directory, wrong issue). Each failure must exit 1 with its named error code.
    • Assess: each example sequant run line runs with --dry-run.
    • Setup: the lockfile chain runs on all 32 lockfile combinations, and its answer must match detectPackageManagerSync.
    • Exec timeout: the perl alarm must kill a command that runs too long and let a fast one through.
    • Loop: the jq filter runs through a stub gh and must pick the latest QA review.
    • Release: the SECURITY.md check runs against fixture files, for both the warning and the silent case.
  • Deletions: 10 files deleted. adr-convention.test.ts keeps only its checks on the ADR docs. The other checksum assertions in the converted files are kept wherever the run doesn't cover them.

AC verification

AC Status Evidence
AC-1 ✅ ok 63<=65
AC-2 ✅ 0: every execute-class file spawns its command
AC-3 ✅ 0: no file under plugin/, .claude/skills/ or templates/skills/ changed; mutations were restored and never committed
AC-4 ✅ 12 markers below, one per converted file, each made by editing the skill text; all 12 parse with parseMutationMarkers
AC-5 ⏳ Waits on CI. The affected set passed locally
AC-6 ✅ true: baseline proseGate went from 76 files / 30,751 lines to 63 / 29,533

Checks

  • npm run build ✅ · npm run lint ✅ · npm run lint:health ✅ (no metric rose).
  • npm run lint doesn't cover __tests__/, so I type-checked the changed test files and the helper with tsc directly: no errors.
  • Tests: npx vitest run on 22 files (the --changed origin/main set, every changed test, tests that read the changed files, tautology-detector-cli.test.ts, health-report.test.ts): 393 passed.
  • Regenerating the baseline also moved the rolling testRatio28d figure (sum 2.22 → 2.42). That number shifts with the 28-day window; it isn't something this PR changed.
  • CHANGELOG: one line under [Unreleased] → ### Changed.

Pre-PR confidence check

  • Weakest part: the lock tests and the assess dry-runs need dist/, as locks-cli.integration.test.ts already does. Without a build they fail with "Run 'npm run build' first"; CI builds before the tests. The lock files are also slower: up to about 12 s each, with a 20 s per-test limit.
  • Coverage gap: the converted tests read only the .claude/skills copy. Keeping the three mirror directories identical is left to `lin

Fixes #1512

QA verdict: NEEDS_VERIFICATION — acceptance criteria met, pending external verification (e.g. CI or a manual test). See the QA review comment.

Runner verification (2026-10-20)

After merging main (through #1504), the runner re-ran the ACs verbatim at 12cec29:

  • AC-1: 63<=65
  • AC-2: 0
  • AC-3: 0
  • AC-4: 12 markers
  • AC-6: true (proseGate.lines 29,533 against the planning 30,461, which absorbed rises had pushed to 30,751)
  • Lint green. All 15 test files the PR adds or changes pass (238 tests).

The runner repeated one mutation: dropping --issue=<issue-number> from fullsolve's release fence (line 389) fails release site 1 frees both locks taken by the Phase 0.3 acquire fences. The skill edit was restored and never committed.

Fixed from QA: the skill-fence.ts header now names the git spawn in makeDiffRepo.

The metric's counting rule is unchanged here: path-only files stay counted. Redefining it is #1566.


🤖 Generated with Claude Code

Entire-Checkpoint: f4f8c4ea6592
…s; delete the 11 checksum-class gates

Shared extractor __tests__/helpers/skill-fence.ts. proseGate baseline 76/30751 -> 63/29533.

Entire-Checkpoint: f448e8f45f57
…ffRepo (QA finding)

Entire-Checkpoint: 5f9f57cc866a
@admarble
admarble merged commit 23d7177 into main Oct 20, 2026
9 of 10 checks passed
@admarble
admarble deleted the feature/1512-test-skills-convert-execute-class-prose-gates-to-r branch October 20, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(skills): convert execute-class prose gates to run the skill's command; delete checksum-class gates per the F-11 table and D-3

1 participant