Skip to content

flightcheck: exclude per-agent DA connection refs from WD-PKG-001 fingerprint - #328

Closed
Dawn Jeong (daeunJe0ng) wants to merge 5 commits into
microsoft:mainfrom
daeunJe0ng:users/dawnjeong/flightcheck-da-wd-pkg-agentref-7852495b
Closed

Dawn Jeong (daeunJe0ng) wants to merge 5 commits into
microsoft:mainfrom
daeunJe0ng:users/dawnjeong/flightcheck-da-wd-pkg-agentref-7852495b

Conversation

@daeunJe0ng

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

Copy link
Copy Markdown
Contributor

What and why

Dependency: branches off the shared reader in #326 (merge first). Until #326 merges, this diff also shows its commit. Independent of the check re-point PRs (#304, #314, #315, #316, #317, #318).

WD-PKG-001 fingerprints the Workday install flavor (simplified 1-ref vs full/legacy 3-ref) from the connectionreferences bound to the shared_workdaysoap connector. Downstream Workday checks are gated on that flavor.

A Declarative Agent (DA) install adds a per-agent Workday connection reference whose logical name is {schema}.{guid}.shared_workdaysoap. It binds the same connector as the Microsoft-shipped solution refs, but it carries no _<5hex> role-suffix fingerprint. Before this change _check_package_flavor swept it into unknown_format_names, which forced every branch to fall through to branch 6 and classify a valid simplified/full install as unknown (WARNING).

Per the flavor-gating rule in tests/AGENTS.md (consumers skip only on a positive incompatible-flavor match; unknown/None default to RUN), an unknown verdict un-gates every downstream ISU/RaaS consumer check. So a healthy DA install would emit misleading FAILs. This is the AC6 gap on story AB#7865450.

Change

  • _check_package_flavor (workday.py): skip refs whose logical name matches _AGENT_CONNECTION_REF_RE in the classification loop, collecting them into agent_scoped_refs. They no longer pollute unknown_format_names.
  • Add an agent-scoped diagnostic line to the branch-6 unknown result so the degenerate all-agent-refs case (no solution ref at all) is not silently opaque.
  • The cache runner._workday_connection_refs (WD-CONN-012 input) is left full on purpose. WD-CONN-012 only iterates the expected role suffixes, so the agent row is ignored there and needs no scope change.

Design notes

  • Agent refs are excluded from the fingerprint only, not from the connector match. They remain visible to WD-CONN-012 (binding completeness), which is correct: an agent-scoped Workday connection still needs to be bound.
  • The common real DA case (solution ref _ff0df + one agent ref) now classifies as simplified, as it should.

Tests

Added to TestPackageFlavorDetection:

  • simplified solution ref + agent ref -> simplified (agent ref excluded, cache still 2 rows)
  • full 3-ref install + agent ref -> full
  • agent-ref-only (no solution ref) -> unknown WARNING with the agent-scoped diagnostic

New mock dv.workday_agent_scoped_connection_ref() (same connectionreferences GET shape, covered by the existing cassette per the tests/AGENTS.md same-endpoint rule).

Verification

  • pytest tests/flightcheck/checks/test_workday_package.py -> 22 passed (3 new)
  • pytest tests/flightcheck -> 1145 passed
  • ruff check on all touched files -> clean

Not verified: live run against a deployed Workday-bound DA env (no reachable agent available; provisioning gap, not code).

Story: AB#7865450 (AC6). Checkpoint: WD-PKG-001.

…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
…gerprint (AC6, AB#7852495)

A Declarative Agent (DA) install adds a per-agent Workday connection
reference with a {schema}.{guid}.shared_workdaysoap logical name. It
binds the same shared_workdaysoap connector as the Microsoft-shipped
solution refs but carries no _<5hex> role suffix, so _check_package_flavor
classified it into unknown_format_names and forced a valid simplified/full
install to misclassify as 'unknown' (WARNING). Per AGENTS.md flavor-gating,
an 'unknown' flavor un-gates every downstream ISU/RaaS consumer check,
producing misleading FAILs on a healthy DA install.

Exclude refs matching _AGENT_CONNECTION_REF_RE from the fingerprint loop
and surface an agent-scoped diagnostic on the degenerate all-agent-refs
case so it is not silently opaque. Cache (WD-CONN-012 input) is left full;
WD-CONN-012 only iterates expected suffixes, so the agent row is ignored
there and needs no scope change.

Tests: simplified+agent -> simplified, full+agent -> full, agent-only ->
unknown WARNING with agent-scoped diagnostic. Added
workday_agent_scoped_connection_ref mock (same connectionreferences GET).

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: exclude per-agent DA connection refs from WD-PKG-001 fingerprint (AC6, AB#7852495) flightcheck: exclude per-agent DA connection refs from WD-PKG-001 fingerprint Sep 24, 2026
@daeunJe0ng

Copy link
Copy Markdown
Contributor Author

Closing as superseded by main.

The core fix this PR targeted (AB#7852495 - per-agent Declarative Agent connection references must not misclassify the WD-PKG-001 install fingerprint as "unknown") has already landed on main via "Honor agent scoping in Workday checks" and "Harden FlightCheck provider and agent scope". Those commits exclude agent-scoped refs at the workday_refs comprehension in _check_package_flavor, so a valid Declarative Agent install no longer misclassifies.

The only remaining deltas in this PR over main were secondary design choices (keeping agent refs in the WD-CONN-012 cache, and reporting an agent-refs-only tenant as unknown/Warning with a diagnostic rather than none/NotConfigured). Not worth carrying a competing implementation of the same work item. Closing.

Dawn Jeong (daeunJe0ng) added a commit to daeunJe0ng/Employee-Self-Service-Agent-Developer-Kit that referenced this pull request Sep 25, 2026
…icrosoft#304 review nit)

Resolves the PR microsoft#304 blocker by restoring DV-CONN-001 to its original
Dataverse meaning (it now equals main) and dropping the wrong-layer DA
Workday SOAP connection check that microsoft#304 had bolted onto that ID.

The Workday shared_workdaysoap reference is flow/solution-scoped and never
surfaces in the DA bot-components (connectionReferenceChanges) layer that the
dropped check read, so it would have FAILED "not found" on every real DA GA
agent -- the same wrong-layer defect that closed microsoft#318 and microsoft#328. The correct-
layer DA Workday-connection check is deferred to follow-up work.

Kept: harden _bot_connection_references to raise on a genuinely malformed
connectionReferenceChanges shape instead of silently skipping it. Its live
consumer, ENV-004, wraps the read in except Exception and degrades to a
warning row, so this is fail-loud without a regression. Absent/null
connectionReference entries (non-connection changes) are still tolerated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d47b6fbe-fc1f-402d-aadb-df1a6695da56
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