Skip to content

Extract shared roll-up helper for VERIFY_SKIPS index-rewrite pattern #173

Description

@aaddrick

Context

Follow-up from #163 / PR #172 (fix(quality-gate): tally the quality gate and stop swallowing its cap).

PR #172 introduced a "remembered index, rewrite in place" roll-up pattern (ctx.quality_cap_skip_index) so that quality-gate cap exhaustion produces exactly one VERIFY_SKIPS entry per issue instead of one per iteration.

Two existing call sites in .claude/workflows/ticketmill.js push unbounded VERIFY_SKIPS entries with no roll-up, one per scope per iteration:

  • :3092 — the quality loop's empty-findings VERIFY_SKIPS push
  • :3624 — the test loop's twin of the same push

Both were deliberately left out of #163's scope (that issue was specifically about the quality gate's missing recordGateOutcome/cap-note wiring, not about these two lines) but were flagged by both spec review and code review as needing the same treatment.

Proposed change

Extract the "remembered index, rewrite in place" pattern used for ctx.quality_cap_skip_index into a shared helper, and point all three call sites at it:

  1. The existing quality-gate cap roll-up added in fix(quality-gate): tally the quality gate and bound its cap line (#163) #172.
  2. :3092 (quality loop empty-findings push).
  3. :3624 (test loop empty-findings push).

This avoids triplicating the same roll-up logic under three differently-named remembered-index fields, and fixes the unbounded-entries problem at :3092/:3624 as a side effect.

Note

.claude/workflows/ticketmill.js is engine-owned; changes here should go through the normal engine-change process, not be folded into an unrelated issue's PR.


Ref: #163, #172

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgate-hygieneGate hygiene: findings, caps, and per-problem budgets (sequenced)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions