Skip to content

LS-56: skip settled task refreshes and unchanged scheduler saves - #27

Merged
Ferryyer merged 4 commits into
mainfrom
agent/inspire-queue/16c427316758
Nov 25, 2026
Merged

Ferryyer merged 4 commits into
mainfrom
agent/inspire-queue/16c427316758

Conversation

@Ferryyer

@Ferryyer Ferryyer commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

The scheduler rereads execution files and saves every historical task each cycle. Skip routine refreshes for settled terminal tasks while retaining checks for blocked tasks, ambiguous submissions, execution_unknown and pending stops. Save task snapshots only when their content changes, and remove the unused sync fingerprints and changed-task payload. Settled stop markers are no longer rewritten each cycle.

Before settling an exited job, reread the runner status after observing the job exit or resource closure. Before confirming a stop, refresh after observing matching exit proof. This preserves natural completion, final step outputs and logs when the runner finishes after the cycle's first status read.

Persist terminal reconciliation in the task snapshot. On upgrade, dispatched failed, stopped or interrupted records without this marker receive a result check before becoming idle. Reopening the database and restarting the service preserve the check. Old records lacking exit evidence continue reconciliation; completed and unstarted cancelled records remain idle.

Changes are limited to gpuqueue/service.py and tests/test_gpuqueue.py. Twelve new regression tests cover zero verified historical reads and saves, active log updates, unchanged cycle syncs, version-bound approvals, late receipts, matching stop proofs, shutdown races, legacy terminal recovery and durable checks across restarts. The runtime race and upgrade recovery tests reproduce incorrect stopped/failed results before their respective fixes.

Validation: all 158 Python unit tests passed with unittest discovery. The sandbox makes HOME/scratch read-only, so a test-only tempfile redirect sends those fixtures into the writable workspace; HOME and product behavior are unchanged. git diff --check passed. No live GPU, Feishu account or macOS WebKit verification was performed.

CI limitation: the existing inspire-queue-review-baseline fails before running tests because its required release commit b9e2c3e is not an ancestor of the main base af51af5 or this task branch. The failure already exists on the original PR head (run 45577553748). Workflow changes are outside this issue's authorized scope.

Target branch: main. Another issue also edits refresh_task; whichever PR merges later may need rebasing.

Closes LS-56

Ferryyer and others added 4 commits November 25, 2026 00:34
@Ferryyer
Ferryyer merged commit 9fe4ac2 into main Nov 25, 2026
1 check passed
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