The standalone worker entry gets the watchdogs, and can finally build - #81
Merged
Merged
Conversation
apps/worker/src/main.js is the entry for splitting workers onto their own service. It had no watchdog, because the one added yesterday went into the combined entry next door. A worker has less to show for a wedge than a web process does, not more. There is no page to hang, so a worker stuck on a client simply stops doing the work and nothing anywhere goes red; this entry answers no requests at all, so there is not even a slow page for somebody to notice. That is the case the watchdog is most worth having, and it was the one place without it. While wiring it: this file has never been able to build. It imports configurePayments from @tipoff/payments and apps/worker/package.json does not declare it, so `bun build apps/worker/src/main.js` fails to resolve on origin/main too, unchanged. The comment at the top promises that splitting the workers off is a Railway variable change and a different start command "with no code to rewrite", and it would have failed at import instead. One line, and the entry builds for the first time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
apps/worker/src/main.jsis the entry for splitting workers onto their own service. It hadno watchdog, because the one added in #79 went into the combined entry next door and #80
moved that to the package.
Why the worker is the case that most needs it
A worker has less to show for a wedge than a web process, not more. There is no page to
hang, so a worker stuck on a client simply stops doing the work and nothing anywhere goes
red. This entry answers no requests at all, so there is not even a slow page for somebody to
notice. The three outages behind all of this were only caught because a human loaded the
site.
Same two probes, same shared
sqlhandle and sharedconnection, same package, sametimings.
stop()runs first onSIGTERMso a clean drain is not read as a wedge.It has never been able to build
Found while wiring it. This file imports
configurePaymentsfrom@tipoff/payments, andapps/worker/package.jsondoes not declare it:That reproduces on unmodified
origin/main, so it is pre-existing and not from this change(verified by stashing this diff and rebuilding). The comment at the top of the file promises
that splitting the workers off is a Railway variable change and a different start command
"with no code to rewrite" — in fact it would have failed at import.
One line added to
apps/worker/package.json, and the entry builds for the first time(2.15 MB bundle). Nothing deployed runs this entry today: the live services run
apps/web/src/main.jswithROLES, so this is a latent defect rather than an outage.Testing
bun build apps/worker/src/main.jsnow resolves and bundles.biome checkclean. 25 pass /0 fail on config and nichedb-plays. The package itself carries the watchdog's own 19 tests.
Same change is going to genrewatch and watchnews; genrewatch already declares its payments
package, so only the watchdog part applies there.
🤖 Generated with Claude Code