Skip to content

flightcheck: re-point ESS-SOLN-001 to Declarative Agent GRS/ALM configure API - #316

Open
Dawn Jeong (daeunJe0ng) wants to merge 10 commits into
microsoft:mainfrom
daeunJe0ng:users/dawnjeong/flightcheck-da-ess-soln-7852510
Open

Dawn Jeong (daeunJe0ng) wants to merge 10 commits into
microsoft:mainfrom
daeunJe0ng:users/dawnjeong/flightcheck-da-ess-soln-7852510

Conversation

@daeunJe0ng

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

Copy link
Copy Markdown
Contributor

Summary

Re-points ESS-SOLN-001 (AB#7852510) from the Dataverse solutions table to the Declarative Agent AgentBuilder GRS/ALM configure API.

This PR stacks on the shared reader in #326 and on #304, and keeps the check read-only. Merge order: #326 -> #304 -> this PR. It verifies ESS base package presence from the agent's ALM configure response by requiring both grsRepositoryId and commitSha.

What changed

  • flightcheck/checks/solution.py
    • Reads runner.agentbuilder.get_realm_configuration(botId, realm) instead of querying Dataverse solutions.
    • Returns Passed when grsRepositoryId and commitSha are present.
    • Returns Failed when the configure response is missing either value.
    • Returns NotConfigured for AgentBuilder ALM error code 4003, with remediation to opt the agent into Application Lifecycle Management (ALM).
    • Returns Skipped when the AgentBuilder client or configured botId is unavailable.
    • Returns Warning for other configure read errors.
  • flightcheck/registry.py
    • Updates ESS-SOLN-001 to require AGENTBUILDER.
    • Removes the Dataverse endpoint requirement and ENV-002 prerequisite.
  • Tests
    • Replaces Dataverse solution-table tests with AgentBuilder configure tests using the validated tests/mocks/agentbuilder_connectivity.py mock.
    • Updates registry and single-checkpoint expectations for the DA read path.

Design rationale

  • Reuses the same AgentBuilder ALM configure surface used by the ENV-004 GRS commit-pin work: /copilotstudio/minimalBots/alm/{agent_id}/configure.
  • This branch does not use the ENV-004 GRS commit-pin helper, so ESS-SOLN-001 uses a small local realm/error helper around the existing AgentBuilderClient.get_realm_configuration method instead of duplicating a separate client.
  • The external package identity and expected revision are still pending on Skantha / US 7792604. This PR intentionally checks package presence via grsRepositoryId + commitSha only. Exact identity or commit matching can be added later behind config, similar to ENV-004's opt-in expected commit setting.
  • Error code 4003 is handled as a defined NotConfigured verdict so an ALM-not-opted-in agent does not crash FlightCheck.

Testing

From C:\Users\dawnjeong\worktrees\fc-pr-esssoln:

$env:PYTHONPATH="C:\Users\dawnjeong\worktrees\fc-pr-esssoln\solutions\ess-maker-skills\scripts"
python -m pytest tests\flightcheck -q
python -m ruff check solutions\ess-maker-skills\scripts

Results:

  • 1121 passed in 7.36s
  • All checks passed!

Live DA-environment validation (partially complete)

Live run 2026-09-22 against ESS GA env 258bd301 (prod ring): ESS-SOLN-001 -> PASSED; the ALM configure read returned both grsRepositoryId (01a6a43a...) and commitSha (95d7ea55...), so the base-package GRS state is present. Caveat: on the same run PUB-001 shows the configured agent (06ae0814) returns 4003 on ALM export (not opted into ALM), yet the configure GRS read still succeeded, so this PASS does not by itself prove full ALM opt-in. The 'ALM-opted-in agent' box below therefore stays unchecked. The missing-field FAIL, 4003 NOT_CONFIGURED, SKIP, and WARNING paths remain unconfirmed 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; this is a read-only ALM configure call on the prod-audience AgentBuilder token, independent of the TIP2 (Test-In-Production ring 2) auth issue. Each box is marked when the scenario is confirmed on a live DA env.

  • ESS-SOLN-001 against an ALM-opted-in DA agent whose configure response carries both grsRepositoryId and commitSha -> PASSED.
  • ESS-SOLN-001 against a configure response missing either grsRepositoryId or commitSha -> FAILED.
  • ESS-SOLN-001 against an agent not opted into ALM (error code 4003) -> NOT_CONFIGURED with opt-into-ALM remediation, no crash.
  • No-AgentBuilder-client / no-active-botId -> SKIPPED, no crash.
  • A configure read error other than 4003 -> WARNING (fail loudly, no false PASS).
  • _alm_realm maps the config realm (Dev / Test / Prod) to the numeric realm the live ALM configure API expects, and Dev (0) is accepted.

Tracking

AB#7852510


Sync update (2026-09-24)

  • Merged latest upstream/main into this branch (no rebase, no force-push). Clean auto-merge, no conflicts.
  • Verified: ruff clean across scripts/flightcheck; full tests/flightcheck suite 1215 passed.
  • Blocked only on required review.

@daeunJe0ng
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
@daeunJe0ng
Dawn Jeong (daeunJe0ng) force-pushed the users/dawnjeong/flightcheck-da-ess-soln-7852510 branch from 029ac4e to 197464c Compare September 24, 2026 00:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8246cd2c-37d0-4000-8fe3-fa9b082669e0
…dd realm-branch tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8246cd2c-37d0-4000-8fe3-fa9b082669e0
@daeunJe0ng Dawn Jeong (daeunJe0ng) changed the title flightcheck: re-point ESS-SOLN-001 to Declarative Agent GRS/ALM configure API (AB#7852510) flightcheck: re-point ESS-SOLN-001 to Declarative Agent GRS/ALM configure API Sep 24, 2026
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