Skip to content

abandon-stuck: hand back the in-flight backlog with JobRegistry.abandonJob - #31

Merged
waytofarout merged 2 commits into
testnetfrom
feat/abandon-stuck-cli
Oct 20, 2026
Merged

waytofarout merged 2 commits into
testnetfrom
feat/abandon-stuck-cli

Conversation

@waytofarout

Copy link
Copy Markdown
Contributor

Follow-up to #30. The worker now abandons a job it fails, but the backlog from before that change stays Acknowledged until the keeper's 48 h no-fault settle; at the 100 cap the chain refuses the worker's claims, and removeSupportedModel refuses while any job for the model is still active, so the backlog blocks both recovery paths (g1 worker-4/5 today).

lightchain-worker abandon-stuck finds this worker's jobs via JobSubmitted events in the last ABANDON_LOOKBACK_BLOCKS (default 150000), reads each state, and calls abandonJob for every one still Submitted/Acknowledged. ABANDON_DRY_RUN=1 only lists. One failed abandon is reported and skipped.

Three unit tests on a fake chain (window and worker filtering, dry run, one revert does not stop the sweep). Builds and vets for Linux; the cli test package only runs on Linux (release uses flock), so CI runs them.

…stry.abandonJob

The worker now abandons a job it fails, but a backlog from before that
change stays Acknowledged until the keeper's no-fault settle 48 h after each
deadline. At maxConcurrentJobs of those the chain refuses the worker's
session claims, and WorkerRegistry.removeSupportedModel refuses while any
job for the model is still counted active, so the backlog blocks both
recovery paths (g1 worker-4/5, 2026-10-19).

`lightchain-worker abandon-stuck` finds this worker's jobs through
JobSubmitted events in the last ABANDON_LOOKBACK_BLOCKS (default 150000),
reads each state, and calls abandonJob for every one still Submitted or
Acknowledged: consumer refunded, in-flight slot released. ABANDON_DRY_RUN=1
only lists. A failed abandon is reported and skipped, never fatal.
…REGISTRY_ADDRESS up front

The four progress lines ignored fmt.Fprintf's result, which the CI lint
(errcheck, new findings only) rejects. abandon-stuck also reads and writes
the JobRegistry, so it takes loadAndValidateForSettlement like release does:
a missing JOB_REGISTRY_ADDRESS fails at config load with a clear message
instead of after the chain dial.
@waytofarout
waytofarout merged commit cbee42f into testnet Oct 20, 2026
3 checks 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