feat(worker): operator surrender lane for unrecoverable ordinary release authority - #257
Merged
Conversation
…ase authority An assigned worker whose task lost its ordinary authority (local teardown consumed state/<task>.meta before any receipt existed) had no sanctioned exit: release requires a proof nothing can mint, withdraw only takes queued entries, and the remaining path was hand-editing controller state. All four pilot slots sit in exactly this shape. surrender is the refusal-first replacement for that hand edit: it runs the ordinary authority first and refuses when that succeeds, requires dark compute (deallocated or stopped VM), an operator --reason, --confirm-surrender and the exact subscription confirmation, refuses to replace an ordinary release proof, and refuses while a pending provider action exists. The minted bundle keeps the fm.worker-release/v2 shape the deallocate/delete-compute/reset machinery fences on, with every authority verdict 'surrendered' (release_receipt rejects that verdict, so the bundle cannot replay through ordinary release) plus a surrender block recording the reason and the authority's refusal verbatim. The wrapper removes the task's locally staged provider credential keyed off the FM-SURRENDERED receipt, mirroring the withdraw lane.
Adversarial review of the surrender lane found the refusal surface thinner than advertised. This commit closes every finding: - F1: the controller's own execution records outrank operator judgment. When any recorded execution for the exact worker shows outcome_present, outcome_uncommitted_changes, or outcome_commits > 0, surrender refuses and names the execution; --confirm-discard-unlanded overrides deliberately and the discard list is recorded in the durable surrender block. - F3: the authority-success gate fails closed. Only stderr carrying WORKER AUTHORITY REFUSED counts as a refusal; a broken tool (traceback, missing helper) raises instead of unlocking surrender. - F6: the idempotent path re-verifies the stored proof binds the exact task generation before re-issuing it, and the rerun's --output is asserted equal to the stored proof. - F4: a converged (complete) entry's refusal names the credential recovery (fm_cloud_state_remove) instead of a generic message; documented. - F5: docs no longer call withdraw the only other queue mutation, state that surrender mints the release rather than adding a second exit, and the static contract now pins command_surrender, the fail-closed marker, the discard confirmation, and the doc paragraph's gates line. - F2: a surrender_refusal_matrix unit pins every advertised gate at the command: malformed identity, pending provider action, converged-entry recovery, ordinary-proof non-replacement, foreign-generation stored proof, all three unlanded-evidence shapes, fail-closed tool breakage (subprocess boundary substituted, classification code real), and the ambiguous or missing-inventory worker.
ruby-dlee
force-pushed
the
feat/worker-surrender-lane
branch
from
August 19, 2026 15:21
f28436d to
a41d5fc
Compare
…it trail The verification round found the override half of the unlanded-evidence gate untested: a regression bricking --confirm-discard-unlanded, or dropping the discarded_unlanded_executions record from the proof, shipped green. The e2e surrender now injects a matching execution record into durable controller state, proves the refusal names its digest, proceeds only with the discard named, and asserts the proof records exactly that digest list.
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.
Why
All four pilot worker slots are stranded in the same shape: assigned, VM deallocated by TTL, and no sanctioned exit. Their tasks were closed out locally (teardown consumed state/.meta before any receipt existed - the unimplemented D6 ordering), so authority-receipt can never mint a proof, release requires that proof, and withdraw only takes queued entries. The only remaining path was hand-editing controller state.
What
A refusal-first surrender command that replaces the hand edit:
Verification