Skip to content

feat(#929): sequant ready never records run metrics — no visibility into escalation, iteration counts, or gate outcomes - #1401

Merged
admarble merged 3 commits into
mainfrom
feature/929-feat-ready-sequant-ready-never-records-run-metrics
Oct 10, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/929-feat-ready-sequant-ready-never-records-run-metrics

Conversation

@admarble

@admarble admarble commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Standalone sequant ready <issue> now records its gate pass to .sequant/metrics.json as a MetricRun with source: "ready" (graph doc D-3: reuse MetricRun with a discriminator).

Fixes #929

Acceptance criteria

  • AC-1: one source: "ready" record per gate pass, and a writer failure leaves the exit code unchanged. Covered by ready.metrics.test.ts.
  • AC-2: the record carries policy, outcome, iterations and effortEscalations. Covered by ready.metrics.test.ts › AC-2.
  • AC-3: sequant stats counts ready runs separately. Covered by stats-source.test.ts.
  • AC-4: legacy records read as source: "run". Covered by metrics-schema.source.test.ts.
  • AC-5: run --ready-gate recording is unchanged. The feat(loop): evidence-based effort escalation on quality-loop retries #915 tests pass, and createMetricRun and recordRun default the source to "run".

Mutation-verified: AC-1 — buildReadyMetricsRecord writes source: "run"; src/commands/ready.metrics.test.ts > readyCommand — #929 metrics recording > AC-1: writes one source:ready record; failure keeps exit code > calls MetricsWriter.recordRun once with source 'ready' after runReadyGate resolves failed alone; restored.

Mutation-verified: AC-3 — calculateSourceBreakdown puts every record in the run bucket; src/commands/stats-source.test.ts > statsCommand — #929 by-source breakdown > AC-3: ready runs counted separately from run runs > --json reports bySource.run.total === 1 and bySource.ready.total === 1 failed (4 of 5 in the file); restored.

Mutation-verified: AC-4 — removed .default("run") from MetricRun.source; src/lib/workflow/metrics-schema.source.test.ts > MetricRun source (#929) > AC-4: legacy records read as source 'run' > parses a metrics file whose run has no source into runs[0].source === 'run' failed alone; restored.

Runner verification (graph-2026-10-freeze, wave 2)

  • QA: AC_MET_BUT_NOT_A_PLUS (5/5). The runner fixed QA's three fix_now findings in a79df1af:
    • --json --verbose printed a non-JSON line on stdout. The writer's verbose "Metrics recorded" line went to stdout. The writer is now quiet under --json. A new test asserts it, and restoring options.verbose fails that test.
    • Stale comment. The feat(run): model escalation ladder on capability-bound non-convergence #971 comment said standalone ready has no metrics record. It does now, so the comment is corrected.
    • Mutation records: run and recorded above.
  • Merged main. ready.metrics, stats-source, metrics-schema.source, stats and ready tests: 69 passed. tsc --noEmit is clean.
  • Plugin freeze (I-1): git diff --name-only origin/main...HEAD | grep -E '^(plugin|\.claude/skills|templates/skills)/' is empty.

🤖 Generated with Claude Code

@admarble
admarble merged commit 83a963e into main Oct 10, 2026
8 checks passed
@admarble
admarble deleted the feature/929-feat-ready-sequant-ready-never-records-run-metrics branch October 10, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ready): sequant ready never records run metrics — no visibility into escalation, iteration counts, or gate outcomes

1 participant