fix(build): register broker-agent in SERVICES and skip next build for daemons#1125
Merged
Merged
Conversation
… daemons Two issues blocking dev deployment after ima-jin#1101 merged: 1. check-env.ts exited with 'Unknown service: broker-agent' — added to SERVICES with devPort/prodPort=0 (no HTTP port), tier=core, visibility=internal 2. build.sh ran next build for every app unconditionally — broker-agent has no next.config.* and is a tsx daemon. Added check: skip next build if no next.config.{js,ts,mjs} found, mark as succeeded and let pm2 restart handle reload. Co-Authored-By: Oz <oz-agent@warp.dev>
imajin-jin
approved these changes
Jun 19, 2026
|
9 tasks
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.



Problem
Dev deployment was failing with two errors after
#1101(broker-agent) merged to main:check-env.tsexiting with "Unknown service: broker-agent" —build.shcallscheck-env.tsfor every app detected bybuild-changed.sh.check-env.tsvalidates service names against theSERVICESmanifest inpackages/config/src/services.ts.broker-agentwas missing from that list.npx next buildfailing inapps/broker-agent—build.shunconditionally runsnext buildfor every app.broker-agentis a plaintsxdaemon, not a Next.js app, sonext buildfails immediately.Fix
packages/config/src/services.ts— addsbroker-agenttoSERVICESwithdevPort/prodPort = 0(no HTTP port) andvisibility = internal. This satisfiescheck-env.tsand keeps the entry honest about what it is.scripts/build.sh— before attemptingnext build, checks whether the app has anext.config.js,next.config.ts, ornext.config.mjs. If none exists, the app is treated as a daemon (build-free), marked as succeeded, and pm2 restart handles the reload as usual.Co-Authored-By: Oz oz-agent@warp.dev