Repository navigation
fix: release stalled pre-publication check claims and dispatch retries directly - #4945
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
This branch was successfully deployed
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.
Problem
A pre-publication check can sit with no progress for over an hour after a single worker fault.
Observed on 2026-11-23 for
@openclaw/diffs@2026.11.10-beta.1(attemptzx7684n23xxjy339hgftb4w6598jscs5):totalClaimed: 0), and exitedsuccess.prepublication_container_cleanup_unconfirmedand stopped. By design it keeps workspace custody (specs/plugin-qualified-runtime.md), but it also never released the claim, so the attempt stayed locked until the lease expired.Retryable scanner failures have the same gap. They put the attempt back in
pending_checkswith a 5-minute backoff but never dispatch it again, so they also depend on that sweep.Solution
releasePrePublicationChecksClaim, a worker action gated by the worker token andreleasePrePublicationChecksClaimInternal. For the exact claim only, it shortens the lease to the existing 5-minute retry backoff, records why, and schedules a targeted dispatch for when the backoff ends. It doesn't changestatusorcheckFailureCount, so a cleanup fault still isn't treated as the plugin's scan failure and sends no failure email.workerMustStop. Workspace custody and the stop are unchanged.requestPublishAttemptDispatchtakes an optional delay.Evidence
convex/publishAttempts.test.ts,convex/publishAttemptDispatch.test.tsandscripts/security/run-prepublication-worker.test.tspass (113 tests), as do the recovery and template runtime suites.tsc --noEmitand oxfmt are clean. The two oxlintno-unnecessary-type-conversionerrors inrun-prepublication-worker.ts(lines 773 and 886) exist on main.scripts/securitysuite runs in parallel, some ClawScan diagnostic, SkillSpector and installation tests fail locally. The diagnostic and SkillSpector files fail the same way on main, and the rest pass when run alone, both on main and with this change.Not addressed here:
backoffFailedPrePublicationHandoffInternal.