Repository navigation
feat(bot): show the broker in the startup banner, drop the public key from workers - #395
Merged
Merged
Conversation
…k a worker for less A worker no longer needs DISCORD_PUBLIC_KEY, and its banner shows the stream, group and consumer instead of the HTTP server and API it never starts.
Architecture Data flow No data-flow sequence changed in this PR. Review ✨ Nothing flagged · reviewed Tip Set 🪧 More tips
Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it. |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: the single commit on feat/worker-startup, read end to end against the base.
- Startup banner:
formatStartupStatusinlib/utilities/startup.tsbuilds the status lines as a pure function. A worker showsModeandBroker(stream, group, consumer) and omits HTTP and API, and the gateway shows whether it forwards dispatches.main.tsgathers the inputs inreadStartupStatus(), and its fallbacks (wolfstar:events,workers,worker-1,127.0.0.1:3000,127.0.0.1:8282) match the defaults in.env.schema. DISCORD_PUBLIC_KEYonly for the gateway: the schema requirement is nowand(forEnv(development, production), eq($BOT_MODE, gateway)), andcreateClient()passes a placeholder whenisWorker(). The other reader of the key,sharder/manager.ts, is unreachable from a worker becauseisShardManager()includes!isWorker().- Tests and docs:
startup.test.tscovers the gateway (broker on and off, API off) and the worker, andAGENTS.mdis updated to match.
claude-sonnet-5-5 | 𝕏
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.

🔗 Linked issue
None.
❓ Type of change
📚 Description
A worker (
BOT_MODE=worker) printed the startup lines of the gateway turned off, and did not say which stream it reads or under which name. It also had to be givenDISCORD_PUBLIC_KEY, though it serves no interactions.The banner now has a
Modeline and aBrokerline. A worker shows its stream, consumer group and consumer, and leaves out the HTTP and API lines. The gateway says whether it forwards the dispatches. The lines come fromformatStartupStatusinlib/utilities/startup.ts.DISCORD_PUBLIC_KEYis required only withBOT_MODE=gateway. The framework refuses an empty key, socreateClient()gives a worker a placeholder it never uses. A worker can also run without theHTTP_*,API_*andOAUTH_*variables, which already have defaults or are optional.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Reviews (2) · Last reviewed commit: "Merge branch 'V7' into feat/worker-start..." · Reviewed by Greptile