Skip to content

feat: Evidence-based QA - require execution proof for READY_FOR_MERGE #143

Closed

Description

@admarble

Summary

QA consistently passes but manual review catches gaps. The quality loop never triggers because QA self-reports "verified working: yes" without actually executing the feature. This issue proposes evidence-based QA that requires execution proof before READY_FOR_MERGE.

Problem Analysis

Observed Behavior

  • sequant run with -q (quality loop) rarely loops — QA always passes
  • Manual re-run of QA in fresh session consistently finds gaps
  • User asks "did anything not work as expected?" and catches issues QA missed

Root Cause

QA has an adversarial self-evaluation section that asks:

  1. "Did the implementation actually work when I reviewed it?"
  2. "Do the tests actually test the feature's primary purpose?"

But these are self-reported checkboxes, not enforced requirements. The AI can write "Verified working: Yes" without actually running the feature.

Evidence

  • Analyzed 34 run logs: zero show a /loop phase triggered
  • QA passes every time with self-reported verification
  • Same-session review has same blindspots as implementation

Solution Options Considered

Option A: External Evidence Check ❌

Check for /verify or /test evidence in issue comments before READY_FOR_MERGE.

Problems:

  • Quality loop can't produce human-verified evidence (no human in automated flow)
  • Fragile grep-based detection
  • Doesn't work for users who don't use /verify

Option B: QA Executes Inline ✅ (Recommended)

QA itself must execute at least one smoke command and show inline output as evidence.

Benefits:

  • Self-contained, no external dependencies
  • Works in automated flows
  • Portable across stacks
  • Forces actual verification, not self-reporting

Option C: Stricter Default Verdict ⚠️

Default to AC_MET_BUT_NOT_A_PLUS unless explicit proof exists.

Problems:

  • Triggers loop but loop can't fix "missing evidence"
  • Adds friction without path to resolution

Option D: Two-Pass QA ⚠️

First pass reviews code, second pass tries to break it.

Problems:

  • Double the cost/time
  • Second pass still has same self-reporting issue

Proposed Solution: Inline Execution Evidence

Core Change

QA must execute at least one command that exercises the feature and include the output in the QA report.

Detection Logic

# Determine what type of verification is needed
scripts_changed=$(git diff main...HEAD --name-only | grep "^scripts/" | wc -l)
cli_changed=$(git diff main...HEAD --name-only | grep -E "src/commands/|bin/" | wc -l)
ui_changed=$(git diff main...HEAD --name-only | grep -E "^app/|^components/" | wc -l)

Execution Matrix

Change Type QA Must Execute Example
scripts/ Run the script with safe args npx tsx scripts/foo.ts --help
CLI commands Run the command with --help or dry-run npx sequant run --help
UI components Note: "UI requires /test for browser verification" N/A
Types/config only Waiver: "No execution needed - types/config only" N/A
Tests only Run the tests npm test -- --grep "feature"

Output Format

Add required section to QA output:

### Execution Evidence

| Test Type | Command | Exit Code | Result |
|-----------|---------|-----------|--------|
| Smoke test | `npx tsx scripts/analytics.ts --help` | 0 | Usage info displayed ✓ |
| Primary use case | `npx sequant stats --json` | 0 | JSON output valid ✓ |

<details>
<summary>Command output</summary>

\`\`\`
[actual output here]
\`\`\`

</details>

**Evidence status:** Complete / Incomplete / Waived (reason)

Verdict Gating

### Verdict Requirements

| Verdict | Evidence Requirement |
|---------|---------------------|
| READY_FOR_MERGE | Evidence status: Complete |
| AC_MET_BUT_NOT_A_PLUS | Evidence status: Incomplete + note why |
| AC_NOT_MET | N/A (AC not met regardless) |

If QA cannot execute (e.g., requires database, external API):

  • Document why execution wasn't possible
  • Issue AC_MET_BUT_NOT_A_PLUS with note
  • Recommend /verify or /test for human verification

Acceptance Criteria

  • AC-1: QA detects change type (scripts/CLI/UI/types) and determines execution requirement
  • AC-2: QA executes at least one smoke command for scripts/CLI changes and includes output
  • AC-3: QA output includes "Execution Evidence" section with command, exit code, and result
  • AC-4: READY_FOR_MERGE requires evidence status "Complete" or explicit waiver with reason
  • AC-5: Quality loop triggers when evidence is incomplete (via AC_MET_BUT_NOT_A_PLUS verdict)
  • AC-6: UI changes note that /test is recommended (QA can't run browser tests)

Trade-offs

Benefits

  • Forces actual execution, not self-reporting
  • Self-contained within QA skill (no external dependencies)
  • Works in automated sequant run flows
  • Portable across stacks
  • Creates audit trail of what was tested

Costs

  • Slightly longer QA phase (running commands)
  • Some features can't be smoke-tested easily (requires waiver)
  • May surface issues that were previously glossed over (good problem to have)

What This Won't Catch

  • Integration issues requiring full environment
  • Race conditions / concurrency bugs
  • UI/UX issues (still need /test or manual review)
  • Edge cases not covered by smoke command

For these, /verify and /test with human confirmation remain the gold standard.

Files to Modify

  1. .claude/skills/qa/SKILL.md — Add execution evidence phase
  2. .claude/skills/qa/references/quality-gates.md — Add evidence requirements for verdicts
  3. .claude/skills/qa/references/testing-requirements.md — Add smoke test guidance

Related

  • /verify skill — Human-confirmed execution verification
  • /test skill — Browser-based UI testing
  • Quality loop in sequant run — Auto-remediation on failures

Activity

  1. admarble commented on Jan 21, 2026

    @admarble
    ContributorAuthor

    Consolidated into #147 (Comprehensive QA improvements)

  2. added 2 commits that reference this issue on Jan 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions