Skip to content

feat(qa): Add CI status awareness to verdict logic #178

Closed

Description

@admarble

Summary

When AC items depend on CI (e.g., "Tests pass in CI"), QA should be aware of CI status rather than marking as PENDING and giving READY_FOR_MERGE.

Problem

From verbose run review:

Current Flow

PR Created → QA runs immediately → CI still running → AC marked PENDING → READY_FOR_MERGE

Proposed Options

Option A: Wait for CI (adds latency)

# Poll GitHub checks until complete or timeout
gh pr checks <pr-number> --watch --timeout 300

Pros: Accurate verdict
Cons: Adds 1-5 minutes to QA phase

Option B: Check CI status, don't wait (recommended)

# Get current CI status
gh pr checks <pr-number> --json name,state,conclusion
CI State QA Behavior
All passed AC marked MET
Any failed AC marked NOT_MET
In progress AC marked PENDING → NEEDS_VERIFICATION verdict
No CI configured AC marked N/A

Pros: Fast, accurate status
Cons: May need re-run after CI completes

Option C: Document as user responsibility (minimal change)

Add note to QA output:

⚠️ CI checks in progress. Verify CI passes before merging.

Acceptance Criteria

  • AC-1: QA checks GitHub CI status via gh pr checks
  • AC-2: CI status reflected in AC coverage table
  • AC-3: If CI pending, verdict is NEEDS_VERIFICATION (not READY_FOR_MERGE)
  • AC-4: If no CI configured, AC marked N/A (not PENDING)

Priority

Low-Medium — Current behavior works but requires manual CI verification before merge.

References

Activity

  1. added
    enhancement
    on Jan 23, 2026
  2. admarble commented on Jan 30, 2026

    @admarble
    ContributorAuthor

    📋 Spec Review — Implementation Plan

    Acceptance Criteria (Verification)

    AC Description Verification Method Test Scenario
    AC-1 QA checks GitHub CI status via gh pr checks Integration Test Given PR with CI, When /qa runs, Then executes gh pr checks --json
    AC-2 CI status reflected in AC coverage table Manual Test Given fetched CI status, Then AC table shows MET/NOT_MET/PENDING/N/A based on CI state
    AC-3 If CI pending, verdict is NEEDS_VERIFICATION Integration Test Given CI in progress, Then verdict is NEEDS_VERIFICATION not READY_FOR_MERGE
    AC-4 If no CI configured, AC marked N/A Integration Test Given no CI checks, Then CI-related AC items marked N/A, not blocking

    Implementation Plan

    Phase 1: Add CI Status Checking

    1. Add gh pr checks <pr-number> --json name,state,conclusion command pattern to QA skill
    2. Define CI status → AC status mapping logic:
      • completed + success → MET
      • completed + failure/cancelled → NOT_MET
      • in_progress/queued/pending → PENDING
      • Empty response → N/A

    Phase 2: Integrate with QA Flow
    3. Detect CI-related AC items (patterns: "Tests pass in CI", "CI passes", "Build succeeds")
    4. Add CI status section to QA output template
    5. Add Bash(gh pr checks:*) to allowed-tools

    Phase 3: Document Verdict Behavior
    6. Update verdict documentation to clarify CI PENDING → NEEDS_VERIFICATION

    Assumptions to Validate

    • gh CLI available in environment
    • PR number determinable from issue context
    • gh pr checks returns empty array when no CI configured

    Conflict Analysis

    ⚠️ Overlapping work: Issue #177 also modifies QA skill

    • Risk: Low — changes are additive and target different sections
    • Approach: Implement independently, rebase if needed

    Recommended Workflow

    /exec 178 → /qa 178
    

    No /test phase needed (skill changes, not UI).


    🤖 Generated by /spec workflow

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

    @admarble
    ContributorAuthor

    🚀 Implementation Progress Update

    AC Coverage

    AC Description Status Notes
    AC-1 QA checks GitHub CI status via gh pr checks ✅ MET Added gh pr checks to allowed-tools and detection logic
    AC-2 CI status reflected in AC coverage table ✅ MET Added CI Status section to output template with mapping
    AC-3 If CI pending, verdict is NEEDS_VERIFICATION ✅ MET Updated verdict algorithm and documentation
    AC-4 If no CI configured, AC marked N/A ✅ MET Added N/A handling for empty CI response

    Coverage: 4/4 AC items fully met

    Files Changed

    File Changes
    .claude/skills/qa/SKILL.md Added CI Status Check phase, updated output template, allowed-tools
    .claude/skills/qa/references/quality-gates.md Added CI Status Impact on Verdict section

    PR Status

    ✅ PR Created: #205

    Test Results

    • npm test: 669 passed, 12 failed (pre-existing failures unrelated to this change)
    • npm run build: ✅ Passed

    Key Implementation Details

    1. CI Status Detection: Added gh pr checks <pr-number> --json name,state,conclusion command pattern
    2. Status Mapping:
      • completed + success → MET
      • completed + failure/cancelled → NOT_MET
      • in_progress/queued/pending → PENDING
      • Empty response → N/A (no CI configured)
    3. Verdict Integration: CI PENDING → NEEDS_VERIFICATION verdict (not READY_FOR_MERGE)
    4. CI-Related AC Patterns: "Tests pass in CI", "CI passes", "Build succeeds in CI", etc.

    Next Steps

    1. Run /qa 178 to review the implementation
    2. Verify CI checks on PR pass
    3. Merge when ready

    🤖 Generated by /exec workflow

  6. admarble commented on Jan 30, 2026

    @admarble
    ContributorAuthor

    ✅ QA Review — READY_FOR_MERGE

    AC Coverage

    AC Description Status
    AC-1 QA checks GitHub CI status via gh pr checks ✅ MET
    AC-2 CI status reflected in AC coverage table ✅ MET
    AC-3 If CI pending, verdict is NEEDS_VERIFICATION ✅ MET
    AC-4 If no CI configured, AC marked N/A ✅ MET

    Coverage: 4/4 AC items fully met

    Quality Metrics

    Metric Value Status
    Type issues 0 ✅ OK
    Deleted tests 0 ✅ OK
    Files changed 2 ✅ OK
    Lines changed +148 / -5 Small
    Security scan 0 issues ✅ PASS

    Code Review Summary

    Strengths:

    • Clean, well-structured additions fitting existing SKILL.md format
    • Comprehensive CI status mapping covers all GitHub check states
    • CI-related AC patterns are practical and cover common phrasings
    • Example output formats ensure consistent QA reports
    • quality-gates.md updated with matching documentation

    Issues: None identified

    Verdict: READY_FOR_MERGE ✅

    All AC items met. Changes are focused, well-documented, and consistent with existing patterns.


    🤖 Generated by /qa workflow

  7. added
    ready-for-review
    on Jan 30, 2026
  8. added 2 commits that reference this issue on Jan 30, 2026
  9. added 2 commits that reference this issue on Jan 31, 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

    enhancementplannedready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions