Start the app and the server from bun run dev, and leave the routines worker to start.sh - #468
Open
zopeVaibhav wants to merge 1 commit into
Open
Conversation
…es worker to start.sh
zopeVaibhav
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso and
tylerslaton
as code owners
September 9, 2026 18:48
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.
Fixes #467
What this changes
bun run devfanned out with--filter '*', which selects all three workspaces, and the third of them is the routines worker. That worker is handedDATABASE_URL,SERVER_INTERNAL_URLandWORKER_SHARED_SECRETbyscripts/start.shand by nothing else, so the copy this command started read none of them and threw at boot on every run. It has never started successfully on any machine —worker/package.jsonhas one commit in its history, and.env.exampleships the secret empty by design, so even adding--env-file=../.envwould leave a fresh clone throwing.The command now names its two packages, which is what
README.md:339anddocs/development.md:34already say it does.buildandtypecheckstill use--filter '*', so the worker is compiled and typechecked exactly as before.Making the worker start instead would have been the worse fix.
scripts/start.sh:329records that itspgrepguard matchesbun worker/src/index.tsspecifically, because thecd worker && bun src/index.tsform also matches three Dockerfiles. A worker started bybun run devruns under that second form, sostart.shwould not see it and would start a second worker beside it.One line in the repository does read the other way, and it is worth naming rather than leaving to be
found.
CHANGELOG.md:113says "scripts/start.shlooks for a process it does not start the waybun run devdoes", so somebody was aware a worker process comes out of this command. It is writtenas a hazard rather than as an endorsement, and the hazard is hypothetical, because that worker throws
before it can claim anything. Nothing else in the repository asks for a worker here:
git log -Sshows the
--filter '*'in this script has never been edited since the initial commit, and bothplaces that describe the command scope it to two processes. If the arrangement was deliberate, say so
and I will close this — the alternative fix, wiring
--env-file=../.envintoworker/package.json,is one line, though
.env.exampleshipping the secret empty means a fresh clone would still throw.Where it runs
bun run dev; Kubernetes fires routines from the CronJob and a laptop fromscripts/start.sh.Boundary and audit
Changelog
Unreleased.Proof
Reproduced on
origin/main1c7bd92.bun run --filter worker dev— the exact command--filter '*'issues for that workspace:The new test fails against
main's script and passes against this one. Same test file, onlypackage.jsonswapped for the one onmain:End to end.
bun run devon this branch, on spare ports so it did not collide with a runningstack:
VITE ready, app on 3910,OpenBot server listening on http://localhost:3901, and zero linesin the whole run mentioning either the worker or
WORKER_SHARED_SECRET.The worker still starts by its supported path. Launched the way
scripts/start.sh:335launchesit, from the repository root with the three settings it expects:
Gates. Typecheck clean across all three workspaces — the worker is still compiled, because
buildandtypecheckkeep--filter '*'. Lint 604 files, format 600 files, no diff.Suite, run in one session against a same-session control, with the two
agent-handoff-*.integrationfiles excluded because they fail most of their tests on baremainandmake any comparison meaningless:
origin/main@1c7bd92The failing test names are byte-identical on both sides, as is the
@langchain/core/messagesresolution error, so none of them belong to this change. The difference is exactly the three tests
added here.