Skip to content

Keep discarded queue cleanup running after per-run failures - #736

Open
Vilin97 wants to merge 1 commit into
mainfrom
fix/queue-cleanup-timeout-isolation
Open

Vilin97 wants to merge 1 commit into
mainfrom
fix/queue-cleanup-timeout-isolation

Conversation

@Vilin97

@Vilin97 Vilin97 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

When a ref lookup or cancellation request times out, the cleanup added in #735 stops before processing later discarded runs. Keep uncertain refs, log failed cancellation requests and continue, and report only requests accepted by the CLI.

Adds regression tests for a lookup timeout, a cancellation timeout and a rejected cancellation followed by a later successful request.

Validation: 9 targeted tests passed; Ruff check and format check passed. The three new regressions fail against the original helper. No real cleanup or cancellation was executed locally.

Draft pending current-main validation and normal protected checks.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

No added or modified Lean files under LeanPool/ in this PR. No compile-cost measurements are needed.

Advisory only — never blocks merge.

@Vilin97

Vilin97 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 LLM review — refactor (gpt-6.1-sol)

Reviewed head: 86797a9a2bcd5a7d30b2a4ebdf4765d7b994ad0e

Verdict: ✅ approve

The Python cleanup helper now preserves runs after uncertain ref lookups, continues after failed cancellation requests, and returns only run IDs whose cancellation command succeeded. The explicit error handling improves robustness without obscuring control flow. All nine targeted tests passed on Python 3.12, and the three new regressions failed against the original helper; live GitHub operations were not exercised.

Aspect Value
Scope merge-queue cleanup error handling
Introduces tech debt ✅ no
Maintainability ✅ improved
Brittleness ✅ more_robust
Risk ✅ low

The focused failure handling and regression coverage improve maintainability without introducing actionable technical debt.


Tokens: 399,332 in / 4,185 out · Tier: codex-subscription · Effort: xhigh · Billing: Codex subscription quota (no API credits) · Estimated cost: $1.6601 (Standard API equivalent; uncached input) (long-context rate)
Automated review against .github/REFACTOR_REVIEW_RULES.md. Disagree? Reply on the PR; rules can be updated in a PR of their own.

@Vilin97
Vilin97 marked this pull request as ready for review November 3, 2026 16:46
@Vilin97
Vilin97 added this pull request to the merge queue Nov 3, 2026
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

RetriggerView in Greptile

[Medium impact] The reviewed changes appear safe to merge.

Summary

The helper now keeps runs whose ref lookup times out and continues after failed cancellation requests.

  • Queue cleanup keeps checking runs after individual failures.

Reviews (1) · Last reviewed commit: "Keep discarded-run cleanup going after p..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant