Skip to content

refactor(hub): read verdicts and catch-up from the managers - #644

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-11525-read-verdicts-from-the-managers
Oct 26, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-11525-read-verdicts-from-the-managers

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of CL-11525. Third of the stacked PRs that remove the old pr-triage path.

Why

Every pull request now runs in a manager, but the reconciler, the verdict list and the catch-up status still read pr-triage's run logs. Nothing writes those logs any more.

What changed

  • The reconciler and the verdict list read only the managers' runs and their recorded verdicts.
    • Removed the tenant observer, the run recorder and its 2-second loop, and the run-log parsing behind them.
    • triage-runs.ts keeps only what held Dos and the audit log read from a run's log: its verdict and its approval.
  • The verdict list:
    • no longer answers unknown for a run, so the contract drops that status;
    • shows a manager's run only while it has a pass open, timed from when it took that pass. A manager between passes, such as one waiting on a reviewer, shows no run, so the Inbox does not show it as live and a held Do can be approved;
    • keeps its cached answer until the managers' runs change.
  • Removed the workflow-version bookkeeping: the stale-verdict reset, version stamping on rows, and withWorkflowVersions. This is intended: a head that used up its attempts no longer gets another try after an upgrade. Triage again covers it.
  • Removed the hub's judge-answer carrying between runs. DECISION_MODEL.md now describes the managers' reuse: a head's decided judge verdict is kept for that head, and the judge is asked again only while the host's checks could change it, or for a new head. The workflow-side receiving code (judged in facts, rules, parts and evaluate) is left to slice 5, because changing it changes how the workflow judges and needs an eval.
  • The portal shows Catching up for a repository with no verdict yet while one of its pull requests has a manager's run going. It reads this from the verdict list. The portal's run-log reading is removed: run-logs.ts, useRuns, the run-log query keys and their persistence.
  • ARCHITECTURE.md, IMPLEMENTATION.md and DECISION_MODEL.md are updated.

The Bitbucket host check test asked for in this slice landed in #641.

The policy check flags three ?? [] lines. Each one means there is nothing yet: no recorded runs for a head, or no verdict list loaded. Each matches an existing line next to it.

Verified

  • bun run check, bun run lint and the policy check pass, apart from the three lines above.
  • Hub, triage-contracts and triage-manager tests: 716 pass. The stats test timed out once under load and passes on its own.
  • Portal tests: 273 pass, plus 7 DOM tests.
  • The stats test in server.test.ts now records its verdicts the way a manager's pass does (summaryOf and replaceVerdict).
  • The verdict list test checks that a manager between passes shows no run.
  • The reconciler test now drives the managers' runs directly. Tests of the deleted log reading, recording, version stamping and judge-answer carrying were removed with that code.

@linear-code

linear-code Bot commented Oct 26, 2026

Copy link
Copy Markdown

CL-11525

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 26, 2026 20:37
@TheGreatAxios
TheGreatAxios merged commit a317159 into main Oct 26, 2026
4 checks passed
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.

1 participant