fix(server): wire summary-slots (and friends) to the plugin worker manager, guard the class - #308
Open
stubbi wants to merge 1 commit into
Open
fix(server): wire summary-slots (and friends) to the plugin worker manager, guard the class#308stubbi wants to merge 1 commit into
stubbi wants to merge 1 commit into
Conversation
Enumerating the affected routes by hand missed two of them, and one recurred in production after the first fix landed. A route can dispatch a run either by calling heartbeat.wakeup() directly or by handing its heartbeat to a helper such as queueIssueAssignmentWakeup, and only the first is greppable, so summary-slots and status-cards were both missed. - summary-slots and status-cards dispatch via queueIssueAssignmentWakeup and were producing failed runs in production. - activity and instance-settings do not dispatch today, but are wired too so the rule is uniform and cannot rot as those routes grow. - A guard test enforces both halves: no route builds a heartbeat service without the manager, and app.ts hands one to every route that accepts it. This is what found status-cards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #304. Upstream: paperclipai#10262.
It recurred
#304 fixed three routes. Runs kept failing after it rolled:
They carry the NEW message from #304's second commit,
Sandbox provider "kubernetes" is installed, but sandbox plugin workers are unavailable in this server process, which named the cause immediately instead of blaming a healthy worker. That part worked.Why the first sweep missed it
I enumerated affected routes by grepping for
heartbeat.wakeup(. But a route can also dispatch by handing its heartbeat to a helper:summarySlotRoutesdoes exactly that and is mounted assummarySlotRoutes(db), so it built an unwired heartbeat and every run it dispatched failed setup. The two recovery runs are the in-process reaction to that first failure.Hand enumeration missed this twice. So this PR stops enumerating.
Changes
summarySlotRoutesaccepts and forwardspluginWorkerManager. This is the production bug.activityRoutesandinstanceSettingsRoutesare wired too. Neither dispatches today (getRun,reconcileIssueGraphLiveness, verified no run creation), but wiring them makes the rule uniform so it cannot rot as those routes grow.route-plugin-worker-wiring-guard.test.tsenforces both halves statically: no route builds a heartbeat service without the manager, andapp.tshands one to every route that accepts it.The guard is not theoretical. Run against the tree as it stood, it immediately flagged four offenders, including
status-cards.ts, which I had not found by hand.status-cardsis upstream-only and not mounted in this fork, so it is fixed in the upstream PR and omitted here.Verification
pnpm typecheckclean.Risk
Low. All options parameters default to
{}. Additive dependency threading plus a static test.