Issue 371
tech-debt: Intelligence runner follow-ups from the #369 reviews
Back to our planOpen
toolingtech-debtpriority: low
Problem
Small follow-ups from the independent re-checks of #369 (the intelligence runner), none blocking:
- A pending follow-up report the CMS refuses permanently is retried every run with no attempt or age limit, so every run ends
partial. - When the 50-entry cap on pending follow-up reports drops one, nothing is logged.
- When the CMS is down, the resend step tries every pending report instead of stopping at the first failure.
- When a candidate is invalid and the report about it is also invalid, the item is marked seen but neither
seennorrejectedis counted. - When
submitSuggestionfails and the fallback review report can't pass its schema, the item is retried daily instead of handled. - Not built yet (the runner README): the Playwright fallback and HTML sources (#352), and a code guard for low verify confidence after the rerun.
- The
Intelligence checkjob isn't a required check in themainruleset, so failing runner tests don't block a merge (owner setting).
Proposed fix
1–5 in intelligence/runner/lib/process.mjs and submit.mjs, with tests: an attempt count on pending reports (drop and log after 5 runs), log cap drops, stop the resend loop on a transient failure, and count the two invalid-report paths as handled and rejected. 6 as their own issues when a source needs them. 7 is for the owner.
Acceptance criteria
- Not done: A permanently refused pending report stops after 5 runs, logged.
- Not done: Cap drops are logged; the resend stops on the first transient failure.
- Not done: Both invalid-report paths count as handled and rejected; tests cover each.
Area
tooling
Priority
low