Skip to content

fix(build): register broker-agent in SERVICES and skip next build for daemons#1125

Merged
imajin-jin merged 1 commit into
ima-jin:mainfrom
veteze:fix/broker-agent-build-preflight
Jun 19, 2026
Merged

fix(build): register broker-agent in SERVICES and skip next build for daemons#1125
imajin-jin merged 1 commit into
ima-jin:mainfrom
veteze:fix/broker-agent-build-preflight

Conversation

@veteze

@veteze veteze commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Problem

Dev deployment was failing with two errors after #1101 (broker-agent) merged to main:

  1. check-env.ts exiting with "Unknown service: broker-agent"build.sh calls check-env.ts for every app detected by build-changed.sh. check-env.ts validates service names against the SERVICES manifest in packages/config/src/services.ts. broker-agent was missing from that list.

  2. npx next build failing in apps/broker-agentbuild.sh unconditionally runs next build for every app. broker-agent is a plain tsx daemon, not a Next.js app, so next build fails immediately.

Fix

packages/config/src/services.ts — adds broker-agent to SERVICES with devPort/prodPort = 0 (no HTTP port) and visibility = internal. This satisfies check-env.ts and keeps the entry honest about what it is.

scripts/build.sh — before attempting next build, checks whether the app has a next.config.js, next.config.ts, or next.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

… 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 imajin-jin merged commit 1cc4e3d into ima-jin:main Jun 19, 2026
7 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants