Skip to content

Shared Azure test stubs (529 known failures fixed) and selected tests on Development PRs - #1987

Open
Paul Lizer (paullizer) wants to merge 3 commits into
microsoft:Developmentfrom
paullizer:claude/known-failures-batch-1
Open

Paul Lizer (paullizer) wants to merge 3 commits into
microsoft:Developmentfrom
paullizer:claude/known-failures-batch-1

Conversation

@paullizer

@paullizer Paul Lizer (paullizer) commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two parts: the first cleanup batch of functional_tests/known_failures.txt, and a new test plan in which pull requests into Development run only the tests a change can affect.

1. 529 listed workspace API tests pass again (2,451 → 1,922 entries)

Cause. The group, public and personal workspace API harnesses each kept a hand-written list of stubbed names for the Azure SDK, Key Vault and Yamcs modules. Each time the app started importing a name a stub lacked (AzureError, ContentSettings, CosmosAccessConditionFailedError, keyvault_agent_save_helper, normalize_yamcs_auth_method), every file using that harness failed at import.

Fix.

  • functional_tests/test_support/azure_stubs.py builds the Azure modules in one place and serves the installed SDK's azure.core.exceptions, azure.core.credentials and azure.storage.blob. Names the app adds there later already exist, and each harness passes only its own fakes.
  • The harnesses run the real keyvault_agent_save_helper (Key Vault storage is off, so nothing is stored) and the real Yamcs helpers.
  • Two outdated assertions were updated: the agent envelope's credential_reentry_required field, and an index-less document seam in the parity test.
  • 21 files (810 tests) pass. scripts/prune_known_failures.py removes entries for tests that now pass.

2. Test plan: a subset into Development, everything into Staging

When Functional tests
PR into Development Python files chosen by scripts/select_tests.py, all JavaScript tests, shrink guard
PR into Staging / main, manual runs Every test
  • How files are chosen. select_tests.py selects changed tests and the users of changed test_support modules, at any depth. It also selects tests that refer to an affected app module and use one of its changed names or routes. Changed names (top-level functions, classes and assignments whose source differs from the base) are followed through the import graph, so a VERSION bump selects the tests that read VERSION, not the about 580 tests that stub config. A change to the test infrastructure runs everything.
  • Expected effect. Over the last 24 PRs into Development, most would have run 255–360 of the 2,000 files, about 10 minutes instead of 27. Four that changed widely used code (for example get_settings) would have run 760–1,215.
  • Workflow changes.
    • The Python job count follows the selection: about 100 files per job, at most eight.
    • A new functional tests job passes only when every other job passed. That is the one check to require in branch protection, since the shard names vary.
    • The push-to-Development trigger added earlier in this PR is gone.
  • Docs. docs/contributing/testing.md has a new "Test plan" section (what runs where, how selection works, what the suites cover). FUNCTIONAL_TEST_SELECTION.md covers the rules and their limits: a test that reaches changed code without naming it isn't selected, and the full run on the Staging PR catches it.
  • python scripts/select_tests.py --changed <file> also answers "which tests cover this file?".

This PR changes the workflow, so its own CI runs every test.

Checks run locally

  • All users of the changed harnesses pass with the list active. That covers 24 files, plus all 88 files that use agent_delegation.
  • test_functional_suite_ci_runner.py: 10 passed. That covers selection rules, test-support depth, name-level propagation, route prefixes, shard counts, --files-from, the prune script and the workflow's branches.
  • Cosmos boundary review: 0 gaps. Shrink guard: no new entries, 529 removed.

🤖 Generated with Claude Code

The group, public and personal workspace API harnesses each kept their own
stubs of the Azure SDK, Key Vault and Yamcs modules. Each time the app
imported a name those stubs lacked, every file using the harness failed and
went onto known_failures.txt.

- test_support/azure_stubs.py builds the Azure modules in one place and
  serves the installed SDK's azure.core.exceptions, azure.core.credentials
  and azure.storage.blob, with per-harness overrides.
- The harnesses run the real keyvault_agent_save_helper and Yamcs helpers.
- The group agent envelope test expects credential_reentry_required, and the
  parity test gives the catalogue an index-less document seam.
- scripts/prune_known_failures.py removes entries for tests that now pass.
- The Functional test suite workflow also runs after merges to Development.

21 files (810 tests) pass; 529 entries removed, 1,922 remain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Files that use agent_delegation only for execute_functions or module_stub
no longer import the Azure SDK, and the module's imports match Development.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ain PRs

- scripts/select_tests.py picks the Python test files a change can affect:
  changed tests, users of changed test_support modules, and tests that refer
  to an affected application module and use one of its changed names or
  routes. Changed names are followed through the import graph, so a version
  bump no longer selects every test that stubs config. Infrastructure changes
  select everything.
- The workflow runs the selection on pull requests into Development and every
  test on pull requests into Staging and main; the push trigger on
  Development is gone. Python shards follow the selection (about 100 files
  each, at most eight), and a "functional tests" job summarizes every job.
- run_tests.py functional --files-from runs only the listed files.
- docs/contributing/testing.md gains a test plan; FUNCTIONAL_TEST_SELECTION.md
  documents the rules and limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paullizer Paul Lizer (paullizer) changed the title Bring 529 listed workspace API tests back by sharing the Azure stubs Shared Azure test stubs (529 known failures fixed) and selected tests on Development PRs Nov 29, 2026

This branch has not been deployed

No deployments
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.

1 participant