Repository navigation
Select Copilot wire APIs from AWF metadata and surface model mismatches - #67487
SivaKesava1 with Copilot wants to merge 11 commits into
Conversation
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
|
🔍 Design Decision Gate 🏗️ is checking for design decision records on this pull request... |
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
✂️ Ponytail Reviewer has started processing this pull request |
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
There was a problem hiding this comment.
🟡 Changes recommended
The new shared signal and filter category are not fully wired through, and dual-endpoint source attribution is inaccurate.
3 open findings
What changed in this PR
Updates the Copilot harness to validate wire APIs using AWF metadata and report model/endpoint mismatches through the unified-session pipeline.
Changes:
- Adds metadata-driven endpoint selection, validation, warnings, and non-retryable mismatch detection.
- Persists mismatch diagnostics for summaries, failure reports, and audits.
- Adds schemas, documentation, rendering, and tests.
| File | Description |
|---|---|
pkg/cli/model_routing_session.go |
Parses mismatch session events. |
pkg/cli/model_endpoint_mismatch_test.go |
Tests audit parsing and safety. |
pkg/cli/audit_report.go |
Adds mismatches to audit data. |
pkg/cli/audit_report_render.go |
Renders mismatch diagnostics. |
docs/src/content/docs/specs/unified-agent-session-specification.md |
Documents the event contract. |
docs/public/schemas/unified-session.schema.json |
Defines mismatch payload schema. |
actions/setup/md/agent_failure_issue.md |
Adds mismatch issue context. |
actions/setup/md/agent_failure_comment.md |
Adds mismatch comment context. |
actions/setup/js/unified_session.test.cjs |
Tests mismatch collection. |
actions/setup/js/unified_session.cjs |
Collects mismatch records. |
actions/setup/js/unified_session_render.test.cjs |
Tests safe publication. |
actions/setup/js/unified_session_render.cjs |
Renders mismatch events. |
actions/setup/js/types/unified_session.d.ts |
Adds mismatch event types. |
actions/setup/js/harness_retry_guard.test.cjs |
Tests mismatch parsing. |
actions/setup/js/harness_error_patterns.cjs |
Detects mismatch signatures. |
actions/setup/js/handle_agent_failure.test.cjs |
Tests failure reporting. |
actions/setup/js/handle_agent_failure.cjs |
Groups and reports mismatches. |
actions/setup/js/detect_agent_errors.test.cjs |
Tests shared detection. |
actions/setup/js/detect_agent_errors.cjs |
Emits mismatch diagnostics. |
actions/setup/js/copilot_wire_api.cjs |
Selects and validates wire APIs. |
actions/setup/js/copilot_harness.test.cjs |
Tests endpoint and retry behavior. |
actions/setup/js/copilot_harness.cjs |
Integrates validation and persistence. |
actions/setup/js/agent_error_patterns.cjs |
Adds shared mismatch classification. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@copilot Two things before we test this in our sandbox:
Please keep this PR to the #67485 scope; don't fix unrelated failures here. Once it's green we'll run the forced model/endpoint mismatch case in the sandbox and post the results. |
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
…ss-fix-mismatch-errors Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Regenerated |
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 14dd37c
|
|
@copilot Tested
One gap: the startup mismatch never reaches the unified session, the failure issue, or the artifacts. In the forced-mismatch run:
In this case the CLI never started, so there is no Copilot session. That is probably the path the unit tests don't cover. Please make sure that a startup mismatch:
Please add a test for this no-session startup case. Also note that threat detection inherits the same Minor: in the routed run the harness logs |
Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
The sandbox run used |
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 698fd4b
|
|
Tested Fixed, verified in real runs
Blocking 1: the failure report for a real mismatch still shows no mismatch. In run 38089386804 the conclusion job has Expected: when the mismatch signal or the Blocking 2: a successful run filed a failure issue. In run 38089392076 every job succeeded. The CLI-mode Observation: run 38089386804's report was added as a comment to #154, whose title is "[aw] Task experienced an engine outage" (created by the previous version for the same workflow). If the existing-issue lookup is meant to match by workflow regardless of category, that's fine. Otherwise it should match on the category too. |
…agent mismatches Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Fixed both blocking findings in 9c55f8f. Both are in Blocking 1: The conclusion job runs
Blocking 2: In a successful run,
Both new tests fail without the fix and pass with it. All 484 tests in On checks: the pre-push gate still fails its custom Go linter on unchecked |
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Pushed |
|
This PR now conflicts with The merge needs to keep both behaviors:
For a real startup mismatch, the issue may also show #67471's step diagnostics (the failing |
…ss-fix-mismatch-errors # Conflicts: # actions/setup/js/handle_agent_failure.cjs # actions/setup/js/handle_agent_failure.test.cjs Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Merged latest main in d8b60d9 and resolved the conflicts.
|
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: d8b60d9
|
…ss-fix-mismatch-errors # Conflicts: # pkg/cli/model_routing_session.go Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Merged latest |
|
Verified
All checks pass, review threads are resolved, and the branch merges cleanly. |

Name-based wire API selection could pair Copilot models with incompatible endpoints, causing mid-run failures that the harness retried. This change uses AWF endpoint metadata and reports mismatches as model misconfiguration.
Endpoint selection
supported_endpoints; retain catalog/name fallback when metadata is unavailable.Retry handling
--continue.Diagnostics
model_endpoint.mismatchunified-session events.