Skip to content

fix(qa): classify runner-never-started CI (billing lockout) as infra-blocked, not NOT_MET — keep it out of /loop #820

Closed

Description

@admarble

Context

Live incident (admarble/ad-motion, 2026-07-26): the repo hit its Actions spending limit, and every CI job on every run now fails in ~2s with 0 steps. /qa Phase 1's CI Status Mapping (.claude/skills/qa/SKILL.md §"CI Status Check") maps FAILURE → NOT_MET → blocks merge unconditionally — so against a billing-locked repo, QA marks CI-dependent ACs NOT_MET for a failure no code change can fix, and those findings would feed /loop (or #817's ready-gate auto-fix loop), burning iterations "fixing" code that isn't broken.

The cause is invisible to every command the skill uses. gh pr checks and gh run view show plain failures; the reason exists only as a check-runs API annotation. Captured fixture from the live incident (perishable — gone once billing is fixed):

// gh api repos/{owner}/{repo}/commits/{head_sha}/check-runs → .check_runs[0]
{"name":"conform (vertical)","status":"completed","conclusion":"failure",
 "started_at":"2026-07-26T06:41:38Z","completed_at":"2026-07-26T06:41:40Z",
 "output":{"title":null,"summary":null}}
// → .output.annotations_url → .[0]
{"annotation_level":"failure","path":".github",
 "message":"The job was not started because recent account payments have failed or your spending limit needs to be increased. Please check the 'Billing & plans' section in your settings"}

Signature: every check concludes failure within seconds of starting, with a job annotation matching job was not started. This is the third member of a known family of "CI signal absent/red for non-code reasons":

#818 gets the equivalent detection on the CLI side (merge --watch → exit BLOCKED with the cause); this issue is the skill-prompt side.

Proposal

In /qa Phase 1, when all checks land in the fail bucket, query the head SHA's check-runs annotations before applying the status mapping. On the not-started signature, classify CI as infra-blocked: CI-dependent ACs become NEEDS_VERIFICATION (not NOT_MET), the report surfaces the annotation text verbatim as the action item, and the finding is marked non-loopable so /loop never consumes it. All other failures keep today's mapping — a mix of real failures and quick failures is not the signature; only all-fail-fast triggers the annotation query, so the extra API call costs nothing on healthy repos.

Acceptance Criteria

  • AC-1: When every check returned by gh pr checks is in the fail bucket, Phase 1 queries the head commit's check-runs annotations before mapping CI status to AC verdicts.
  • AC-2: An annotation matching the not-started signature (case-insensitive job was not started) classifies CI as infra-blocked: CI-dependent ACs map to NEEDS_VERIFICATION, never NOT_MET, and the QA report includes the annotation message verbatim.
  • AC-3: Infra-blocked CI findings are explicitly excluded from /loop input, documented in both the qa and loop skill docs (same discipline as AC_MET_BUT_NOT_A_PLUS).
  • AC-4: When not all checks are failing, or no annotation matches, behavior is byte-identical to today's mapping (no annotation query on healthy or partially-failing CI).
  • AC-5: The gh api commands used are verified against real output per Section 6a, using the fixture JSON in this issue as the reference corpus.
  • AC-6: The change is mirrored across all skill dir copies of qa/loop (.claude/skills/, templates/skills/, plugin skills dir).

Out of scope

References

Activity

  1. added
    bug
    qa
    on Jul 26, 2026
  2. admarble commented on Jul 27, 2026

    @admarble
    ContributorAuthor

    #820 — fix(qa): classify runner-never-started CI (billing lockout) as infra-blocked, not NOT_MET — keep it out of /loop
    Open · bug, qa
    ────────────────────────────────────────────────────────────────

    → PROCEED — Fixture JSON captured in issue body (perishable evidence preserved); requirements clear

    Commands:
    sequant run 820 -Q

    spec → exec → qa · 6 ACs
    ────────────────────────────────────────────────────────────────
    ⚠ Conflict: #819 also modifies qa/SKILL.md and loop/SKILL.md — land #820 first; #817's ready-gate also depends on this fix landing before it sees real use
    ────────────────────────────────────────────────────────────────

  3. admarble commented on Jul 27, 2026

    @admarble
    ContributorAuthor

    Plan — #820

    Complexity: Standard (6 ACs, 4 directories)

    AC Quality Check

    lintAcceptanceCriteria — 6/6 pass, no vague/unmeasurable/open-ended patterns. AC-4's "byte-identical" is unusually strong but is measurable: it names a negative behavior (no annotation query) that a unit test can pin directly.

    Scope Assessment

    Non-Goals: present (3 items — CLI-side merge --watch, other infra failure modes, pre-flight billing checks).

    Metric Value Status
    Feature count 2 ⚠️
    AC items 6 ⚠️
    Directory spread 4 ⚠️

    Verdict: ⚠️ SCOPE_WARNING → quality loop enabled.

    Caveat on the directory metric: 3 of the 4 directories are the mandated .claude/skills/ ÷ templates/skills/ ÷ skills/ mirror (AC-6), i.e. the same file three times, not three independent surfaces. Real surface area is one new TS module + two skill docs. No split recommended.


    Acceptance Criteria

    AC-1 — Annotation query gated on all-checks-failing
    Verification: Unit Test
    Given a gh pr checks result where every entry has bucket: "fail" → When Phase 1 runs → Then the check-runs annotations query fires before the status mapping is applied.
    Assumptions: bucket is the authoritative field (state is display-oriented); an empty check list is not all-failing.

    AC-2 — Not-started signature ⇒ infra-blocked
    Verification: Unit Test
    Given an annotation whose message matches /job was not started/i → When classification runs → Then CI-dependent ACs map to NEEDS_VERIFICATION (never NOT_MET) and the report carries the annotation message verbatim.
    Assumptions: matching is on message only. The fixture also has annotation_level: "failure", but AC-2 specifies the message signature, so no level gate is added — a level gate would be an unstated extra condition that could silently miss a warning-level variant.

    AC-3 — Infra-blocked findings excluded from the quality loop
    Verification: Manual Test (doc-content check)
    Given a QA report containing an infra-blocked CI finding → When the loop skill parses findings → Then that finding is not actionable input, documented in both skill docs.
    Assumptions: no machinery exists for this today — grep for non-loopable/excluded from /loop returns nothing. This AC establishes the marker, following the AC_MET_BUT_NOT_A_PLUS precedent (a documented discipline, not a code gate).

    AC-4 — No behavior change off the trigger path
    Verification: Unit Test
    Given all-pass, mixed pass/fail, empty, or all-fail-with-no-matching-annotation → When Phase 1 runs → Then the existing mapping applies unchanged and no annotation query is issued.

    AC-5 — gh api commands verified against real output
    Verification: Integration Test (Section 6a)
    Given the commands added to the skill → When run against live GitHub → Then every field path resolves.
    Status: partially done during planning. gh api repos/{owner}/{repo}/commits/<sha>/check-runs was run against origin/main (f6a6498, 5 checks) and returns .check_runs[].name/status/conclusion/started_at/completed_at/output.title/output.annotations_count/output.annotations_url — the fixture's field paths all resolve. output.annotations_count additionally exists in real output but is absent from the issue fixture; see Open Question 1. The annotations endpoint itself could not be exercised live (no recent commit in this repo carries annotations_count > 0) — the issue fixture is the reference corpus for that shape, exactly as AC-5 specifies.

    AC-6 — Mirrored across all three skill dirs
    Verification: Integration Test
    Given the edits → When npx tsx scripts/check-skill-sync.ts runs → Then no divergence. All three copies are byte-identical today (md5 confirmed for both qa and loop), so --fix propagation is safe.


    Implementation Plan

    Phase 1 — Pure detection helper (new)

    1. Add src/lib/qa/infra-blocked-ci.ts, deliberately mirroring src/lib/qa/markdown-only-ci.ts (same directory, same pure-predicate-no-I/O shape, same JSDoc density):
      • allChecksFailing(checks: {bucket: string}[]): boolean — false on an empty list (AC-1, AC-4).
      • detectInfraBlocked(annotations): {blocked, message?, checkName?} — first message matching /job was not started/i, returned verbatim (AC-2).
    2. Add src/lib/qa/infra-blocked-ci.test.ts using the issue's captured fixture JSON verbatim as the corpus (AC-5), plus the four AC-4 negative cases.

    Phase 2 — /qa Phase 1 wiring

    1. In .claude/skills/qa/SKILL.md § "Phase 1: CI Status Check", insert an Infra-Blocked CI Detection subsection between "CI Status Mapping" and "CI-Related AC Detection". It is a guarded pre-step: only when allChecksFailing is true does it fetch .output.annotations_url per failing check and stop at the first match. Add the infra-blocked row to the mapping table and to the Verdict Integration list.
    2. Add the report block to the CI Status output format — the verbatim cause line plus the greppable marker <!-- qa:ci-infra-blocked --> (AC-2, AC-3).

    Phase 3 — /loop exclusion + mirror

    1. In .claude/skills/loop/SKILL.md § "Parsing Findings", add an Excluded Finding Classes subsection: skip findings under <!-- qa:ci-infra-blocked -->; if nothing actionable remains after exclusion, exit no-op rather than iterate (AC-3).
    2. npx tsx scripts/check-skill-sync.ts --fix to propagate to templates/skills/ and skills/; verify with a clean run (AC-6). CHANGELOG [Unreleased] → Fixed entry.

    Design Review

    1. Where does this logic belong? Split across two layers, copying the markdown-only-ci.ts precedent already living in src/lib/qa/: pure predicates in TypeScript (unit-testable), gh api orchestration and reporting rules in the skill prompt. The alternative — regex inline in SKILL.md — is what the qa skill's own "Detection Pattern Dogfooding" section (line 1936) exists to warn against: syntactically valid patterns that match the wrong corpus fail silently and the pipeline reports success.

    2. Simplest correct approach? Two ~15-line pure functions and three doc edits. Rejected: a sequant qa ci-status CLI subcommand (over-build — nothing else needs it, and feat(merge): --watch — wait for CI checks to finish, then run merge-check and report (kills the merge-after-green polling loop) #818 already owns the CLI-side detector); a generic infra-failure classifier (explicitly out of scope, and there are no fixtures for the other modes).

    3. Existing pattern? markdown-only-ci.ts + its "Procedure"/"Output transparency (REQUIRED)" skill blocks — same guarded-pre-step-with-mandatory-disclosure shape. This change is that pattern applied to the fail bucket instead of the pending bucket.

    4. What would a senior reviewer challenge?

      • "Why not just gate on annotation_level: failure too — the fixture has it?" Because AC-2 specifies the message signature and nothing else; adding an unstated condition risks a silent miss. Documented as a deliberate choice in the code.
      • "N extra API calls on a fully-red PR." Bounded by the all-fail gate (never fires on healthy or partially-failing CI, per AC-4) and short-circuited at the first match. Cost is disclosed in the skill text rather than papered over with a silent cap.
      • "Isn't NEEDS_VERIFICATION too soft for a fully-red PR?" It is the correct verdict for the CI-dependent ACs specifically — no code change can turn them green. Non-CI ACs are unaffected and still gate normally.

    Feature Quality Planning

    • Detection-pattern dogfooding is mandatory here, not optional. This is a regex-over-real-corpus change; the unit tests must run the issue's captured JSON verbatim, not a hand-rolled paraphrase. Synthetic fixtures would hide exactly the false negative that matters.
    • Perishable evidence. The live incident is already resolved upstream, so the issue-body fixture is the only surviving capture. Commit it into the test file so it stops being perishable.
    • No security, performance, or migration dimensions. No user-visible CLI surface changes.

    Open Questions

    1. Use output.annotations_count > 0 as a pre-filter before fetching annotations_url? — Recommendation: no. It appears in real output but not in the issue's fixture, so trusting it would rest on an unverified assumption about the billing-lockout shape specifically. Impact if wrong: with the filter, a lockout that reports 0 would be silently missed — the exact failure mode this issue exists to prevent. Without it, the cost is a few extra API calls on an already-broken PR.
    2. Should the marker be <!-- qa:ci-infra-blocked --> or reuse an existing convention? — Recommendation: the new marker; grep found no existing loop-exclusion marker, and the codebase's <!-- assess:… --> / <!-- SEQUANT_PHASE: … --> markers set the naming precedent. Impact if wrong: cosmetic, one-line change.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: enabled (SCOPE_WARNING)
    Reasoning: Matches the prior /assess recommendation. Deliberately not adding testgen despite AC-1/AC-2/AC-4 carrying Unit Test verification: the target is one ~60-line pure module with a directly adjacent template (markdown-only-ci.test.ts), so exec writes the real tests in the same pass and stubs would only be deleted. No test phase — no UI surface.

    Label Review

    Current: bug, qa
    Recommended: unchanged
    Reason: Accurate. Adding no-browser-test would be redundant — there are no UI labels for it to override.

    Conflict Risk

    #819 also edits qa/SKILL.md and loop/SKILL.md but has no branch and no PR yet, so there is nothing to conflict with right now. #820 lands first, as /assess advised. No worktrees are in flight.

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

    @admarble
    ContributorAuthor

    QA Review for Issue #820

    Reviewed inline (not via sub-agents): 659 of 668 changed lines are the mandated 3× skill-dir mirror of the same two files, so the unique review surface is ~220 lines. Per prior guidance, worktree diffs at this size are reviewed inline for accuracy.

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Annotation query gated on all-checks-failing MET allChecksFailing (src/lib/qa/infra-blocked-ci.ts:40) returns true only for a non-empty, uniformly-fail list; wired as step 1 of the Phase 1 procedure, with the gh api fetch inside the if. 7 unit tests.
    AC-2 Original Not-started signature ⇒ infra-blocked, verbatim message MET NOT_STARTED_SIGNATURE = /job was not started/i + detectInfraBlockedCi (:54, :93). CI-dependent ACs map to PENDING → NEEDS_VERIFICATION, never NOT_MET — see the wording note below. Verbatim message verified against the issue body's own bytes, not the test file's copy.
    AC-3 Original Excluded from /loop, documented in both skill docs MET qa/SKILL.md § "Loop Exclusion" emits <!-- qa:ci-infra-blocked -->; loop/SKILL.md § "Excluded Finding Classes" consumes it and gates Step 3's exit condition. Filter is in the data path (see Defect 2).
    AC-4 Original Byte-identical behavior off the trigger path MET Gate returns false for empty / all-pass / mixed / pending / skipped (6 unit tests). /loop filter verified byte-identical pass-through on 40 real QA comments. Also confirmed live on this very PR: 8 passing checks → no annotation query fired.
    AC-5 Original gh api commands verified against real output per §6a MET See Skill Command Verification — full chain executed live end-to-end.
    AC-6 Original Mirrored across all three skill dirs MET check-skill-sync.ts: 42 synced, 0 diverged, 0 missing.

    Coverage: 6/6 AC items fully met
    Derived ACs: none (spec produced no Derived ACs table)

    Note on AC-2's wording — prescription adjusted, requirement met. AC-2 says CI-dependent ACs "map to NEEDS_VERIFICATION". NEEDS_VERIFICATION is a verdict value; the AC-status vocabulary in /qa is MET / PARTIALLY_MET / PENDING / NOT_MET / N/A. Implementing the AC literally would have produced an AC status no counter in §7 recognises. The implementation marks the AC PENDING, which §7 routes to verdict NEEDS_VERIFICATION via pending_count > 0 — the outcome AC-2 is asking for. Flagged loudly here and recorded inline in the skill so it does not get "corrected" back.


    Quality Plan Verification

    Quality Plan found: Yes (from /spec)

    Dimension Planned Addressed Status
    Detection-pattern dogfooding (mandatory) 1 1 ✅ Complete — run against 20 real /qa comments, not synthetic lookalikes
    Perishable-evidence capture 1 1 ✅ Complete — fixture committed verbatim into the test file
    Security / performance / migration 0 0 N/A (correctly identified as absent)

    Quality Plan Status: Complete


    Precheck Findings

    Section Status Surfaced
    Fixtures pass 1 motivating-example fixture (the captured incident JSON) — run against the implementation
    Sibling-grep pass 0 candidate sites
    AC literal-diff pass No AC IDs missing from the PR body

    Source: .sequant/gap-precheck.json (schemaVersion 1)


    CI Status

    Check State Bucket Impact
    build (22.x) SUCCESS pass ✅ MET
    typecheck SUCCESS pass ✅ MET
    validate-skills SUCCESS pass ✅ MET
    validate-plugin SUCCESS pass ✅ MET
    Plugin Structure Validation SUCCESS pass ✅ MET
    Hooks Validation SUCCESS pass ✅ MET
    node-floor-guard SUCCESS pass ✅ MET
    Setup Directory Creation SUCCESS pass ✅ MET

    CI Summary: 8 passed, 0 pending, 0 failed (at 6343861)
    CI-related AC items: none of the six ACs are CI-dependent — no CI-gated AC to map.


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 9 OK
    Lines added +659 OK (≈440 is the 3× mirror)
    Lines deleted -9 OK

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    src/lib/qa/infra-blocked-ci.ts Standard ✅ Yes src/lib/qa/infra-blocked-ci.test.ts (18 tests)
    .claude/skills/qa/SKILL.md + mirrors Standard N/A (prompt) Covered by §6c corpus run below
    .claude/skills/loop/SKILL.md + mirrors Standard N/A (prompt) Covered by §6c corpus run below
    CHANGELOG.md Optional - -

    Coverage: 1/1 changed source files have corresponding tests. Full suite: 206 files, 4278 passed, 1 expected fail, 2 skipped.

    Mutation-tested (negative assertions are not vacuous): every→some in allChecksFailing fails 3 tests; loosening the regex to /started/i fails 1.


    Skill Command Verification

    Skill files changed: 6 (2 unique × 3 mirrors)

    Command Method Result
    gh pr checks --json name,state,bucket --help field list ✅ all three fields exist
    gh pr view --json headRefOid --help field list ✅ exists
    gh api repos/{owner}/{repo}/commits/<sha>/check-runs --jq '[.check_runs[] | {checkName: .name, annotationsUrl: .output.annotations_url}]' Executed live against origin/main ✅ 5 checks returned, every field path resolves
    Full chain: live gh api → fetch each annotations_url → detectInfraBlockedCi Executed live ✅ {"blocked":false} on healthy CI — correct negative

    Verification Status: Passed

    Positive (infra-blocked) case could not be exercised live — the incident is resolved upstream and no commit in this repo carries annotations_count > 0. The issue's captured JSON is the reference corpus, exactly as AC-5 specifies.


    Detection Pattern Verification

    Skill markdown files with pattern changes: 6 (the awk exclusion filter)

    Pattern Corpus Samples Expected Actual Status
    awk infra-blocked exclusion Real past /qa comments (304 fetched, 239 with ### CI Status) 20 infra text removed, every other ### header preserved 20/20 correct, 0 failures ✅ Passed
    Same filter, no marker present Real past /qa comments 40 byte-identical pass-through 40/40 content-identical, 0 genuine diffs ✅ Passed
    /job was not started/i Issue-body fixture (verbatim bytes) 1 match + verbatim message matched; committed constant proven === issue-body string ✅ Passed
    grep -q '<!-- qa:ci-infra-blocked -->' Same corpus 40 no false positives 0 false positives ✅ Passed

    Motivating-example fixtures from issue body: 1 — run against the implementation, matched.

    Verification Status: Passed

    A real bug was caught by this step. The obvious filter — sed '/marker/,/^### /d' — was dogfooded against a real QA comment and silently deleted the following ### Required Fixes header, orphaning a genuinely actionable finding inside the CI section. sed ranges are end-inclusive. Replaced with an exclusive-range awk before commit. This is exactly the silent-detection-failure class §6c exists to catch.


    Anti-Pattern Detection

    Dependency Audit: N/A — no package.json changes.

    Code Patterns: No findings. No any, no empty catch, no hardcoded secrets, no unbounded loops. NOT_STARTED_SIGNATURE carries no g flag, so .test() is stateless across calls — no lastIndex reuse hazard.


    Call-Site Review

    New exported functions detected: 3

    Function Call Sites Loop? Conditions AC Match
    allChecksFailing() qa/SKILL.md Phase 1 step 1 (prompt-level) No Gate for the whole block ✅ Matches AC-1
    detectInfraBlockedCi() qa/SKILL.md Phase 1 step 4 (prompt-level) No Inside if [[ "$all_failing" == "true" ]] ✅ Matches AC-1/AC-2
    NOT_STARTED_SIGNATURE Internal + test No - ✅ Used

    All three are consumed from the skill prompt rather than TypeScript callers — the same arrangement as markdown-only-ci.ts, whose exports have no TS call sites either. Not dead exports.


    Smoke Test

    Test Command Result Notes
    Happy path (negative) live gh api chain → detectInfraBlockedCi ✅ {"blocked":false} on healthy CI
    Happy path (positive) detector vs. issue-body fixture bytes ✅ blocked:true, message verbatim
    Edge case marker section last in document ✅ no orphaned infra text
    Edge case marker absent ✅ byte-identical pass-through, 40 real samples
    Error handling null / missing message fields ✅ no throw, returns {blocked:false}

    Smoke Test Status: Complete


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (fix: commits)
    [Unreleased] entry ✅ Present under ### Fixed
    Entry format ✅ Valid, includes (#820)

    Result: CHANGELOG requirements met


    Risk Assessment

    • Likely failure mode: GitHub changes the lockout annotation wording and the signature stops matching. Detection then degrades silently back to today's NOT_MET behavior — a safe direction to fail (no false infra-blocked classification, so nothing gets waved through) but invisible when it happens.
    • Not tested: A live positive case end-to-end. The unit tests cover classification given annotations, and the gh api chain is verified live on healthy CI; the fetch-and-assemble loop between them is prompt-level and only fully exercised on a genuinely locked-out repo. Accepted — the alternative is waiting for another billing incident.
    • Sibling sites considered: src/lib/qa/markdown-only-ci.ts is the structural sibling and was deliberately followed as the pattern, not modified — it operates on the pending bucket, this on fail, and the two do not interact (the doc already states failed checks are never relaxed, so a fail-bucket check can never enter the relaxation path). The CLI-side equivalent in merge --watch is feat(merge): --watch — wait for CI checks to finish, then run merge-check and report (kills the merge-after-green polling loop) #818's scope, explicitly a Non-Goal here and left alone.
    • Sibling-line audit: The three other rows in the CI Status Mapping table (SUCCESS, SKIPPED, the PENDING family) were each re-read for the same "verdict value used where an AC status belongs" defect found in the new row. All three already use correct AC-status vocabulary. One pre-existing loose phrasing survives at qa/SKILL.md:1174 ("the verdict is NEEDS_VERIFICATION for that AC", in the turn-capped-checks section) — it says "verdict" rather than putting the value in an AC-status column, so it is not load-bearing in §7's counters. Left unchanged: out of scope, and not a defect.

    Adversarial Re-Read

    Findings: Two real defects surfaced at commit 30baf8e and fixed at 6343861 before verdict. Both would have shipped.

    1. NEEDS_VERIFICATION used as an AC status. §7 counts only MET / PARTIALLY_MET / PENDING / NOT_MET. An AC stamped NEEDS_VERIFICATION falls into no bucket, increments no counter, and lets the algorithm fall through to READY_FOR_MERGE on a fully-red board — strictly worse than the misclassification this issue exists to fix. Now PENDING, routed through the existing pending_count > 0 branch. Four sites updated consistently.
    2. The /loop filter was inert. It assigned actionable and nothing read it — and worse, the extraction it was meant to filter (verdict, not_met_acs, recommendations) runs earlier in the document, so even a careful reader would have filtered after the fact. The filter now rebinds qa_comment itself so every existing consumer picks it up unchanged, qa_comment_raw preserves the original for verbatim cause reporting, and Step 1's parsing block carries an explicit run-this-first precondition.

    Re-reading current HEAD 6343861 against the same five checks: motivating-example fixture run against the implementation using the issue's own bytes (✅); no evidence claim is a pre-fix repro — the live gh api run and the 20-sample corpus run are post-implementation validations (✅); process state clean — 9 files staged, no stray untracked work, branch 0 behind origin/main (✅); sibling sites cited explicitly above rather than hand-waved (✅); all three issue Non-Goals held — no merge --watch change, no generic infra classifier, no billing pre-flight (✅).

    Status: Clean (at 6343861; the two gaps above were found and fixed within this review cycle, not deferred)


    Verdict: READY_FOR_MERGE

    All 6 ACs met. CI 8/8 green. Skill commands verified against live API output, detection patterns verified against a real 304-comment corpus rather than synthetic fixtures, and the new module's negative assertions proven non-vacuous by mutation testing. Two would-ship defects were caught by the adversarial re-read and fixed before this verdict.

    One deliberate divergence from AC-2's literal wording is documented above and inline in the skill: the AC status is PENDING, which is how this skill's vocabulary produces the NEEDS_VERIFICATION verdict AC-2 asks for.

    Documentation

    • CHANGELOG entry added ([Unreleased] → Fixed)
    • Skill docs are themselves the feature — both qa and loop document the new behavior
    • README/docs — N/A, no user-facing CLI surface change

    Next Steps

    1. Human review and merge of PR fix(#820): classify runner-never-started CI (billing lockout) as infra-blocked, not NOT_MET #828 — a QA verdict is not merge authorization.
    2. After merge, feat(skills): shared trust-model block — issue/PR text is data, not agent instructions (prompt-injection hardening, portable to all users) #819 can proceed; it touches the same two skill files and was sequenced behind this one.
    3. If another billing lockout ever occurs, capture the annotation and confirm the positive path end-to-end — the one thing that could not be exercised live here.
  7. added
    ready-for-review
    on Jul 27, 2026
  8. admarble commented on Jul 27, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete

    Issue: #820 · Status: READY_FOR_MERGE · PR: #828

    Phase Iterations Status
    Spec 1/1 Complete — 6 ACs, SCOPE_WARNING (quality loop on)
    Exec 1/1 Complete
    Test — Skipped (no UI labels)
    QA 1/2 Complete — 2 defects found and fixed in-cycle, no /loop needed

    AC: 6/6 MET · CI: 8/8 green · Tests: 4278 passed (18 new)

    Full review: the QA comment above. Two would-ship defects were caught by the adversarial re-read and fixed at 6343861 before the verdict:

    1. NEEDS_VERIFICATION used as an AC status — a verdict value that §7's counters do not recognise, which could have let a fully-red board reach READY_FOR_MERGE. Now PENDING.
    2. The /loop exclusion filter was inert — assigned but never read, and positioned after the extraction it was meant to filter. Now rebinds qa_comment in the data path.

    A third bug was caught during implementation: the obvious sed '/marker/,/^### /d' filter silently ate the following ### Required Fixes header. Replaced with an exclusive-range awk, verified across 20 real /qa comments.

    Not merged — awaiting human review. #819 touches the same two skill files and should land after this.

  9. added a commit that references this issue on Jul 27, 2026
  10. admarble commented on Jul 27, 2026

    @admarble
    ContributorAuthor

    Gap Pass — #820

    Adversarial gap analysis over the committed state (6343861), independent of the QA verdict. Six hypotheses tested, five real gaps found and fixed, one rejected.

    Gaps found and fixed

    # Gap Why it mattered
    A The Phase 1 procedure's core step was a comment, not code. Steps 3–4 said "collect annotations" / "classify" in prose; annotations_json was fetched and then never consumed. An agent following it literally would fetch data and have nothing to do with it. Same assigned-but-never-read defect already fixed on the /loop side — it had a twin sitting in the qa skill.
    B $ci_buckets was read but never defined. The gate would have evaluated against an empty string on every run.
    C detectInfraBlockedCi threw a TypeError on a non-array annotations. A 404 / rate limit / revoked token makes gh api return {"message":"Not Found"} where an array is expected. Crashing the QA phase is the worst possible response for a detector whose entire purpose is handling broken CI gracefully.
    D CHANGELOG and PR body still described the pre-fix NEEDS_VERIFICATION-as-AC-status behavior. Both now describe what the code actually does, including why PENDING is correct.
    E No graceful degradation in the shell. Every failure path now yields {"blocked":false} and falls through to today's unchanged mapping. An API error must never be reported as infra-blocked, and must never abort the run.

    Rejected

    Verified by execution, not by reading

    The procedure in qa/SKILL.md was run verbatim — the whole point of this issue is that unverified skill commands fail silently:

    Path Result
    Healthy CI (8 passing) all_failing=false → no annotation query fires (AC-4)
    Forced branch, real API 8 checks assembled with their annotations
    Incident fixture through the real step-4/5 shell blocked=true, message verbatim incl. the 'Billing & plans' apostrophes
    Annotations URL that 404s degrades to [], scan continues
    {"message":"Bad credentials"} into step 4 {"blocked":false}, no throw

    Mutation-tested: removing the new Array.isArray guard fails 2 tests; every→some fails 3; loosening the regex to /started/i fails 1.

    Incidental: CI dispatch was blocked

    After pushing the fixes, gh pr checks reported zero checks. Cause was mergeable: CONFLICTING / mergeStateStatus: DIRTY — #822 had landed on main and both PRs added a CHANGELOG entry at the top of ### Fixed. Merged origin/main (not rebased — the branch is pushed), kept both entries, and CI dispatched again.

    Worth noting because it is the sibling of this issue's own subject: a second way CI can be red-or-absent for a non-code reason. It is already covered — #818 AC-3 handles the zero-checks/CONFLICTING trap on the CLI side, and this issue's Out-of-scope section correctly assigns it there.

    State

    • CI: 8/8 green at 2ae74c7
    • Tests: 207 files, 4298 passed, 1 expected fail, 2 skipped
    • Skill sync: 42 synced, 0 diverged
    • Verdict unchanged: READY_FOR_MERGE — still awaiting human review, not merged.
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

    bugplannedqaready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions