Repository navigation
Count model_endpoint_mismatch_error and model_policy_violation as infrastructure in the routing verdict - #80788
Conversation
…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>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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 No-op messageCompleted the static PR specification review for #80788: aligned with T-UAS-094, no actionable findings, ledger outcome recorded, and final COMMENT review submitted.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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 No-op messageLean already. Ship.
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
🔵 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)
Comment MemoryPeek at saved memory (review-history)History |
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
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
🧪 Test Quality Sentinel Report✅ Test Quality Score: 90/100 — Excellent
📊 Metrics (5 tests)
Score: 40 design + 30 edge + 20 no duplicates + 0 inflation = 90.
|
There was a problem hiding this comment.
✅ 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
Fixes #80781
Part of #79102.
routing_observation.cjsalready listsmodel_endpoint_mismatchinINFRASTRUCTURE_CLASSESandmodel_not_supported_errorinINFRASTRUCTURE_CATEGORIES, but two platform error categories recorded inagent.execution.categorieswere missing fromINFRASTRUCTURE_CATEGORIES:model_endpoint_mismatch_error, emitted when a model is routed to an incompatible endpoint (detect_agent_errors.cjsandagent_execution.cjs).model_policy_violation, emitted byagent_execution.cjswhen an AWF proxy model policy blocks a request.When either category appeared in
agent.execution.categorieswithout other skip-triggering evidence (such as a matching harnessfailureClassesentry or a provider 5xx), on a failed run whose requests matched the selected pair and leftmissing_terminal_safe_output,routingOutcomefell through and recorded{"outcome": "failure"}against the selected model instead of{"outcome": "skip", "reason": "infrastructure"}.Because
agent.execution.categoriesaggregates across attempts,model_policy_violationcan also coexist with confirmed behavioral limits such aseffective_tokens_limit_exceededandpermission_denied_limit_exceeded(as exercised inagent_execution.test.cjs). This PR therefore addsmodel_policy_violationtoYIELD_TO_LIMITalongsideauthentication_failed,api_proxy_guard_rejected, andtransient_error, while keepingmodel_endpoint_mismatch_erroran unconditional infrastructure cause matchingmodel_endpoint_mismatchinINFRASTRUCTURE_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.categoriesmain["model_endpoint_mismatch_error"](withmissing_terminal_safe_output){"outcome": "failure"}{"outcome": "skip", "reason": "infrastructure"}["model_policy_violation"](withmissing_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: addmodel_endpoint_mismatch_errorandmodel_policy_violationtoINFRASTRUCTURE_CATEGORIES, and addmodel_policy_violationtoYIELD_TO_LIMIT.actions/setup/js/routing_observation.test.cjs: add precedence tests for category-onlymodel_endpoint_mismatch_errorandmodel_policy_violationwithmissing_terminal_safe_output, unconditionalmodel_endpoint_mismatch_errorbeside a confirmed limit, andmodel_policy_violationcombined witheffective_tokens_limit_exceededandpermission_denied_limit_exceeded.docs/src/content/docs/specs/unified-agent-session-specification.md: update T-UAS-094 rule 2 to listmodel_endpoint_mismatch_errorandmodel_policy_violation(including thatmodel_policy_violationyields to a confirmed limit), and bump the draft specification version to2.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 inrouting_observation.test.cjs).vitest run routing_observation.test.cjs agent_execution.test.cjs(216/216 passed) andtsc --noEmit(0 errors).