Skip to content

feat(#1652): Evidence that names an env file, a production CLI or a live URL is handed to a person — classified in code, listed in the qa prompt as "do not run", recorded per AC in the run log, printed with its command in the run summary - #1679

Merged
admarble merged 4 commits into
mainfrom
feature/1652-feat-qa-evidence-that-names-an-env-file-a-producti
Nov 15, 2026

Conversation

@admarble

@admarble admarble commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#1652 is done and the branch feature/1652-feat-qa-evidence-that-names-an-env-file-a-producti is pushed. No PR from me: the orchestrator opens it.

What it does: before each qa dispatch, the run classifies the commands in every AC's Evidence clause. If a command names an env file, a production CLI or a live URL, qa is told not to run it and to report that AC as PENDING. The run log records the reach for each AC. The run summary prints #N AC-N needs a person: `<command>` whatever QA reported.

All six ACs are met. Every AC's Evidence command passes as written, build and lint pass, and the three gate tests are mutation-verified.

AC verification

AC Status Evidence
AC-1 ✅ src/lib/evidence-reach.ts. It flags --env-file, .env paths, the 10 listed CLIs (also through npx) and non-local URLs. It leaves npx vitest run, localhost URLs and URLs inside a grep/rg/ag/git grep pattern alone. npx vitest run src/lib/evidence-reach.test.ts → 21 passed
AC-2 ✅ The qa prompt has exactly one sentinel block, naming the AC and its exact command. With no needs-human AC there is no block, and an existing context is joined into the same block. phase-executor.evidence-reach.test.ts → 4 passed
AC-3 ✅ run-log-schema.ts: optional reach and reachReasons on each acs[] entry; the log stays at version: 1 and old logs still validate. -t "reach" → 3 passed
AC-4 ✅ run-display.ts: one needs a person line per command, printed from the classifier, not from the QA output. -t "needs a person" → 2 passed
AC-5 ✅ No skill-directory edits; the grep returns 0
AC-6 (derived) ✅ The qa dispatch in batch-executor.ts passes the block to executePhaseWithRetry. batch-executor.evidence-reach.test.ts drives the real runIssueWithLogging. The same test checks the run-log reach entries and IssueResult.needsHuman

Mutation-verified: AC-6 — replaced the wiring at the qa dispatch; the batch-executor.evidence-reach case failed; restored. AC-4 — deleted the summary block; the run-display case failed; restored. AC-3 — deleted the schema fields; the run-log-schema case failed; restored. All three were recorded with sequant mutation check.

Files changed

  • New: src/lib/evidence-reach.ts and its test.
  • src/lib/workflow/ac-status.ts: acRecordFor is now exported and takes the issue number directly, and entries carry reach.
  • batch-executor.ts: withEvidenceReachContext, plus a lookup run once per issue and cached on the issue's run state.
  • types.ts: IssueResult.needsHuman.
  • Also: run-log-schema.ts, run-display.ts, the new test files, one paragraph in docs/reference/run-command.md under "Phase agent environment", and a CHANGELOG entry.

Checks

  • npm run build and npm run lint pass.
  • Affected tests (npx vitest run --changed origin/main, 163 files) ran in three shards:
    • Shards 1 and 3 passed (55 and 54 files).
    • Shard 2 had 2 failures:
      • batch-executor.test.ts (my diff caused it). That file's state double holds no AC record, so the new lookup befor

Fixes #1652

QA verdict: AC_MET_BUT_NOT_A_PLUS — acceptance criteria met, but not A+. The run broke to this PR for review rather than entering the quality loop; see the QA review comment for improvement notes.

Runner verification (2026-11-11)

I ran each AC's Evidence command verbatim in the worktree at 8ad978a.

  • AC-1: evidence-reach.test.ts, 21 passed, 0 failed.
  • AC-2: phase-executor.evidence-reach.test.ts, 4 passed, 0 failed.
  • AC-3: run-log-schema.test.ts -t "reach", 3 passed (86 skipped), 0 failed.
  • AC-4: run-display.test.ts -t "needs a person", 2 passed (23 skipped), 0 failed.
  • AC-5: 0

The classifier implements P-9's list exactly (vercel, supabase, netlify, fly, heroku, wrangler, railway, aws, gcloud, az), plus stripping npx, bunx, pnpm dlx|exec and yarn dlx. Whether the qa agent obeys the block is the smoke test's to show (#1655, OQ-3).

Follow-ups


🤖 Generated by sequant run

…an commands; run log and summary name them

Entire-Checkpoint: d2e0efe2da72
…atch-executor tests

Entire-Checkpoint: 5f60cfca0174
@admarble

Copy link
Copy Markdown
Contributor Author

Read first

Computed from the diff, the issue's Evidence: clauses and git log. Nothing here is written by a model.

Residue

  • CHANGELOG.md (+1 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- CHANGELOG.md
  • docs/reference/run-command.md (+2 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- docs/reference/run-command.md
  • src/commands/run-display.ts (+20 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/commands/run-display.ts
  • src/lib/evidence-reach.ts (+209 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/evidence-reach.ts
  • src/lib/workflow/ac-status.ts (+31 −11): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/ac-status.ts
  • src/lib/workflow/batch-executor.evidence-reach.test.ts (+173 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/batch-executor.evidence-reach.test.ts
  • src/lib/workflow/batch-executor.test.ts (+6 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/batch-executor.test.ts
  • src/lib/workflow/batch-executor.ts (+70 −2): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/batch-executor.ts
  • src/lib/workflow/run-log-schema.ts (+9 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/run-log-schema.ts
  • src/lib/workflow/types.ts (+8 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/types.ts
  • CHANGELOG.md is hot: 20 fix commits in 28 days — git log --since=28.days --format=%s origin/main -- CHANGELOG.md | grep -cE '^fix(\(|:|!)'

Tests

  • src/commands/run-display.test.ts: real; mutation record: AC-4 — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/commands/run-display.test.ts, gh pr view 1679 --json body
  • src/lib/evidence-reach.test.ts: real; mutation record: none — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/lib/evidence-reach.test.ts, gh pr view 1679 --json body
  • src/lib/workflow/batch-executor.evidence-reach.test.ts: mock; mutation record: AC-6 — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/lib/workflow/batch-executor.evidence-reach.test.ts, gh pr view 1679 --json body
  • src/lib/workflow/batch-executor.test.ts: mock; mutation record: none — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/lib/workflow/batch-executor.test.ts, gh pr view 1679 --json body
  • src/lib/workflow/phase-executor.evidence-reach.test.ts: real; mutation record: none — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/lib/workflow/phase-executor.evidence-reach.test.ts, gh pr view 1679 --json body
  • src/lib/workflow/run-log-schema.test.ts: real; mutation record: AC-3 — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/lib/workflow/run-log-schema.test.ts, gh pr view 1679 --json body

Explained

  • src/lib/evidence-reach.test.ts — AC-1
  • src/lib/workflow/phase-executor.evidence-reach.test.ts — AC-2
  • src/lib/workflow/run-log-schema.test.ts — AC-3
  • src/commands/run-display.test.ts — AC-4

AC verdict: the SEQUANT_QA_VERDICT comment on #1652.

@admarble
admarble merged commit 4d02df1 into main Nov 15, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant