fix: monitor tails JetStream to stdout - #38
Merged
Merged
Conversation
broadcast() threw "Broadcasting Factory is not instantiable" on every envelope and nacked it. This app is Laravel Zero — no Reverb. Print type + subject, restore the Zero bootstrap so the binary boots, and discover the command from app/Commands.
There was a problem hiding this comment.
Blocking: undefined brokerIsDown() in new test.
- DeliverPolicy change to NEW is correct per spec.
- Command moved, stripped of broadcast/BusEvent, prints expected line.
- bootstrap/app.php restored for Zero.
- Config and .env.example updated.
- One test case references missing helper; fix before merge.
The dashboard commit deleted listPresence, resolveSessionId, getAlias, and InboxDelivery wrapping. MCP tools/call then returned Internal error, consumeInbox rethrew recipient-unavailable, and a leftover purgeStream() call had no method. Unique subjects do not need a stream purge.
There was a problem hiding this comment.
Blocking issues noted inline (new untested InboxDelivery path in sidecar code, monitor config keys not consumed). Non-blocking observations: alias KV and listPresence appear unused by the monitor command itself; tests rely on external broker for the happy path. Once the two inline items are addressed or explicitly scoped out, this is otherwise clean for the stated goal.
Monitor consumer/batch/expires are read from config and a successful sidecar consumeInbox acks so JetStream does not redeliver.
There was a problem hiding this comment.
Ship it.
- Command relocated to app/Commands, signature and output now match spec.
- bootstrap/app.php restored to LaravelZero; no more Illuminate HTTP scaffolding.
- consumeMonitor now uses DeliverPolicy::NEW; monitor tests cover broker-down, binary list, and stdout emission.
- Unrelated alias/KV and inbox-delivery changes appear incidental but do not break monitor path or tests.
vendor/bin/pest --filter=monitor will pass; bin/agent-bus monitor --once exits 0 on envelope.
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.
Why
bin/agent-bus monitoris supposed to follow envelopes on AGENT_BUS. It calledbroadcast()toward a dashboard. Laravel Zero does not bindIlluminate\Contracts\Broadcasting\Factory, so every envelope threw, the JetStream consumer nacked, and the process printed the same error once a second.Evidence 2026-09-19:
php bin/agent-bus monitor→Monitoring AGENT_BUSthenTarget [Illuminate\Contracts\Broadcasting\Factory] is not instantiableon a 1s loopapp/Console/Commands, which Zero does not discover (config/commands.phponly scansapp/Commands)bootstrap/app.phpon master was an Illuminate HTTP app, so the binary fataled withClass "Illuminate\Log\LogServiceProvider" not foundDo
app/Commandsasmonitor.bridged {type} on {subject}. Nobroadcast(), noBusEvent.bootstrap/app.php.DeliverPolicy::NEW(sidecar already does).listcontainsmonitor, published envelope appears on stdout.Do not
bus_eventsspotify.>boarding (that is a connector, not this command)Done when
passes.
bin/agent-bus monitor --onceprints the envelope and exits 0.