Skip to content

[fix] Harden agent round-trip QA paths - #4936

Merged
mmabrouk merged 2 commits into
big-agentsfrom
fix/agent-roundtrip-qa-20260630
Jun 30, 2026
Merged

[fix] Harden agent round-trip QA paths#4936
mmabrouk merged 2 commits into
big-agentsfrom
fix/agent-roundtrip-qa-20260630

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Context

Browser QA exposed two round-trip failures in the agent build-kit stack. A sparse commit_revision call 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_revision now 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-revision from successful commit output even when the resumed stream does not replay the original tool call. The playground handles that event through switchEntity, 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.py
  • cd services/agent && pnpm exec vitest run tests/unit/tool-direct.test.ts
  • cd services/oss && uv run --no-sync pytest tests/pytest/unit/agent/test_tracing.py
  • Browser QA on http://144.76.237.122:8280: commit_revision switched to revision 019f1641-7708-78b2-937e-db2bc13de0f3 (v10) and preserved AGENTS.md with marker codex-commit-qa-20260630-0235.
  • Browser QA on request_connection: invoke returned HTTP 200, streamed toolName: request_connection, and rendered the Connection not completed / Retry UI.

What to QA

  • In the QA agent playground, ask the agent to commit a revision. The URL should switch to the new revisions= id and the config panel should show the new version without losing the agent template.
  • Ask the agent to call request_connection for Slack. The inline connection UI should render and settle cleanly if the connection is not completed.

@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jun 30, 2026
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 30, 2026 2:14am

Request Review

@dosubot dosubot Bot added the bug Something isn't working label Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 85dc8105-0b23-47ab-9346-03ca5d9fa13b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/agent-roundtrip-qa-20260630

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk
mmabrouk force-pushed the fix/agent-roundtrip-qa-20260630 branch from 977a462 to 22f2503 Compare June 30, 2026 02:13
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jun 30, 2026
@mmabrouk
mmabrouk changed the base branch from feat/advanced-collapsible-change1 to big-agents June 30, 2026 02:16
@mmabrouk
mmabrouk merged commit 74755eb into big-agents Jun 30, 2026
19 of 20 checks passed
mmabrouk added a commit that referenced this pull request Jun 30, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant