Repository navigation
AIGTWY-4878 [2/3] Test catalog discovery and configured defaults - #965
Conversation
920af61 to
304b4f2
Compare
304b4f2 to
423a9e2
Compare
423a9e2 to
5552c20
Compare
UG reviewThis test-only change exercises scoped catalogs, native model pickers, configured defaults, and completed-task evidence. The main risk is making live CI assertions stricter than the successful agent behavior they intend to verify. Major
Automated advisory review of |
david-siqi-liu
left a comment
There was a problem hiding this comment.
Reviewed against main's tests/e2e_cuj/AGENTS.md (#1000) and the CUJ 3 plan in the UG Configure E2E doc.
P0
- Machine-wide agent files are never cleaned up. The test launches
AgentTerminalfive times (test_catalog_discovery.pylines 114, 160, 190, 211, 235) but never runs a terminalug revertor checksMANAGED_PATHS. On the current head theE2E CUJsjob fails all 10 tests: after the first launch, every later configure hitsNon-interactive CUJ configure unexpectedly created machine-wide settings(https://github.com/databricks/unity-gateway/actions/runs/37476090218/job/112311886645). The same leftovers make #990's MCP tests error at setup withExisting machine-wide agent settings, and once this lands on main they would break any CUJ that runs after it in the shared job. #911 adds a terminalug revertto thecujfixture teardown, butcujis class scoped, so this class still needs to revert, or to finish all configures before its first terminal launch. - The recorder is unpacked but unused (
session, workspace, _recorder = cuj, line 103), so model evidence is native records only. AGENTS.md: "Model evidence combines observed gateway requests/responses with native completed-turn records; neither routing banners nor native records alone prove an applied decision."recorder.configure_session(...)plusrecorder.requests_after(checkpoint)checked againstINFERENCE_PATHSand the requestmodelcovers it. AgentTerminal.wait_for_task(line 133) answers a recognizedfindpermission prompt with Enter (tests/integration/utils/terminal.py352-369). AGENTS.md requires rejecting unexpected permission prompts. main'shelpers/terminal.pyTerminal.taskdoes that, and so does #990's_wait_for_mcp_task.- Coverage: the plan's
ug mcp listandug statuschecks aren't in this stack (#990's body lists them as a follow-up). They don't depend on the skills blocker, so I'd include them before calling CUJ 3 covered.
The first failing test in that run also reports Unmatched or ambiguous claude picker row 'Default (recommended) Use the default model (currently Opus 5.5 (1M context)) · $4/$20 per Mtok': []. That one looks separate from the cleanup failures.
P1
- Only the existence of exactly one published config is checked, not its contents (schema location, defaults). A read-only check on
workspace.config()up front would turn a misconfigured workspace into a clear failure. #990 needs the same check, so this could be one shared helper. - The MCP check uses two hardcoded services instead of enumerating
ug_e2e.tools, so the plan's "every MCP inug_e2e.tools" would miss a newly added one.
Skills discovery and invocation are deferred per the PR bodies; that's the same Files API blocker CUJ 2 and CUJ 6 hit, so I'm treating it as a shared follow-up.
3fac143 to
f63d46e
Compare
f63d46e to
88e47f1
Compare
david-siqi-liu
left a comment
There was a problem hiding this comment.
Rechecked at 2803a02: the earlier blockers are fixed (per-test revert, recorder plus native-turn evidence, Terminal.task). All 10 catalog tests pass; the red E2E CUJs here is CUJ 2's Claude inference test, which passed on the same code in #990's run. ug status coverage stays as a follow-up in AIGTWY-4972.
2803a02 to
c8de998
Compare
…cks#968) ## Summary Behavior-preserving extraction only: move existing Claude/Codex answer parsing, session paths, and child-session detection into per-agent modules. Shared evidence callers and existing journeys retain their behavior and names. Removed `tests/test_integration_agent_helpers.py`: the existing public evidence tests already cover these paths. No new model attribution, catalog requests, HTTP helpers, picker behavior, managed-config readers, or CUJ CI changes belong to this PR. ## Stack Targets main; rebased onto current main. Catalog discovery databricks#965 targets this branch, and MCP registration databricks#990 targets databricks#965. Provisioning databricks#964 remains parked separately. ## Validation - 50 existing evidence/contract tests passed on this parent after removal. - `git diff --check` passed; commit/push secret scans passed. - No live inference run.
…dex (databricks#990) ## Summary Stacked on databricks#965. Adds real MCP registration, connection, schema-exclusion, listing, and read-only tool-use journeys for Claude and Codex in the CUJ3 workspace. - Configure installed UG using the shared `cuj` fixture and inspect Claude's MCP menu and Codex's `/mcp verbose` inventory. - Require `ug_e2e.tools.fixture_reader` and `fixture_metadata` to be connected and expose their expected tools. - Require the bounded inventories to omit `ug_e2e.other_tools` and `decoy_status`. - Have each agent call both read-only tools with a fresh nonce. Verify receipts in a completed parent assistant answer; expected receipts are withheld from the prompt. Codex approvals are limited to the expected server, tool, and nonce using per-call Allow. - Check `ug mcp list` reports both managed fixtures for `claude, codex` with aggregate `connected` status and no out-of-scope servers. Actual Codex connectivity is established by its TUI/tool journey, not the aggregate label. - Use shared session/auth/terminal scaffolding and the existing `dedicated-cuj` CI job. No MCP-specific workflow or CI-gate contract-test changes remain. ## Known issue: ug status `ug status` can show global `system.ai` models for Codex instead of the managed `ug_e2e.models` catalog, and Claude's inventory can collapse to its configured default. This affects the status model inventory; it is separate from these native MCP inventory and tool-use checks. The standalone production fix is databricks#1019, targeting main outside this test stack. `ug status` CUJ coverage remains deferred; this PR does not change status implementation or claim to test it. ## Validation - Three MCP cases and all 13 combined catalog/MCP cases collect. - Focused stack evidence/model-discovery/contract tests: 163 passed. - Consumer Ruff lint/format, `git diff --check`, and stack ancestry checks passed after restacking. - Live passes are required to establish coverage; current results are tracked by CI. Local live runs require credentials and a clean disposable runner; no policy bypass is used. ## Scope Test-only consumer: MCP CUJ, inventory helper, marker, and documentation. Shared workflow/conftest and parent agent helpers are unchanged in this PR. Fixtures are provisioned externally. Skills remain deferred. No fixture scripts or credentials are committed. The unrelated scrollable-picker README note remains uncommitted.
Summary
Catalog discovery consumer, stacked on the behavior-preserving helper extraction #968. Uses the preconfigured CUJ3 workspace; provisioning #964 remains separate.
ug_e2e.models; exclude Gemini andug_e2e.other_modelsdecoys from scoped discovery and native pickers.cujfixture, authenticated SDK client, and isolated local sessions. Catalog reads use SDK GET calls; workspace configuration remains read-only.dedicated-cujCI job. Remove the custom catalog lane and bespoke integration-runner mode; shared workflow and conftest match current main.Stack
Rebased onto current main through #968. MCP registration #990 is the child consumer stack; its changes are not included here.
Validation
git diff --checkpass.Skills discovery remains deferred.