docs(agent-workflows): subscription-sidecar recipe: compose network, internal API URL, extension rebuild - #5073
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a keyword-only ChangesHandler Registry Replace Semantics
Subscription Sidecar Documentation
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
Feedback needed: (1) is |
✅ Action performedReview finished.
|
…(sessions persist 401 / trace_id=None) The SDK's static HANDLER_REGISTRY seed for agent.v0 (added in a8f9a51) silently shadowed the agent service's composed + instrumented _agent: register_handler was pure setdefault, so the service's startup registration was a no-op and the bare SDK agent_v0 (noop trace/run context, uninstrumented) ran every /invoke. The run request then carried no telemetry credential — the runner logged '[sessions] ... cred=MISSING' and every runner->API session call 401'd ('[sessions/persist] DROPPED ... HTTP 401'), while /invoke responses returned trace_id=None. Fix: register_handler grows an explicit replace=True (last-writer-wins) and create_agent_app uses it to take ownership of the builtin URI. Unit tests pin both semantics, including the exact seeded-builtin override shape. Also documents the sidecar recipe's AGENTA_API_INTERNAL_URL (the runner->API base the compose runner already sets post-#5059) so an ad-hoc sidecar does not depend on inferring a public API URL from run telemetry. Claude-Session: https://claude.ai/code/session_014iPB7HL5PjgT9npyPHaFMT
…lict residue repair) Claude-Session: https://claude.ai/code/session_014iPB7HL5PjgT9npyPHaFMT
…ter_handler always replaces on big-agents) utils.py and app.py return to the big-agents versions; the replace-semantics test is deleted (JP's test_tracing.py covers the merged behavior); the explorer dist build artifacts swept in during conflict resolution are removed. Lane now carries only the subscription-sidecar README recipe note. Claude-Session: https://claude.ai/code/session_014iPB7HL5PjgT9npyPHaFMT
2314302 to
99adfb7
Compare
|
This PR became docs-only: its code fix was superseded by #5081 (merged), the branch is reverted to the merged semantics, and what remains is the sidecar recipe note (+13 lines, one file). Feedback needed: a quick yes/no on merging the recipe note. |
Context
This PR is now docs-only. It originally fixed the agent service's handler registration: the SDK statically seeds a bare default handler for
agenta:builtin:agent:v0, and becauseregister_handlerused setdefault, the service's real handler (with tracing, credentials, and capability gating) was silently ignored. Every invoke ran the bare handler, which caused missing trace ids, session-persist 401s from the sidecar, and a capability-gating bypass.JP's #5081 fixed the same root cause upstream, in a simpler form:
register_handlernow always replaces, and the bare handler itself became ambient-aware. This branch has been reverted to those merged semantics and its now-obsolete regression test deleted.What remains
One file: the subscription-sidecar recipe (
docs/design/agent-workflows/projects/subscription-sidecar/README.md, +13 lines). It captures two operational facts we learned while live-debugging the 401s, and they exist nowhere else:AGENTA_API_INTERNAL_URL=http://api:8000, so the runner's session calls (persist, heartbeat, interactions) reach the API over the direct network hop and authenticate correctly.node scripts/build-extension.mjs). Its startup command does not do this today, so a plain restart loads a stale bundle.How to review
Read the README diff. Check the two facts against your own sidecar setup; both were validated live on the dev box on 2026-07-05/06.
https://claude.ai/code/session_014iPB7HL5PjgT9npyPHaFMT