Repository navigation
fix(server): recover queued runs and alert on stranded queues - #177
Merged
Merged
Conversation
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
…ilures Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Owner
Author
|
The existing independent review is complete. Its focused recheck confirmed all four findings on repaired head {"reviewed_head":"0aa64534c381dba336bc7df8d5b712b56db527ea","reviewer":"GPT-6.2 Sol via Codex Magpie, original independent review and focused recheck","findings":[{"id":"F1","severity":"important","summary":"Removed providers preserve queued runs and order","outcome":"confirmed","rechecked_head":"cbdb69fbf9d855512c18ffe0c0e9a8e96947fbd4"},{"id":"F2","severity":"important","summary":"Intentional holds suppress stranded-queue alerts","outcome":"confirmed","rechecked_head":"cbdb69fbf9d855512c18ffe0c0e9a8e96947fbd4"},{"id":"F3","severity":"important","summary":"Dropped alerts may retry after a temporary hold","outcome":"confirmed","rechecked_head":"cbdb69fbf9d855512c18ffe0c0e9a8e96947fbd4"},{"id":"F4","severity":"important","summary":"Snooze expiry retries normal queue promotion","outcome":"confirmed","rechecked_head":"cbdb69fbf9d855512c18ffe0c0e9a8e96947fbd4"}]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A terminal provider failure could leave the next queued turn held indefinitely. Startup reconciliation could also hold an idle queue after its active run had already ended.
Startup now preserves eligible idle queues and promotes them through the same per-thread lock, delivery order, and transactional outbox as the terminal-run handler. The existing process-loss holds, provider and workspace gates, intentional stops, usage limits, and continuation backoff still apply. Snooze and pending runtime requests block promotion. The existing thread-event sweep sends the launching thread a
stuckalert once per queue incident, strictly after 15 minutes.STRANDED_QUEUE_MSkeeps that threshold separate from the configurable active-run quiet threshold.Repair round
Reviewed head
0aa64534c381dba336bc7df8d5b712b56db527ea. Release base18cf8f27f1df245acf78bbbbbea34c1475f4585a.Missing provider instances hold queued runs at the existing disabled-provider gate and preserve their order.
The sweep and delivery recheck suppress intentionally held queues.
A pending delivery deduplicates while queued. A dropped alert can return after the hold clears. Successful delivery deduplicates the rest of the incident.
A scoped wake at the current snooze deadline re-enters native promotion under the existing per-thread lock. Changing the deadline replaces the wake.
Startup reconciliation keeps linked delegated follow-ups held so their parent task becomes idle.
A provider failure with unknown retryability holds the queue. An explicitly retryable ordinary provider failure can still advance it.
Pause/resume now declares the mock provider in settings as well as the registry. The missing-provider gate introduced in the first repair correctly held this unconfigured queue, so the test waited for a running event that could not occur. The fixture change already in the current repair exercises resume with an available provider. The test expectations and provider gate remain intact.
The first three revisions use byte-identical
DelegatedCompletionDelivery.test.tsfixtures and the same serial command. The current repaircbdb69fbf9d855512c18ffe0c0e9a8e96947fbd4uses the corrected settings fixture. First repair7506a8b96da761106aa1170c46e862d04e3be352reproduced both hosted ARC timeouts locally.18cf8f270aa645347506a8b9cbdb69fbfailed/false, expectedqueued/true)The provider-failure case passed on the first repair because the old fixture encountered the missing-provider gate first. With a configured provider, it still produced
failed/falsethere. The current repair preserves the provider-failure hold and passes with the configured provider.The current repair passed all 67 delegated-completion tests serially, 23 selected orchestration tests, and 124 recovery, alert and startup tests, plus server typecheck and changed-file lint and formatting. The startup timeout used one successful
arc-hold-timeoutattempt. Pause/resume traces tofinding-1and the fixture correction already covered byarc-provider-failure-hold. The latter guard used one successful attempt. Findings 1 and 3 reopened for typecheck diagnostics. Finding 4 reopened when a shortened snooze missed its new deadline. The isolated deployed canary remains required.Test proof
On base
18cf8f27f1df245acf78bbbbbea34c1475f4585a,handles a queued message after a provider_error failureand bothrecovers a persisted … run's queued messages in FIFO order without duplicate startscases left the next runqueuedinstead ofstarting.stuck: a stranded queue reports strictly after 15 minutes with a stable incident signaturehad no finding after the threshold. The fixed cases assert durable promotion, FIFO and a single start effect when recovery calls race. Additional assertions cover snooze, approvals, intentional interrupt, usage and restart backoff, process-loss holds, and alert deduplication across sweeps and queue progress.deduplicates a stranded queue until the queue advances or drainsemitted again after a temporary gate on the base reactor.recovers queued work after restartwrote an unexpected hold on the base recovery service. Both pass at the PR head.Local verification passed 29 orchestration, alert, and startup tests plus 26 recovery tests, server typecheck, and changed-file lint and formatting. The local commit hook was skipped for this commit after its repository-wide Knip run flagged four untouched release-base scripts.
Runtime limits
Recovery replay and the race use the in-process SQLite testkit. A live provider restart, acceptance across a provider crash, and delivery to a real launching thread remain unverified. An in-flight run whose acceptance is uncertain still follows the existing recovery policy. Deployment remains pending.
Chief of Staff watchdog
The T3 Code, Closura Home, and Closura HQ project schedule lists each returned no tasks. A read-only search of the shared agent configuration found no matching
Auto-Watchdogjob or stranded-queue prompt. The operator can retire the polling job after identifying it and verifying native recovery and alert delivery on the deployed build.Prior art
Model: gpt-6.2-sol
Task: fix
Deploy: fleet
Implemented with GPT-6.2 Sol in the Codex harness.