Skip to content

test(agent): align acceptance/integration tests with agent refactors#4826

Merged
mmabrouk merged 2 commits into
big-agentsfrom
fix/agent-acceptance-test-drift
Jun 24, 2026
Merged

test(agent): align acceptance/integration tests with agent refactors#4826
mmabrouk merged 2 commits into
big-agentsfrom
fix/agent-acceptance-test-drift

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Symptom

The acceptance + integration test suites were skipped on #4791 while the agenta-web build was broken. Once #4822 fixed the build, they ran and surfaced pre-existing drift on big-agents:

  • run-sdk-tests (acceptance): test_agent_alias_is_not_registered failed — the agent builtin now ships a registered interface.
  • run-services-tests (integration): 15 failures — AttributeError: ... has no attribute 'agenta_api_base'.

Root cause

Two agent refactors already on big-agents weren't reflected in these tests:

  1. The agent builtin (agenta:builtin:agent:v0) registers an interface (schemas) but no in-process handler — it runs in the sidecar. The old test asserted it was fully unregistered.
  2. Gateway/secret resolution moved into the SDK platform package (feat(agent): agent workflow service and tool-resolution API #4772). oss/src/agent/tools/{gateway,secrets}.py and oss/src/agent/secrets.py are now thin re-export shims, so the module-level agenta_api_base / request_authorization / httpx / log the tests patched no longer exist on them.

Fix (tests only)

  • Rename + correct the sdk test to assert the agent interface is registered and the handler is absent.
  • Repoint the integration conftest to patch PlatformConnection's _derive_base_url / _derive_authorization helpers, and patch httpx/log on the SDK platform gateway/secrets modules (where the resolvers actually run). Test intent preserved; no tests deleted.

Verification

  • sdk test_new_uri_handlers.py: 27 passed.
  • services integration/agent: 15 passed.

https://claude.ai/code/session_01DEZYALzKjh9ocjkscaBWRT

mmabrouk added 2 commits June 24, 2026 20:35
These suites were skipped while the web build was broken; once it passed
they ran and surfaced pre-existing drift on big-agents:

- sdk acceptance: the agent builtin now ships a registered interface (no
  in-process handler), so test_agent_alias_is_not_registered was stale.
  Renamed to assert the interface is registered and the handler is absent.
- services integration: gateway/secret resolution moved into the SDK
  platform package (#4772), so the agent_api_base/request_authorization/
  httpx/log module attributes the conftest patched no longer exist on the
  service shims. Patch the SDK platform connection derivation helpers and
  the SDK platform module httpx/log instead.

Claude-Session: https://claude.ai/code/session_01DEZYALzKjh9ocjkscaBWRT
@vercel

vercel Bot commented Jun 24, 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 24, 2026 6:38pm

Request Review

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. tests labels Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 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: 5e2c629c-b995-4f51-95d3-2ec6a9ad57ce

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:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/agent-acceptance-test-drift

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.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-06-24T19:21:14.909Z

@mmabrouk mmabrouk merged commit 90e9fb8 into big-agents Jun 24, 2026
51 of 54 checks passed
@mmabrouk mmabrouk deleted the fix/agent-acceptance-test-drift branch June 24, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant