flightcheck: re-point PUB-001 + PUB-002 to Declarative Agent ALM export/import API - #315
Open
Dawn Jeong (daeunJe0ng) wants to merge 10 commits into
Open
Dawn Jeong (daeunJe0ng) wants to merge 10 commits into
Dawn Jeong (daeunJe0ng) wants to merge 10 commits into
Conversation
Dawn Jeong (daeunJe0ng)
marked this pull request as ready for review
September 23, 2026 05:26
…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
… (7852506) Read the Workday SOAP connection reference from the Declarative Agent minimalBots components API (runner.agentbuilder.fetch_components) instead of the Custom Agent Dataverse connectionreferences query, so DV-CONN-001 works against DA-GA agents that no longer expose Dataverse. Verdict simplifies to found + bound (connectionId present); the Dataverse-only statuscode and multiple-ref branches are dropped since the components shape carries neither. BAP owner echo is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Distinguish a genuinely-absent connectionReferenceChanges (missing key -> no references -> FAILED not-found) from a present-but-non-list payload (a shape we do not understand -> raise ValueError so the dispatcher degrades DV-CONN-001 to a WARNING). Mirrors native_agent._connection_references, the shipped precedent this check re-uses; the prior code collapsed both to [] and could report a confident "reference not found" on an unparseable 200 response. Adds a malformed-changeset test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…list) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8246cd2c-37d0-4000-8fe3-fa9b082669e0
Dawn Jeong (daeunJe0ng)
force-pushed
the
users/dawnjeong/flightcheck-da-pub-7852507
branch
from
September 24, 2026 00:12
3b3c2e9 to
283a248
Compare
…B#7852508) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8246cd2c-37d0-4000-8fe3-fa9b082669e0
…afety-gate test (PUB-001/PUB-002) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8246cd2c-37d0-4000-8fe3-fa9b082669e0
This was referenced Sep 24, 2026
# Conflicts: # tests/mocks/agentbuilder_connectivity.py
…ghtcheck-da-pub-7852507
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-points FlightCheck publishing checks PUB-001 (AB#7852507) and PUB-002 (AB#7852508) from the old managed-solution/manual framing to the Declarative Agent AgentBuilder ALM export/import APIs.
This stacks on the shared reader in #326 and on #304. Merge order: #326 -> #304 -> this PR.
What changed
AgentBuilderClient.export_package(...)and validates the returned package as a real zip archive by reading the central directory and runningZipFile.testzip()CRC validation.AgentBuilderClient.export_package(...)followed byAgentBuilderClient.import_package(...)when the caller explicitly enables the import probe.requires_dataverse_endpoint=False.Design rationale
PUB-001 is safe to run as a read-only export check, so it runs when the AgentBuilder client and botId are available.
PUB-002 is a mutating import path. It is intentionally gated behind an explicit runner opt-in so a normal FlightCheck run stays read-only and cannot create an agent in the current environment by surprise. The mocked tests cover the import behavior without running any live import.
The export archive validation deliberately does not use a ZIP magic-byte prefix check. It opens the archive through
zipfile, verifies the central directory is readable, requires at least one entry, rejects unsafe archive entry paths, and runs CRC validation withtestzip().Testing
python -m pytest tests\flightcheck -q- 1137 passed.python -m ruff check solutions\ess-maker-skills\scripts- passed.Live DA-environment validation (partially complete)
Live run 2026-09-22 against ESS GA env
258bd301(prod ring; agent06ae0814is not ALM-enrolled): the not-opted-in FAIL path is confirmed against a real DA agent (checked below). The opted-in PASS path, PUB-002 import, and the non-4003 WARNING path remain unconfirmed (no reachable ALM-opted-in / throwaway DA agent this run).To be checked once a real Application Lifecycle Management (ALM) opted-in Declarative Agent is reachable. Blocked on a published DA agent enrolled in ALM; these ALM export/import reads use the prod-audience AgentBuilder token and do NOT depend on the TIP2 (Test-In-Production ring 2) auth issue. Each box is marked when the scenario is confirmed on a live DA env.
export_packagereturns a real zip; central directory readable, at least one entry,testzip()CRC passes -> PASSED.export_packagethenimport_packagesucceeds -> PASSED.Work items
Sync update (2026-09-24)
upstream/maininto this branch (no rebase, no force-push). Clean auto-merge, no conflicts.ruffclean acrossscripts/flightcheck; fulltests/flightchecksuite 1223 passed.