Repository navigation
feat(prime): detect Buzz orchestrator, tailor whisper/murmur guidance - #716
Conversation
Co-Authored-By: SageOx <ox@sageox.ai> SageOx-Session: https://sageox.ai/c/ses_019f910c-f208-710d-8576-45cf1ea190a8
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughPrime output now detects the Buzz orchestrator, adds Buzz-specific manual whisper instructions, carries them through the prime output model, and conditionally renders them in session-context XML. Tests cover Buzz registration and directive rendering. ChangesBuzz prime guidance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
cmd/ox/agent_prime_orchestrator_test.go (1)
22-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake the registration test table-driven.
Add cases for the successful Buzz registration and an unregistered/invalid type so this test follows the repository’s Go testing convention while retaining explicit error-path coverage.
As per coding guidelines, Go test files should use table-driven tests and include error-path coverage.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cmd/ox/agent_prime_orchestrator_test.go` around lines 22 - 31, Convert TestBuzzOrchestratorRegistered into a table-driven test with cases for successful Buzz detection and an unregistered or invalid agent type. Run each case through agentx.NewDetector().DetectByType, assert the expected error state and detection result, and retain clear failure messages for both paths.Source: Coding guidelines
cmd/ox/agent_prime_xml_test.go (1)
275-300: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAssert the session-context and escaping contract.
The whole-document
Containschecks would pass if the directive were emitted outside<session-context>, and the current input does not exercise XML escaping. Make the populated/empty cases table-driven, scope assertions to the session-context block, include XML metacharacters, and cover the writer-error path.As per coding guidelines, Go test files should use table-driven tests and include error-path coverage.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cmd/ox/agent_prime_xml_test.go` around lines 275 - 300, Update TestOutputAgentPrimeXML_OrchestratorDirective to use table-driven populated and empty cases, extract the <session-context> block before asserting directive presence or absence, and include XML metacharacters in the populated directive to verify escaping. Add a writer-error case by using a command output writer that fails, and assert outputAgentPrimeXML returns the expected error.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmd/ox/agent_prime.go`:
- Around line 780-789: Move the Buzz-specific OrchestratorDirective construction
in runAgentPrime before the authentication/degraded return. Ensure the computed
directive is assigned to both the degraded agentPrimeOutput and the normal fresh
output, while remaining a no-op for non-Buzz orchestrators.
---
Nitpick comments:
In `@cmd/ox/agent_prime_orchestrator_test.go`:
- Around line 22-31: Convert TestBuzzOrchestratorRegistered into a table-driven
test with cases for successful Buzz detection and an unregistered or invalid
agent type. Run each case through agentx.NewDetector().DetectByType, assert the
expected error state and detection result, and retain clear failure messages for
both paths.
In `@cmd/ox/agent_prime_xml_test.go`:
- Around line 275-300: Update TestOutputAgentPrimeXML_OrchestratorDirective to
use table-driven populated and empty cases, extract the <session-context> block
before asserting directive presence or absence, and include XML metacharacters
in the populated directive to verify escaping. Add a writer-error case by using
a command output writer that fails, and assert outputAgentPrimeXML returns the
expected error.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ae103388-cd0f-452f-a088-777aded63cb7
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (6)
cmd/ox/agent_prime.gocmd/ox/agent_prime_orchestrator_test.gocmd/ox/agent_prime_xml.gocmd/ox/agent_prime_xml_test.gogo.modinternal/prime/types.go
Co-Authored-By: SageOx <ox@sageox.ai> SageOx-Session: https://sageox.ai/c/ses_019f910c-f208-710d-8576-45cf1ea190a8
|
Addressed the CodeRabbit nitpick in e495aa1: |
Summary
Makes
oxrecognize when it's running under Block's Buzz (block/buzz) — whosebuzz-acpACP harness spawns Claude Code / Codex as sub-agents — and adapt its coordination guidance, since Buzz does not fire the lifecycle hooks SageOx normally relies on.Two parts:
github.com/sageox/agentxv0.1.10 → v0.1.11(merged as sageox/agentx#12), which addsAgentTypeBuzz+ a newEnvironment.ProcessAncestry()probe. Buzz sets no marker env var on the child, so the reliable signal is thatbuzz-acpis always a process ancestor of the agent.ox agent primealready stampsagentx.OrchestratorType()as theX-Orchestratorheader, so once the dep resolves Buzz, detection flows with no change to that call site.buzz, prime emits a newOrchestratorDirective: under Buzz, real-time push-whispers don't arrive (they ride hooks Buzz doesn't fire), so the agent is told to pull teammates' signals withox agent <id> whisperand publish its own withox murmur. A clean no-op for every other environment.flowchart LR Buzz["buzz-acp"] -->|"spawns via ACP"| Agent["Claude / Codex"] Agent -->|"runs ox agent prime"| DET{"orchestrator is buzz?"} DET -->|"yes"| G["emit directive: pull whispers<br/>via ox agent id whisper"] DET -->|"no"| N["normal prime output"] G --> HDR["X-Orchestrator: buzz on API calls"]Change surface (ox):
go.mod/go.sumv0.1.10 → v0.1.11(Buzz detection)internal/prime/types.goOrchestratorDirectivefield on primeOutputcmd/ox/agent_prime.goOrchestratorType() == buzzcmd/ox/agent_prime_xml.goMurmurDirective)cmd/ox/*_test.goScope note: this is the interim, hook-independent shell path (agent runs
ox murmur/ox agent whisper). The durable MCP-based path (anox_murmurtool forwarded over ACPsession/new) is deferred and tracked separately — it needsox mcp serve, which doesn't exist yet.Test Plan
Detect(env hatch,BUZZ_ACP_AGENT_COMMAND, ancestry hit deep/prefixed, plus negative guards thatBUZZ_RELAY_URL/BUZZ_PRIVATE_KEYalone do not detect) + a purewalkAncestryparser test (malformed rows, comm-with-spaces, self-parent loop, 20-level cap, PID-1 exclusion).make test+golangci-lintgreen; ancestry probe validated on a live host (returned[go zsh claude conductor-runtime conductor]— correctly surfaced the real orchestrator).TestBuzzOrchestratorRegistered(Buzz registered in the default registry and detectsORCHESTRATOR_ENV=buzz— deterministic viaDetectByType, so it doesn't flake when the host also sets Conductor env vars) andTestOutputAgentPrimeXML_OrchestratorDirective(directive emitted when set, no-op when empty).make lint→ 0 issues;make test→ 16,879 passed, 0 failed.Checklist (expand if needed)
v0.1.11entry; the ox side is additive guidance (no user-facing CLI/behavior change beyond a prime directive), so no ox CHANGELOG entryEnvironmentinterface gained a method, verified non-breaking for ox (no ox-side implementers; full build + tests pass)/security-review— N/A. No auth/MCP/session-writer/redaction/upgrade code touched; the onlygo.sumchange is the agentx version bump (a SageOx-owned module reviewed in feat(orchestrators): add Buzz (block/buzz) orchestrator detection agentx#12)Co-authored-by: SageOx ox@sageox.ai
Summary by CodeRabbit