Skip to content

Count model_endpoint_mismatch_error and model_policy_violation as infrastructure in the routing verdict - #80788

Merged
rabeckett merged 1 commit into
mainfrom
fix/verdict-endpoint-mismatch-policy
Nov 24, 2026
Merged

rabeckett merged 1 commit into
mainfrom
fix/verdict-endpoint-mismatch-policy

Conversation

@rabeckett

Copy link
Copy Markdown
Collaborator

Fixes #80781

Part of #79102.

routing_observation.cjs already lists model_endpoint_mismatch in INFRASTRUCTURE_CLASSES and model_not_supported_error in INFRASTRUCTURE_CATEGORIES, but two platform error categories recorded in agent.execution.categories were missing from INFRASTRUCTURE_CATEGORIES:

  • model_endpoint_mismatch_error, emitted when a model is routed to an incompatible endpoint (detect_agent_errors.cjs and agent_execution.cjs).
  • model_policy_violation, emitted by agent_execution.cjs when an AWF proxy model policy blocks a request.

When either category appeared in agent.execution.categories without other skip-triggering evidence (such as a matching harness failureClasses entry or a provider 5xx), on a failed run whose requests matched the selected pair and left missing_terminal_safe_output, routingOutcome fell through and recorded {"outcome": "failure"} against the selected model instead of {"outcome": "skip", "reason": "infrastructure"}.

Because agent.execution.categories aggregates across attempts, model_policy_violation can also coexist with confirmed behavioral limits such as effective_tokens_limit_exceeded and permission_denied_limit_exceeded (as exercised in agent_execution.test.cjs). This PR therefore adds model_policy_violation to YIELD_TO_LIMIT alongside authentication_failed, api_proxy_guard_rejected, and transient_error, while keeping model_endpoint_mismatch_error an unconditional infrastructure cause matching model_endpoint_mismatch in INFRASTRUCTURE_CLASSES.

Example

A failed routed run whose requests matched the selected pair, with no other skip-triggering evidence (such as a harness failure class or provider 5xx) and no terminal safe output:

agent.execution.categories Verdict on main Verdict with this PR
["model_endpoint_mismatch_error"] (with missing_terminal_safe_output) {"outcome": "failure"} {"outcome": "skip", "reason": "infrastructure"}
["model_policy_violation"] (with missing_terminal_safe_output) {"outcome": "failure"} {"outcome": "skip", "reason": "infrastructure"}
["model_endpoint_mismatch_error", "effective_tokens_limit_exceeded"] {"outcome": "failure"} {"outcome": "skip", "reason": "infrastructure"}
["model_policy_violation", "effective_tokens_limit_exceeded"] {"outcome": "failure"} {"outcome": "failure"} (unchanged)
["model_policy_violation", "permission_denied_limit_exceeded"] {"outcome": "failure"} {"outcome": "failure"} (unchanged)

A run that succeeded is never re-examined for platform causes, so recovered errors continue to count as {"outcome": "success"}.

Changes

  • actions/setup/js/routing_observation.cjs: add model_endpoint_mismatch_error and model_policy_violation to INFRASTRUCTURE_CATEGORIES, and add model_policy_violation to YIELD_TO_LIMIT.
  • actions/setup/js/routing_observation.test.cjs: add precedence tests for category-only model_endpoint_mismatch_error and model_policy_violation with missing_terminal_safe_output, unconditional model_endpoint_mismatch_error beside a confirmed limit, and model_policy_violation combined with effective_tokens_limit_exceeded and permission_denied_limit_exceeded.
  • docs/src/content/docs/specs/unified-agent-session-specification.md: update T-UAS-094 rule 2 to list model_endpoint_mismatch_error and model_policy_violation (including that model_policy_violation yields to a confirmed limit), and bump the draft specification version to 2.15.1 (2026-11-24).

Validation

Validated on commit f86428b7fd:

  • make agent-report-progress (BASE_REF=5767202e9c): passed (JS lint, schema freshness, impacted setup JS tests: 57/57 in routing_observation.test.cjs).
  • Focused tests: vitest run routing_observation.test.cjs agent_execution.test.cjs (216/216 passed) and tsc --noEmit (0 errors).

…rastructure in the routing verdict

Add model_endpoint_mismatch_error and model_policy_violation to INFRASTRUCTURE_CATEGORIES in routing_observation.cjs so category-only platform rejections skip as infrastructure instead of counting against the selected model. Add model_policy_violation to YIELD_TO_LIMIT so a run that also hit a confirmed behavioral limit still counts as a failure, keep model_endpoint_mismatch_error unconditional, add unit tests, and update T-UAS-094 (specification 2.15.1).

Fixes #80781

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 24, 2026 19:43
Copilot AI adaptive review requested due to automatic review settings November 24, 2026 19:43
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 5.1K · history

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 7.4K · history

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

The [aw] No-Op Runs tracker omits agent messages. The category uses structured run status, not interpretation of agent prose.

No-op message

Completed the static PR specification review for #80788: aligned with T-UAS-094, no actionable findings, ledger outcome recorded, and final COMMENT review submitted.

Generated by PR Specification Reviewer for #80788 · copilot · gpt56 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.8K · history

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.7K · history

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

The [aw] No-Op Runs tracker omits agent messages. The category uses structured run status, not interpretation of agent prose.

No-op message

Lean already. Ship.

Generated by Ponytail Reviewer for #80788 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 176 · history

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changed routing classification, regression tests, and specification updates. I found no actionable correctness or maintainability issues on the changed lines. The new infrastructure categories and limit precedence are consistent with the documented routing rules and covered by focused tests.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Reviewed PR head f86428b7fd1c322ffb5abfcfb93767cba9d6032a against T-UAS-094 in docs/src/content/docs/specs/unified-agent-session-specification.md. The implementation and specification are aligned; no actionable findings.

Key assessment

The added model_endpoint_mismatch_error and model_policy_violation categories correctly classify category-only platform failures as skip/infrastructure. model_endpoint_mismatch_error remains unconditional infrastructure evidence, while model_policy_violation yields to confirmed behavioral limits through YIELD_TO_LIMIT, matching the added focused tests. The T-UAS-094 rule 2 wording, version 2.15.1, publication date, and change log accurately synchronize the observable behavior without weakening existing cancellation, rate-limit, attribution, validation, or threat-detection precedence.

Static review only; tests were not run by this review. No specification edits or branch publication were needed because the PR already contains the eligible synchronization.

Generated by PR Specification Reviewer for #80788 · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.8K
Comment /review-specs to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The routing-evidence change relies on cross-attempt precedence between aggregated platform errors and confirmed behavioral limits, exceeding conservative approval’s limited-consequence scope.

No open issues 🎉

What changed in this PR

This PR corrects routing verdicts so platform model rejections are not counted as model failures, improving the evidence used for adaptive routing.

Changes:

  • Classifies endpoint mismatches and model policy violations as infrastructure, while preserving behavioral-limit precedence for policy violations.
  • Adds five regression cases covering category-only errors and interactions with confirmed limits.
  • Updates T-UAS-094 and bumps the draft specification to version 2.15.1.
File Description
docs/​src/​content/​docs/​specs/​unified-agent-session-specification.md Documents infrastructure classification and limit precedence; updates the version and changelog.
actions/​setup/​js/​routing_observation.test.cjs Adds regression tests for both categories and their limit precedence.
actions/​setup/​js/​routing_observation.cjs Adds infrastructure categories and makes policy violations yield to confirmed limits.

Review effort: Balanced (adaptive)

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-a09a67c9-47c4-4717-823d-c29b9e6c3d03","parents":[],"payload":{"id":"ldg-bf22a10f-25d7-46bd-bace-f817398dac96","operation":"append","value":{"finding_count":0,"head_sha":"f86428b7fd1c322ffb5abfcfb93767cba9d6032a","outcome":"no_findings"}},"sha":"sha256:a4c239c3f0fb9cc34fe7a48a8740bef71e2133bc6ce8b5a4c2f4743813e4c328","timestamp":"2026-11-24T19:50:39.578Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-a5a98576-9096-494a-8378-6154aba8628f","parents":[],"payload":{"id":"ldg-dc23995e-b0e7-4a4a-b8f1-873e1228d413","operation":"append","value":{"finding_count":0,"head_sha":"f86428b7fd1c322ffb5abfcfb93767cba9d6032a","outcome":"aligned"}},"sha":"sha256:f983571dbd87a9fc53fcc987f410d12ca8708969362595a6fe8c93a7e1e0160e","timestamp":"2026-11-24T19:51:43.940Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The category sets and the YIELD_TO_LIMIT change are correct, and the precedence table in the PR matches the code. I checked all five rows by running routingOutcome directly: the two category-only cases skip as infrastructure, model_policy_violation beside a token or permission limit stays failure, and model_endpoint_mismatch_error beside a token limit skips as infrastructure. The spec T-UAS-094 rule 2 agrees with the code.

Non-blocking suggestion

An inline comment on routing_observation.cjs suggests a short note explaining why model_endpoint_mismatch_error is unconditional while model_policy_violation yields to limits.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 5.1K
Comment /matt to run again

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

✅ Test Quality Score: 90/100 — Excellent

Analyzed 5 test(s): 5 design, 0 implementation, 0 violation(s).

📊 Metrics (5 tests)
Metric Value
Analyzed 5 (Go: 0, JS: 5)
✅ Design 5 (100%)
⚠️ Implementation 0 (0%)
Edge/error coverage 5 (100%)
Duplicate clusters 0
Inflation YES (informational): 25 added test lines vs. 6 added production lines, 4.2:1
🚨 Violations 0

Score: 40 design + 30 edge + 20 no duplicates + 0 inflation = 90.

Test File Classification Issues
a category-only model endpoint mismatch with no terminal output routing_observation.test.cjs:99 behavioral_contract / high_value / design_test None. Fails on the base commit, which returns failure.
a category-only model policy violation with no terminal output routing_observation.test.cjs:104 behavioral_contract / high_value / design_test None. Fails on the base commit.
a model endpoint mismatch beside a confirmed limit routing_observation.test.cjs:109 behavioral_contract / high_value / design_test None. Pins that endpoint mismatch is not yielded to a limit. Fails on base.
an effective token limit beside a model policy violation routing_observation.test.cjs:130 behavioral_contract / high_value / design_test None. Regression guard for the YIELD_TO_LIMIT pairing. Passes on base.
a permission denial limit beside a model policy violation routing_observation.test.cjs:135 behavioral_contract / high_value / design_test None. Regression guard. Passes on base.
⚠️ Flagged Tests (0)

No test is flagged. The only signal is the file-level inflation ratio, which is informational. The added table rows are formatter-expanded across several lines, and each row covers a distinct classification path.

Note: vitest was not executed in this review because dependency installation was not permitted. Classifications come from tracing routingOutcome against each row. Run the file with vitest to confirm.

Verdict

✅ passed. 0% implementation tests (threshold: 30%).

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 7.4K · history
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Test Quality Sentinel: 90/100. 0% implementation tests (threshold: 30%). No violations.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 7.4K
Comment /review to run again

@rabeckett
rabeckett merged commit f886f1c into main Nov 24, 2026
414 of 416 checks passed
@rabeckett
rabeckett deleted the fix/verdict-endpoint-mismatch-policy branch November 24, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Count model_endpoint_mismatch_error and model_policy_violation as infrastructure in the routing verdict

2 participants