Skip to content

feat(qa): the verdict line names the author after a QA-only re-run — fall back to the issue's last run log with an exec or loop phase #1556

Open

Description

@admarble

Problem

#1521 (PR #1551) ends every QA verdict comment with _Reviewed in a separate session by <driver> (<model>); the change was written by <driver> (<model>)._. The author side comes only from the current run's phaseResults. After a QA-only re-run (sequant run N --phases qa, or sequant_run with phases: "qa"), there is no exec or loop result, so the line says "the change author was not recorded". QA-only re-runs are common: a qa re-run after a runner fix, or force: true after AC_MET_BUT_NOT_A_PLUS. So the line is least informative exactly when a reader most needs it.

The author is already recorded. Each run log's issues[].phases[] carries model for exec, for example {"phase":"exec","model":"claude-sonnet-5-5"} in the latest .sequant/logs/run-*.json on 2026-10-19. state.json phases do not carry a model, and the issue's SEQUANT_PHASE markers carry resolvedModel only in the schema; real markers omit it.

Owner-requested follow-up from #1521, 2026-10-19.

Acceptance Criteria

  • AC-1: A QA-only run names the author from the issue's most recent earlier run log that has an exec or loop phase. Evidence: npx vitest run src/lib/workflow/qa-verdict-attribution.test.ts -t "qa-only run" → ≥ 2 passed, 0 failed (with an earlier log on exec claude-sonnet-5-5, the line says written by claude-code (claude-sonnet-5-5); with no earlier log, it still says the change author was not recorded). Fails today: there is no such test.
  • AC-2: The fallback reads the log, never agent output. Evidence: grep -cE 'listLogFiles|parseLogFile' src/lib/workflow/qa-verdict-attribution.ts → ≥ 1 (reuses src/lib/run-logs.ts from refactor(logs): one run-log module — parseLogFile, listLogFiles, resolveLogDir, formatDuration defined once #1471)

May touch

src/lib/workflow/qa-verdict-attribution.ts, src/lib/workflow/qa-verdict-attribution.test.ts, src/lib/run-logs.ts (read-only use preferred), CHANGELOG.md.

Non-Goals

  • Changing the line's wording for full runs.
  • Detecting a mid-run driver fallback: the run log records model per phase but no driver field.
  • Writing resolvedModel into SEQUANT_PHASE markers (the skills write those, and the skill freeze applies).
  • Anything under plugin/, .claude/skills/ or templates/skills/.

Activity

  1. added
    enhancement
    on Oct 19, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions