Skip to content

flightcheck: add canonical DA connection-reference reader + contract test - #326

Merged
Dawn Jeong (daeunJe0ng) merged 3 commits into
microsoft:mainfrom
daeunJe0ng:users/dawnjeong/flightcheck-da-foundation-7865455
Sep 24, 2026
Merged

Dawn Jeong (daeunJe0ng) merged 3 commits into
microsoft:mainfrom
daeunJe0ng:users/dawnjeong/flightcheck-da-foundation-7865455

Conversation

@daeunJe0ng

@daeunJe0ng Dawn Jeong (daeunJe0ng) commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the single canonical Declarative Agent (DA) connection-reference reader that the six FlightCheck re-point PRs (#304, #314, #315, #316, #317, #318) all depend on, so they stop each shipping a divergent private copy of it.

Today the re-point PRs would otherwise each carry a private copy of the connection-reference reader:

That would make the six PRs impossible to merge in any order without an add/add + edit conflict cascade. This PR lands the shared reader once; the six re-point PRs are now rebased on it and import the canonical one.

What this adds

  • checks/_da_connection_refs.py (canonical union reader): superset of the reader from flightcheck: re-point WD-REST-001 + WD-ENV-001 to Declarative Agent components API #317, with:
    • json.loads handling for sharedConnectionParameters when the AgentBuilder / minimalBots components API returns it as a JSON string (observed live) rather than a nested object.
    • a new public read_all_agents_connection_references(runner) that reads every agent's connection references and de-dupes by connection-reference logical name (casefold, first-wins) for the environment-wide ENV-004 check.
  • The three consumers this reader serves: DV-CONN-001 (active agent refs), ENV-004 (environment-wide, de-duped), and the Workday shared-parameter checks WD-ENV-001 / WD-REST-001.
  • tests/mocks/agentbuilder_connectivity.py: superset mock builders (validated) needed by the checks and the contract test.
  • tests/flightcheck/checks/test_da_connection_refs.py: 18 pure-logic contract tests covering normalization, None-gating (SKIP), fail-loudly ValueError, JSON-string sharedConnectionParameters parsing, and the Workday shared-parameter sweep.

Design rationale

  • One shared reader instead of per-check copies removes the merge collision and keeps a single source of truth for the components-API connection-reference shape.
  • The reader is pure logic over the components payload, so it is unit-testable without network; the contract test pins the exact shapes the six re-point PRs rely on.
  • Mock builders trace to the validated agentbuilder_connectivity mock (MOCK_STATUS = validated), per the test-authoring rule that checks calling external APIs need a validated/documented mock.

Testing

  • python -m pytest tests/flightcheck/checks/test_da_connection_refs.py -q -> 18 passed.
  • python -m pytest tests/flightcheck -q -> 1142 passed.

Risk / notes

Foundation for AB#7865455 (DA profile + structured-result contract) under story AB#7865450.

…test (AB#7852506, AB#7852495, AB#7852511)

Extract the shared minimalBots components connection-reference reader into
checks/_da_connection_refs.py as the single source that DV-CONN-001 (active
agent), ENV-004 (environment-wide, de-duped by logical name) and the Workday
shared-parameter checks (WD-ENV-001/WD-REST-001) all read through, so the
per-check re-point PRs stop adding divergent copies of it.

The module is the superset of PR microsoft#317's reader plus a public
read_all_agents_connection_references() that de-dupes by connection-reference
logical name for ENV-004. Brings the validated/documented mock builders the
checks need and a direct pure-logic contract test (18 cases) covering
normalization, None-gating (SKIP), fail-loudly ValueError, JSON-string
sharedConnectionParameters parsing, and the Workday shared-parameter sweep.

Foundation for the 6 DA re-point PRs to rebase onto (single shared reader,
no add/add collision). Full flightcheck suite: 1142 passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e25cf992-09c9-49b8-9971-2a19cb2fcb05
@daeunJe0ng Dawn Jeong (daeunJe0ng) changed the title flightcheck: add canonical DA connection-reference reader + contract test (foundation for 7865450 re-points, AB#7865455) flightcheck: add canonical DA connection-reference reader + contract test Sep 24, 2026

@amilandi amilandi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Canonical reader factored cleanly out of the six re-point PRs; JSON-string sharedConnectionParameters handling, casefold-first-wins ENV-004 de-dupe, and the None-gate -> SKIP / malformed -> ValueError contract all check out. 18 contract tests pin the shapes the downstream PRs consume.

@daeunJe0ng
Dawn Jeong (daeunJe0ng) merged commit 294f922 into microsoft:main Sep 24, 2026
9 checks passed
@daeunJe0ng
Dawn Jeong (daeunJe0ng) deleted the users/dawnjeong/flightcheck-da-foundation-7865455 branch September 24, 2026 20:45
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