bridge: include inbox.pull observability meta#149
Merged
benvinegar merged 1 commit intomainfrom Feb 23, 2026
Merged
Conversation
Greptile SummaryAdds observability metadata to broker inbox pull requests to enable broker-side monitoring and diagnostics. The implementation correctly excludes the Key additions:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Bridge as broker-bridge.mjs
participant FS as File System
participant Broker as Broker API
Bridge->>Bridge: startPollLoop()
Bridge->>Bridge: pullInbox()
Bridge->>Bridge: buildPullMeta()
Bridge->>FS: readAgentVersion() from env/file
FS-->>Bridge: agent_version
Bridge->>FS: countActivePiSessions() from socket dir
FS-->>Bridge: active_sessions, active_dev_agents
Bridge->>Bridge: Calculate uptime metrics
Bridge->>Bridge: Collect health counters
Note over Bridge: meta object assembled<br/>(NOT included in signature)
Bridge->>Bridge: signPullRequest(timestamp, max, wait)
Note over Bridge: Signature only covers<br/>protocol payload fields
Bridge->>Broker: POST /api/inbox/pull<br/>{workspace_id, protocol_version,<br/>max_messages, wait_seconds,<br/>timestamp, signature, meta}
Broker-->>Bridge: {messages: [...]}
Bridge->>Bridge: Process messages
Last reviewed commit: 8028b1d |
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.
Summary
Add baudbot-side broker client support for modem-dev/baudbot-services#61 by including an optional
metaobject onPOST /api/inbox/pull.What changed
slack-bridge/broker-bridge.mjsmetapayload on inbox pull requests with:agent_version(fromBAUDBOT_AGENT_VERSIONoverride or~/.pi/agent/baudbot-version.json, fallbackunknown)bridge_uptime_hours,system_uptime_hours)heartbeat_runs,heartbeat_consecutive_errors,heartbeat_last_ok_at)active_sessions,active_dev_agents)outbound_mode,poll_count,max_messages,wait_seconds)test/broker-bridge.integration.test.mjsmetais present and includes expected fields/types.CONFIGURATION.md: documents optionalBAUDBOT_AGENT_VERSION.env.schema: addsBAUDBOT_AGENT_VERSIONValidation
npm test -- test/broker-bridge.integration.test.mjsNotes