Skip to content

[agentbricks] Send session_id as a top-level invocation field in tool matrix test - #684

Merged
elainewang-db merged 3 commits into
databricks:mainfrom
elainewang-db:mason-tool-matrix-session-id
Oct 2, 2026
Merged

elainewang-db merged 3 commits into
databricks:mainfrom
elainewang-db:mason-tool-matrix-session-id

Conversation

@elainewang-db

@elainewang-db elainewang-db commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Two fixes to the Agent Bricks e2e tool matrix (integrations/agentbricks/tests/e2e/) so a live run can actually invoke agents and exercise the deploy-resource preservation path. Both surfaced when the nightly agentbricks-tests suite first ran the full matrix end-to-end (all 24 rows had been failing).

  1. Send session_id as a top-level invocation field (tool_matrix.py). AgentKit [AgentKit] Make session_id first-class in DurableAgentServer #674 ("Make session_id first-class in DurableAgentServer") made the generated adapter require session_id as a top-level field (context.session_id), but the harness nested it inside input. Every invocation 500'd with agent invocation failed (ValueError: session_id must be provided as a top-level invocation field) before any tool ran — all dev rows plus cli/deploy rows. Moves session_id to the top level of the invocation body (and in the _curl_command debug example).

  2. Bind a tracing experiment in the direct fixture (fixtures/direct_agent.toml + _author_direct). _grant_snapshot asserts the deployed App has at least one non-tool resource to prove deploy preserves non-tool resources on its full-array resource replace. The only such resource a matrix app gets is the tracing experiment, attached when agent.toml has [tracing] experiment_name. The cli path keeps the agentbricks init manifest (which binds a default experiment), but the direct path overwrites agent.toml with a fixture that had no [tracing] section — so direct/deploy rows failed "Expected a non-tool App resource to prove preservation on redeploy." Adds a [tracing] section to the fixture and substitutes a deterministic per-run experiment name (/Shared/agentbricks_traces/<slug>-<run_suffix>, mirroring default_experiment_name). This also gives the direct path trace-resource coverage.

Why

The matrix suite is gated off PR CI (RUN_AGENTBRICKS_INTEGRATION_TESTS), so these contract drifts (AgentKit #674, and the direct fixture never carrying a non-tool resource) only surfaced in the nightly. Both are harness fixes — no product behavior changes.

Test

  • tool_matrix.py compiles.
  • Verify by dispatching the runner's Agent Bricks workflow (databricks-eng/ai-oss-integration-tests-runner) against this branch; the catalog USE CATALOG grant for account users is already in place, so the deploy rows should now attach resources and the invocations should succeed.

This pull request and its description were written by Isaac.

elainewang-db and others added 2 commits October 2, 2026 23:07
… matrix

Co-authored-by: Isaac <no-reply@databricks.com>
…ture

Co-authored-by: Isaac <no-reply@databricks.com>
…ffix arg

Co-authored-by: Isaac <no-reply@databricks.com>
@elainewang-db
elainewang-db enabled auto-merge (squash) October 2, 2026 23:22
@elainewang-db
elainewang-db merged commit ed3ed6b into databricks:main Oct 2, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants