Repository navigation
Conversation
Ensure applyRun in actions/setup/js/routing_history.cjs applies scope creation, receipt binding, last_role, pair.tests, and unexplained accounting on live runs even when run.observation is null (no_agent), without switching scope.incumbent or counting a model outcome. Tighten receiptBound to require a non-empty string selected pair and a valid role for the mode so malformed or null-selected receipts follow the unbound-receipt path. Sync the no-agent and six no-agent-live-* oracle vectors in actions/setup/js/fixtures/routing-history/aw2-reducer.json and add unit tests covering serve/ordinary receipts, scope bounds, mismatched/null selections, and malformed live roles. Fixes #80796 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🔬 Test Quality Sentinel is analyzing test quality on this pull request... |
|
✅ 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 messageReviewed PR #80799 at head a68906a against the applicable adaptive-routing/compiler contract. No specification regression or eligible synchronization was identified; no review action was needed.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality 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 PR #80799 review: no actionable findings; review and continuity record submitted.
|
There was a problem hiding this comment.
What this change does: It records live routing selections when an agent makes no request. It also checks receipt roles and selected pairs and adds coverage for these cases.
Should fix
- Merge the repeated role cases. The serve and ordinary tests build the same run and make the same assertions. Use
it.eachfor the role and incumbent-after values so both cases stay covered without maintaining two copies. Otherwise, future changes to the setup and checks need to be repeated.
Verdict: Ship.
Not checked: correctness, security, performance, or test execution; this review was limited to complexity.
Lean: -20 lines possible.
Generated by ✂️ Ponytail Reviewer for #80799 · codex · routed: gpt61 medium · ~7 AIC · ⌖ ~1 AIC · ⊞ 176
Comment /ponytail to run again
| expect(serveResult.state.unexplained).toBe(0); | ||
| expect(serveResult.lines).toMatchObject([{ note: "no_agent", role: "serve", pair: CHALLENGER, outcome: null, counted: false }]); | ||
|
|
||
| const ordinaryResult = applyRun(state, runs, { |
There was a problem hiding this comment.
Should fix: merge the repeated role cases. These serve and ordinary cases build the same run and check the same results, so changes to the setup or assertions must be repeated. Use it.each with the role and incumbent-after value as inputs; both checks remain, with roughly 20 fewer lines to maintain.
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Reviewed the changed lines and added tests. I found no actionable correctness, performance, or maintainability issues blocking this PR.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
Fixes #80796
In adaptive routing (#79102), AWF writes its selection receipt (
adaptive-selection.jsonl) before the primary agent starts. When the agent then fails during startup or exits without making any LLM request,observeRoutedRunemits norouting.observation, sorun.observationisnullwhenapplyRuninactions/setup/js/routing_history.cjsprocesses the run. Previously,applyRunreturned early on!run.observationbefore readingrun.receiptorrun.prepare, so liveno_agentruns leftscope.last_role,pair.tests, andstate.unexplaineduntouched.Concrete example
Suppose AWF selects an untried challenger
github-copilot/model-a@highwithrole: "test"in live mode, and the agent crashes during startup before sending any LLM request (observation: null).no_agentrunscope.last_role(boundtestreceipt)"serve"(share stays open)"test"(share consumed)pair.tests(boundtestreceipt)0(allowance never spent)1(allowance spent,seenupdated)scope.last_role(boundprobereceipt)"serve""probe"(share consumed,pair.testsunchanged)state.unexplained(absent/unbound receipt,explore_allowed !== falseor missingprepare)01(andlast_role: "test")state.unexplained(absent/unbound receipt,explore_allowed === false)00(andlast_role: "test")runs.jsonlline (boundtestreceipt){"role":null,"pair":null,"counted":false,"note":"no_agent"}{"role":"test","pair":"github-copilot/model-a@high","counted":false,"note":"no_agent"}Summary of changes
actions/setup/js/routing_history.cjs:applyRun, keep observe-mode!run.observationunchanged (no_agent, no scope creation or role/test/unexplained changes), while letting live-mode!run.observationruns ensure the scope exists (respecting the 4-scope bound) and run the same receipt-binding andprepareexploration accounting (scope.last_role,pair.tests,pair.seen, andstate.unexplained). Liveno_agentruns return before the incumbent-switch and outcome-recording paths, writingnote: "no_agent",role(ornullif unbound),pair(selected pair ornull), andcounted: false.receiptBound, requirereceipt.selectedto be a non-empty string matchingrun.pairand requirereceipt.roleto be valid for the mode (serve,test,probe,ordinaryin live mode;observein observe mode), so missing, null-selected, or malformed receipts follow the unbound-receipt path.actions/setup/js/fixtures/routing-history/aw2-reducer.json: sync the updated observe-modeno-agentvector and the sixno-agent-live-*oracle vectors fromadaptive-routing/oracle.py.actions/setup/js/routing_history.test.cjs: add unit tests covering boundserve(verifyingscope.incumbentis not switched) andordinaryreceipts, scope-bound eviction on live vs observeno_agent, mismatched and null-selected receipts, and malformed live receipt roles (unknown string,observe, missing, numeric) asserting serializedrole: null.Local validation (head
a68906a0b6)eslint(eslint-factory/eslint.config.cjs) onrouting_history.cjsandrouting_history.test.cjs: passednpx prettier --end-of-line auto --check: passed (committed git blobs verified pure LF)npm run typecheck(tsc --noEmit): passednpx vitest run routing_history.test.cjs: 53/53 passed