Files
seaweedfs/seaweed-block/docs/spec/cuttime
pingqiu-cpu 26a6361f6a fix: keep progressing manual cuts alive beyond the total timeout (#964)
Interim merge note (spec trace workflow startup_failure since 22:45Z): go test (linux) and process-level tests (real binaries) passed on 8f14f03a against the current main head 9533b51f; spec-trace-check.sh and public-text-check.sh run locally with the base branch's scripts against this head and body: both pass. Linux qualification at 7be2a259 (8f14f03a differs only in docs/time-bounds.tsv): vet clean, -short of the six touched packages pass, targeted -race -count=2 finds no race; matched-box runtime of chunkstore and durable below main. Code review ACCEPT carried to 7be2a259; model review FINAL ACCEPT (CutTime r8c).
2026-12-03 02:40:36 -08:00
..

CutTime r8c

The supplied r8c refinement makes foreign-HEAD settlement terminal (NoRetryAfterFence) and separates inherited recovery from the current invocation's result (OwnResult). Its exhaustive BFS verdicts are preserved in recorded-r8c/RESULT.txt: 46/46, four safe configurations, all expected mutant violations and witnesses, no bound. No new local model run is claimed. The earlier r8b evidence remains recorded.

Projection: captureManualCut settles an inherited proposal before calling captureInvocationLocked for its own barrier. Each proposal records its creating invocation's process-local tag; only that tag's landed proposal can answer this call. A completed inherited settlement is one sequence/window step, never this call's result. Failed inherited reads do not renew either. Own-proposal settlement reads renew and rise only while publication authority is retained. A foreign HEAD is terminal without renewal: a proved landed proposal returns its result; otherwise the answer is definite fenced, without another publish attempt. Unanswered settlement ends outcome_unknown, never cut_stalled.

TestManualCutForeignHeadFenceTerminatesSettlement proves authoritative fencing ends the worker and releases capture without foreign-read sequence renewal. TestManualCutInheritedPublicationCannotReplaceItsOwnBarrier proves the completed inherited step precedes the new barrier and cannot replace its result. TestManualCutPendingProposalsHaveDistinctInvocationTags distinguishes inherited and newly uncertain proposals. Landed/unapplied lost-answer, silence and CLI terminal-unknown controls remain in place. The registered worker follows control and layer cancellation and joins before close. Native/race qualification is owed.

Earlier r6 handle projection

The model covers completed own-object steps, per-call deadlines, inactivity windows, immediate capture-busy refusal, and one admission POST followed by read-only polling. The running cut belongs to the control lifetime. A holder restart loses its in-memory identity without claiming that publication failed.

A manual handle survives from admission until its terminal answer has aged its own Wc. Sending the answer never removes it; a later cut never overwrites it. Four manual handles per volume bound the implementation. Capacity refusal is immediate cut_busy with reason handles_full, with no eviction. Scheduled cuts have no polling handles. The capacity number is a projection bound; retention and lost-answer behavior are modeled by Retire and ReplyLost.

recorded-r6 preserves the supplied 30/30 exhaustive results, no bound verdict. Safe configurations explored 18,019, 43,899 and 30,139 states. All 18 mutants violated their intended invariants; all nine witnesses were reached. These are supplied results, not a new implementation-side model run. Only provenance comments and host labels were edited for publication.

Projection: manual_cut.go implements Admit, InProgress, Poll, Retire and terminal observation; the control root cancels and joins admitted workers. chunk_manual_cut.go provides immediate capture admission and Busy identity. cut_progress_window.go counts completed own-object steps without renewing on reads. TestManualCutHandlesKeepLostTerminalRepliesUntilTheirOwnWindow, TestManualCutHTTPReturnsHandleAndCloseJoinsWorker, TestManualCutBusyNamesTheRunningCaptureWithoutQueueing and TestManualCutObserverCancellationDoesNotCancelAdmittedWork cover retention, restart, cancellation and admission. Native/race and real CLI qualification remain owed; the PR remains Draft.

Every manual POST enters the handle path; the observe opt-in and synchronous compatibility branch are removed. The CLI only polls after 202 and accepts a v1.0 holder's terminal answer directly. Upload and successful own-object verification completions share the same sequence/window update; timeoutMs supplies the observed cut's own window.

Server boundary witnesses: TestManualCutBusyNamesTheRunningCaptureWithoutQueueing uses the real provider; TestManualCutHTTPRetentionUsesUncappedClientWindow keeps an HTTP handle through a ten-minute window plus slack (a five-minute-retention mutant fails); TestManualCutServerCloseCancelsCaptureBeforeJoiningSnapshot closes the actual server while a real snapshot waits behind the observed cut. Both workers join after the shared operation root is canceled.

TestManualCutRealAdmissionCloseRaceJoinsBothSidesOfReservation gates the real provider before and after capture reservation, closes the server while admission is registered, and proves the reservation can be acquired again after joining. TestManualCutRealPostGetReportsPromptOwnProgress exercises production POST/GET with real uploads, same-id nondecreasing sequence, a prompt initial progress answer, and the terminal result.

Default-route controls: TestManualCutDefaultPostUsesHandleAndPromptProgress proves a field-free POST allocates a handle and returns progress. TestManualCutExplicitDeadlineCancelsTheHandleWorker proves only the selected absolute deadline ends its owned work. TestCutCLILegacyTerminalAnswerNeedsNoPolling proves a terminal answer completes without polling or an opt-in field.

Every cut response carries integer apiVersion: 1, including POST progress/terminal/refusal and GET status/unknown-ID answers. Requests accept no version field: there is no negotiation handshake. Compatibility is one direction: a newer CLI supports holders at its own response version N and N-1 (today 1 and 0); an older CLI refuses a newer holder. A valid unversioned synchronous 200 from an initial POST remains the v1.0 fallback; all other missing, malformed or unsupported versions return unsupported_api_version, naming the server and CLI versions, without another POST. This is a local protocol refusal and does not establish the cut outcome. An unsupported response always exits 3 (unknown), still typed unsupported_api_version: HTTP status cannot prove non-admission. Only a supported, explicit admission refusal can establish failure; no protocol-error path posts again. TestManualCutAPIVersionCoversEveryCutAnswer, TestCutCLINewerClientAcceptsOwnAndOneOlderHolder, TestCutCLIOlderClientRefusesNewerHolder, TestCutCLIUnsupportedVersionNeverStartsAnotherCut and the legacy-terminal control cover the boundary. CutTime remains r8c; no persisted format or lifecycle change.

TestManualCutInheritedSettlementRenewsBeforeOwnWorkExceedsTheWindow covers both initial inherited recovery and its retry path: recovery and the own upload each take 600 ms with W=1 s, while their sum exceeds W. The own barrier sees sequence 1, then the upload completes with a live window. Removing inherited progress credit fails both cases; the production worker is restored afterward.

CLI output controls use valid terminal answers (volume, cut position and HEAD generation). A body at the response limit is relayed whole; an over-limit or unreceived admission answer remains unknown, since publication may have occurred. Typed terminal refusals and stdout write failures also report their causes on stderr. The five TestOpsChunk_* output/request controls retain these proofs under the polling protocol; no transport failure starts another cut.