Registry Mirror
Skip to content

Conversation

@rabeckett

@rabeckett rabeckett commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #81143.

A save can stop advancing routing history even when the next run it needs is on page 2. The filtered Actions API reports more matches than it will serve, so choosing a page from total_count alone can send the writer to an empty page on every save.

I checked the main-branch listing of auto-triage-issues.lock.yml on November 25. Page 1 reported 2,500 matches; page 2 returned runs 4,979 through 4,880, including run 4,901. The old search would first request page 13, which returned zero rows. This is an observation of the read-only API, not a claim that a particular save failed.

The writer now stays within the first ten 100-run pages of each query. If the missing history is older, it starts another query at the previous window's oldest creation second. Including that second avoids losing runs with tied timestamps. When the call budget is exhausted, only a contiguous interval the writer can verify is eligible to advance; if it cannot establish that interval, the saved floor does not move. The adaptive-routing reference now describes this limit.

Validation on edf652062990922d8d7b28890aeab98524962907: all 122 focused routing-history tests passed, as did TypeScript checking, Prettier, and make agent-report-progress in a clean LF Linux checkout. The regression cases include a page-2 target in a 5,000-run listing, a 2,002-run backlog beyond the cap, and same-second boundaries where verification must stop early. Two more cases insert a run while a page is cached: with a changed count the writer retries on the next save, and with a capped count it corroborates the missing run before advancing. A sparse page-2 target now takes three requests (pages 1, 10 and 2) for both distinct and tied probe timestamps. No live workflow was dispatched.

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

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer failed during the skills-based review.

Agent messages

Incomplete work

missing_terminal_safe_output

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

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Agent messages

No-op message

PR #81144 reviewed at head db61a22: aligned with applicable routing-history contracts; no actionable findings or specification updates, so no review publication was needed.

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.

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

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

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

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

Agent messages

No-op message

Completed PR #81144 review: published one inline correctness finding, submitted REQUEST_CHANGES review, and recorded review history.

PR Code Quality 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.

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

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Generated by Ponytail Reviewer for #81144 · codex · routed: gpt61 medium · ~8 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.

What this change does: It keeps routing-history searches within the Actions listing cap and continues through older creation-time windows. The tests cover large backlogs and timestamp ties.

Should fix

  1. Share the pagination test fixtures

    • What this is: The new cases build runs and call listRuns with mostly identical fields.
    • Problem: Those copies must be updated together when the common fixture changes.
    • Fix: Lift the existing local run and reconcile helpers and allow overrides for each case.
    • If we skip it: Future changes will need edits across many test setups.

Verdict: fix 1 first.
Lean: -60 lines possible.

Generated by ✂️ Ponytail Reviewer for #81144 · codex · routed: gpt61 medium · ~8 AIC · ⌖ ~1 AIC · ⊞ 176
Comment /ponytail to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-ade9864f-df28-43b7-b824-bd0a3e148c46","parents":[],"payload":{"id":"ldg-c1f71e13-dcde-4a4a-96d0-14d155d9c4ad","operation":"append","value":{"finding_count":0,"head_sha":"db61a225a51af0aec200ab968735fcea88c9ec41","outcome":"aligned"}},"sha":"sha256:d2afd5892f068cd86a5b2f73537e521e8cdf44a454acdc63a127ffae8117e989","timestamp":"2026-11-25T20:17:56.177Z","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.

Found one correctness issue in the new bounded pagination: cached pages can become non-contiguous as new runs arrive during the walk-back, allowing reconciliation to advance past an omitted run. See the inline comment for the failure mode and mitigation.

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-ccb34662-a03b-4654-b31d-406f253625af","parents":[],"payload":{"id":"ldg-3f18adf6-6919-45a3-ba6c-b0aa6f790510","operation":"append","value":{"finding_count":1,"head_sha":"db61a225a51af0aec200ab968735fcea88c9ec41","outcome":"findings"}},"sha":"sha256:9671e3af886006faf8deab9bb4df6870b5cf2a8714313c43131cd9bd32d3146c","timestamp":"2026-11-25T20:21:34.960Z","type":"ledger_append","version":1}
History

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rabeckett

Copy link
Copy Markdown
Collaborator Author

The non-required Matt Pocock Skills Reviewer finished without publishing a review. Its collector reported missing_terminal_safe_output: the driver exited successfully, but made no terminal safe-output call. The workflow opened #81145; the same failure occurred on an unrelated branch. This is not a failing pagination test. I have not requested a paid rerun.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

🟢 Test Quality Score: 80/100 — Excellent

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

📊 Metrics (7 tests)
Metric Value
Analyzed 7 (Go: 0, JS: 7). Scope: actions/setup/js/push_routing_history.test.cjs, 6 new and 1 rewritten test
✅ Design 7 (100%)
⚠️ Implementation 0 (0%)
Edge/error coverage 7 (100%)
Duplicate clusters 2
Inflation YES: 641 added test lines vs 153 added production lines (4.2:1)
🚨 Violations 0
Test Line Classification Issues
catches up a backlog past the 1,000-run listing cap in one save 855 design / behavioral_contract Rewritten; page-cap and exact created filter string asserted
reaches a floor on page 2 (and page 9) of a 5,000-run workflow 1266 design / behavioral_contract Page-cap assertion
uses bounded created windows for a 2,002-run backlog with same-second ties 1323 design / behavioral_contract Exact created filter string
advances a backlog deeper than one save calls in verified chunks 1375 design / behavioral_contract None
fails closed when budget is exceeded, timestamps stall, or created_at is missing 1432 design / behavioral_contract Six scenarios in one it; exact upward call sequence (line 1618)
keeps searching for a reachable floor across a tie and an overshoot 1651 design / behavioral_contract Exact call count toHaveLength(19) (line 1682); exact page order [1, 10, 2] (line 1695)
drains out-of-order same-second ties across page 10 and verifies upper ties 1698 design / behavioral_contract Exact created filter string
⚠️ Concerns (5, evidence-based, non-blocking)

Duplicate clusters (2, -10 points): The page-cap assertion every(call => (call.page || 1) <= 10) is repeated in 6 tests, and the inline listRuns({...}) argument object appears 14 times, mostly in new code. A shared helper would make the next cap change a one-line edit.

Inflation (4.2:1, +0 points): The test file adds 641 lines against 153 production lines. Most added lines are scenario setup with inline fixture arrays, which inflates the line count.

Brittle assertions (lines 1618, 1682, 1695): Exact call sequences and counts pin the internal search walk, so a behavior-preserving refactor would break them. The affected tests are counted as design because their primary invariant is outcome-based. If the two pinned-sequence tests (1432, 1651) were counted as implementation, the ratio would be 2/7 (28.6%), still under the 30% threshold.

Rewritten test (line 855): The old version asserted mid-save progress (reconciled_through between bounds, unexplained 0). The new version asserts only the end state. Chunked-advance coverage now sits in the test at line 1375, so this is coverage moved, not lost.

Test at line 1432: Six scenarios share one it, so a failure does not identify which scenario broke. Splitting it would improve failure locality.

🔍 Method and Scope
  • Read the full push_routing_history.test.cjs diff (33.8 KB, head db61a225, matching pr-meta.json).
  • The JS extractor outputs (js-new-test-funcs.txt, js-test-stats.txt) were empty even though the test file changed. Classifications come from the diff itself.
  • No Go test files changed. No gomock or testify mocks. No build-tag violations.
  • All 7 changed tests were analyzed, so nothing was sampled.

Verdict

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

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 4.6K · 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: 80/100. 0% implementation tests (threshold: 30%).

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 4.6K
Comment /review 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.

🟡 Changes recommended

The search can exhaust its call budget before reaching the saved floor and restart without progress, leaving reconciliation unverified and new unsaved runs unreconciled as the backlog grows.

2 open issues
What changed in this PR

Updates adaptive-routing history reconciliation to respect GitHub Actions’ 1,000-result listing cap, addressing the pagination stall described in #81143.

Changes:

  • Limits queries to ten pages and uses inclusive creation-time windows to reach older runs.
  • Adds regression coverage for large backlogs, tied timestamps, truncated responses, and call-budget exhaustion.
  • Documents the listing cap and reconciliation approach.
File Description
docs/​src/​content/​docs/​reference/​adaptive-routing.md Documents bounded pagination and creation-time windows.
actions/​setup/​js/​push_routing_history.test.cjs Models the API cap and adds reconciliation regression cases.
actions/​setup/​js/​push_routing_history.cjs Implements capped pagination, time windows, and verified coverage limits.

Review effort: Max (adaptive)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rabeckett
rabeckett merged commit ea7bc4d into main Nov 25, 2026
41 checks passed
@rabeckett
rabeckett deleted the fix/reconciliation-pagination-1000-cap branch November 25, 2026 20:39
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.4.1

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.

Routing history reconciliation stalls at the Actions 1,000-result pagination cap

2 participants