[fix] Harden agent round-trip QA paths - #4936
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:
✨ 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 |
977a462 to
22f2503
Compare
…host
Builtin app/evaluator service URLs are deterministic from the URI
(`{services_url}/{key}/{version}`), but the read path only recomputed them
when `data.url` was empty. An agent self-update (`commit_revision`) could
persist a Docker-internal host (`http://agenta-agent:8000/v0/invoke`) into
`data.url`, which the API then served verbatim; the browser could not resolve
it (ERR_NAME_NOT_RESOLVED on the builtin `/invoke` call).
- Resolve builtin URLs from the URI on every read (`_resolve_service_url`),
ignoring any stored value; non-builtin URLs keep the stored value.
- Stop persisting a URL for builtin apps on commit.
- Revert the PR #4936 `invocationUrlAtomFamily` FE workaround so builtins use
the normal `data.url` / URI path again (it only ever covered completion/chat,
never agent, so it did not even fix the broken case).
Claude-Session: https://claude.ai/code/session_014emxsaD8EFiNP3m3f56nhD
Context
Browser QA exposed two round-trip failures in the agent build-kit stack. A sparse
commit_revisioncall could clobber stored agent config, and the playground did not reliably switch to the committed revision after a self-update. Resumed streams could also miss the committed-revision event when they only replayed the tool result.Changes
commit_revisionnow uses a preservation-only patch endpoint for self-updates. Omitted fields keep the current revision data instead of replacing it with a partial payload.The Vercel stream adapter emits
data-committed-revisionfrom successful commit output even when the resumed stream does not replay the original tool call. The playground handles that event throughswitchEntity, so the URL and selection bridge move to the new revision.The runner/direct-call path now fails closed when a run-context binding is missing, and tracing normalizes application references into workflow-shaped run context for self-targeting platform tools.
Tests / notes
cd sdks/python && uv run --no-sync pytest oss/tests/pytest/unit/agents/adapters/test_vercel_stream_park.py oss/tests/pytest/unit/agents/platform/test_op_catalog.pycd services/agent && pnpm exec vitest run tests/unit/tool-direct.test.tscd services/oss && uv run --no-sync pytest tests/pytest/unit/agent/test_tracing.pyhttp://144.76.237.122:8280:commit_revisionswitched to revision019f1641-7708-78b2-937e-db2bc13de0f3(v10) and preserved AGENTS.md with markercodex-commit-qa-20260630-0235.request_connection: invoke returned HTTP 200, streamedtoolName: request_connection, and rendered theConnection not completed/RetryUI.What to QA
revisions=id and the config panel should show the new version without losing the agent template.request_connectionfor Slack. The inline connection UI should render and settle cleanly if the connection is not completed.