flightcheck: fail loud on malformed DA connection-ref payloads (reader hardening) - #304
Conversation
|
Verdict: do not merge. Finding count: 1 MAJOR. [MAJOR] F-1 — Routing check can false-pass on stray text File: This only checks that both strings occur somewhere in the file. A comment, dead code, or unrelated dialog block can satisfy the condition even when the Fix: parse the topic YAML and verify the |
|
Updated review finding — contract-breaking blocker
Preserve the current |
…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
56cf5bf to
ab398f1
Compare
… (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
|
Re-reviewed the current head (
|
|
Re-reviewed the current head (
Please preserve |
|
Follow-up PR: After checkpoint identity is stable, harden the new AgentBuilder check by handling multiple matching references explicitly, requiring the full provider-qualified connector identity, surfacing malformed reference entries, and verifying live connection health before returning Passed. These additional improvements are not the blocker identified above. |
…ghtcheck-da-dv-conn-001-7852506
…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
|
Thanks for the thorough review, Nkem, and sorry for the missing ping. I reworked #304 substantially since your last pass. Here's how each point is addressed.
Fixed. I did not re-add the DA Workday SOAP check under a new checkpoint ID, and that's deliberate, see the next point.
While reworking this I confirmed the DA Workday check was reading the wrong architectural layer. It read the bot-components API (
Fixed, and this is the only surviving change in the PR. Net result: the PR is now two files ( |
Summary
Hardens the shared FlightCheck DA connection-reference reader (
_da_connection_refs.py) to fail loudly on malformed bot-components payloads, instead of silently skipping bad data.This PR was originally scoped to re-point
DV-CONN-001to the Declarative Agent (DA) components API for a Workday SOAP connection check. That approach is dropped for two reasons raised in review:DV-CONN-001(a Dataverse connection-reference check consumed by CEA docs andvalidation-matrix.md), which breaks those consumers.shared_workdaysoapconnection reference is flow/solution-scoped (bound via the Dataverse flow user-connections contract, refnew_sharedworkdaysoap_ff0df). It does not surface in the bot-componentsconnectionReferenceChangeslayer this check read. A live sweep of 24 DA agents found 0 carrying it there, so the check wouldFAILED "not found"on every real DA GA agent. This is the same wrong-layer defect that closed flightcheck: re-point WD-WF-CAT-001 + WD-REF-001 to Declarative Agent components API #318 and flightcheck: exclude per-agent DA connection refs from WD-PKG-001 fingerprint #328.DV-CONN-001is therefore restored to its original Dataverse meaning. The only surviving change is the reader hardening below.Work items: parent AB#7865450 (ESS DA GA FlightCheck).
What changed
checks/_da_connection_refs.py:_bot_connection_referencesnow raisesValueErroron a non-dict change entry or a present-but-non-dictconnectionReference, and tolerates an absent/nullconnectionReference(skips it). This makes malformed payloads fail loudly rather than passing through as silent empties.tests/flightcheck/checks/test_da_connection_refs.py: +3 tests covering non-dict change entry (raises), malformed individual reference (raises), and change-without-reference (tolerated).Design rationale
read_all_agents_connection_references), which wraps the read inexcept Exception(environment.py:537/560), so the new fail-loudValueError` degrades to a WARNING row rather than crashing the run. No regression to existing consumers.DV-CONN-001keeps CEA docs and the validation matrix accurate.Testing
python -m ruff check solutions/ess-maker-skills/scripts/flightcheck tests/flightcheck-> clean.python -m pytest tests/flightcheck -q-> 1211 passed.Deferred
A correct-layer DA Workday-connection check (reading the flow/solution binding, not bot-components) is deferred, same disposition as #318/#328. Noted in team continuity; no tracking item opened yet.