Skip to content

[AIGTWY-4759] Managed integration tests: green lanes + coverage - #699

Merged
lilly-luo merged 11 commits into
mainfrom
david/aigtwy-4759-managed-diagnostics
Sep 17, 2026
Merged

lilly-luo merged 11 commits into
mainfrom
david/aigtwy-4759-managed-diagnostics

Conversation

@david-siqi-liu

@david-siqi-liu david-siqi-liu commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

The managed integration lanes were failing (the managed workspace IP-blocked CI runners) and thin. This makes them work and adds end-to-end coverage that drives the agent TUI.

What

  • Install both agent CLIs in each managed lane: a managed config enables both agents and ug configure applies it to every enabled agent, so a lane with only one agent failed configuring the other.
  • Live managed tests against ca-central's published config: per-agent apply and an idempotent re-configure.
  • New managed_fixture TUI suites: inject the admin CodingAgentConfig via the built-in UCODE_MANAGED_CONFIG_STUB hook (only the config INPUT is stubbed; auth, the config writers, and the agent binary stay real), then launch the real agent and drive the TUI, asserting what the agent presents, not the generated config files (asserting the files is unit tests' job). Shared builders + stub injection live in tests/integration/utils/managed.py; each CUJ area is its own suite (_models, _mcp), so skills and spend_tiers drop in as new suites reusing it.
  • Policy carve-out for the input-only stub in tests/AGENTS.md / tests/CLAUDE.md. Lanes stay non-blocking until proven stable.

CUJs covered

Suite / test CUJ How
managed_claude / managed_codex admin config applies per agent; the agent boots to the gateway live TUI boot
managed_is_idempotent repeat ug configure is stable for both agents live
managed_models /model lists the injected models, including one the live workspace does not publish, and omits a live-only model drives /model
managed_mcp /mcp lists the injected managed MCP server drives /mcp

Bugs this surfaced (repro in the handoff notes, for filing)

  • Managed per-family default model not honored (default_sonnet_model ignored; configure wrote a model outside the allow-list).
  • ug configure apply path does not run validate_manifest (client applies malformed configs unvalidated).
  • configure unions available_tools (de-enabling an agent may not remove a previously-configured one).
  • Workspace-switch residue: tracing/OTEL endpoint, model lists on discovery failure, skills scope, managed-MCP reconcile.
  • UCODE_MANAGED_CONFIG_STUB is ungated in prod (admin-policy override risk).

Follow-ups

  • Skills and spend_tiers (recommendModel) suites reusing utils/managed.py.
  • Tighten the /mcp assertion to a picker-specific pattern (needs the rendered screen from evidence).
  • Move config-shape assertions to unit tests.

This pull request and its description were written by Isaac.

@david-siqi-liu david-siqi-liu added the quicktree-assisted PR created with quicktree-assisted workflow label Sep 16, 2026
@david-siqi-liu
david-siqi-liu force-pushed the david/aigtwy-4759-managed-diagnostics branch from c24cf0d to 86622f6 Compare September 17, 2026 00:11
@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4759] Instrument managed integration job to pinpoint the 403 [AIGTWY-4759] Migrate managed integration lanes to ca-central Sep 17, 2026
@david-siqi-liu
david-siqi-liu marked this pull request as ready for review September 17, 2026 00:11
@david-siqi-liu
david-siqi-liu force-pushed the david/aigtwy-4759-managed-diagnostics branch 2 times, most recently from c6c82ba to fbc97d8 Compare September 17, 2026 01:14
@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4759] Migrate managed integration lanes to ca-central [AIGTWY-4759] Make the managed integration lanes blocking Sep 17, 2026
@david-siqi-liu
david-siqi-liu force-pushed the david/aigtwy-4759-managed-diagnostics branch from fbc97d8 to 3c4cab0 Compare September 17, 2026 01:27
@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4759] Make the managed integration lanes blocking [AIGTWY-4759] Install both agents in the managed integration lanes Sep 17, 2026
@david-siqi-liu
david-siqi-liu force-pushed the david/aigtwy-4759-managed-diagnostics branch 2 times, most recently from e642107 to bd11153 Compare September 17, 2026 01:51
@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4759] Install both agents in the managed integration lanes [AIGTWY-4759] Get the managed integration lanes green and add coverage Sep 17, 2026
@david-siqi-liu
david-siqi-liu force-pushed the david/aigtwy-4759-managed-diagnostics branch from 648c998 to de07883 Compare September 17, 2026 02:34
The managed integration lanes were failing (the managed workspace IP-blocked CI runners), so they
were non-blocking and thin. This makes them work and adds real coverage.

- Install both agent CLIs in each managed lane: a managed config enables both agents and
  `ug configure` applies it to every enabled agent, so a lane with only one agent failed configuring
  the other.
- Live `managed` tests against ca-central's published config: per-agent apply and an idempotent
  re-configure.
- New `managed_fixture` layer: inject the admin CodingAgentConfig via the built-in
  UCODE_MANAGED_CONFIG_STUB hook so the real `ug configure` path is exercised across shapes the live
  workspace does not publish (enabled-agents allowlist per agent, config-driven model list, tracing
  OTEL env). Each case differs from the published config in what it asserts, so a pass proves the
  injected config drove configure. Auth, config writers, and binaries stay real; the fetch/wire
  contract stays covered by the un-stubbed `managed` tests.
- Sanction the input-only stub in tests/AGENTS.md and tests/CLAUDE.md; run both markers in the
  existing managed lanes. Lanes stay non-blocking until proven stable.

Co-authored-by: Isaac <no-reply@databricks.com>
@david-siqi-liu
david-siqi-liu force-pushed the david/aigtwy-4759-managed-diagnostics branch from de07883 to 8a9ee0d Compare September 17, 2026 03:11
@david-siqi-liu david-siqi-liu changed the title [AIGTWY-4759] Get the managed integration lanes green and add coverage [AIGTWY-4759] Managed integration tests: green lanes + coverage Sep 17, 2026
david-siqi-liu and others added 9 commits September 17, 2026 07:20
Replace the config-file assertions with tests that launch the real agent and drive /model and /mcp,
so they verify what the agent actually presents, not the generated config (asserting config is unit
tests' job).

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
# Conflicts:
#	tests/integration/README.md
@lilly-luo
lilly-luo enabled auto-merge (squash) September 17, 2026 13:59
@lilly-luo
lilly-luo merged commit 7b439c1 into main Sep 17, 2026
20 checks passed
@lilly-luo
lilly-luo deleted the david/aigtwy-4759-managed-diagnostics branch September 17, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quicktree-assisted PR created with quicktree-assisted workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants