Skip to content
SprecherEast
Issue 371

tech-debt: Intelligence runner follow-ups from the #369 reviews

Back to our plan
Open
toolingtech-debtpriority: low

Problem

Small follow-ups from the independent re-checks of #369 (the intelligence runner), none blocking:

  1. A pending follow-up report the CMS refuses permanently is retried every run with no attempt or age limit, so every run ends partial.
  2. When the 50-entry cap on pending follow-up reports drops one, nothing is logged.
  3. When the CMS is down, the resend step tries every pending report instead of stopping at the first failure.
  4. When a candidate is invalid and the report about it is also invalid, the item is marked seen but neither seen nor rejected is counted.
  5. When submitSuggestion fails and the fallback review report can't pass its schema, the item is retried daily instead of handled.
  6. Not built yet (the runner README): the Playwright fallback and HTML sources (#352), and a code guard for low verify confidence after the rerun.
  7. The Intelligence check job isn't a required check in the main ruleset, 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

See it on GitHub, opens in a new tab