Skip to main content

Module claim

Module claim 

Source
Expand description

vitrify claim|renew|release — atomic lease transactions. Each operation is one mainline commit (front-matter edit, journal event, ledger regen) built in the ephemeral tx worktree .vitrify/tx-<pid> and published atomically by the C-002 CAS/push discipline. Never force.

Structs§

BatchClaim
One unit to claim in a claim_many transaction.
ClaimOutcome
A published transaction’s outcome (the success JSON’s fields).
Pinned
What a caller that runs many transactions decides once and holds every one of them to — vitrify run does: how commits are published (a run that began by pushing must never fall back to moving the local branch because one fetch failed: that would put a claim on a mainline nobody else sees), and which SDD, by its path under the repository root.

Functions§

behind_note
What catch_up_primary would have to do, without doing it.
catch_up_primary
A primary checkout that an earlier commit left behind: try again now. Returns the warning when it still cannot follow. Like every move of the checkout, this is one mainline writer’s turn (tx_lock).
claim_many
Claim several units — of one SDD or of several — in one mainline transaction: one commit, one compare-and-swap or push. Each unit’s preconditions are checked at the transaction’s base, as a claim of its own would check them; a unit that is no longer claimable there is left out (its result says why), the rest are claimed together. Each claimed unit gets its own front-matter edits, its own fencing token and its own claim journal event, exactly as a claim of its own would. A lost race resyncs and tries again with what is still claimable. Results are index-aligned with claims; Err only for a failure that is no unit’s.
execute
Execute the transaction without printing.
execute_pinned
execute for the orchestrator: publish mode and SDD as pinned says, whatever args.sdd and the state of the remote suggest.
quiet_resync
Report the primary checkout’s fast-forwards only when they stop working.
resync_primary
After a commit moved mainline from old to new: the primary checkout follows ([follow]). Never fatal — the commit is already published.
run
tx_lock
Hold this across the build-and-publish of one mainline commit. Not re-entrant: execute takes it itself.