Expand description
The candidate stage: this binary’s projection for one target, materialized on disk beside the knowledge that explains it.
A stage is evidence, never an installation transaction. rk stage
gathers the target’s evidence, computes the one pure Projection,
and writes the complete proposed bytes of every candidate under
artifacts/, the installed binary’s changelog, guidance, method,
bindings, runbooks, forge notes, setup skill, and the shared resources
that skill routes to under reference/, and one explanatory receipt,
stage.json. It writes nothing inside the target. Production landing
reads no byte of it, and only rk stage clean removes it.
The stage is built whole under a fresh sibling of its resolved path and renamed into place after the receipt, so a stage that is visible is complete. The default root below the private state directory and the receipt are created owner-only.
Modules§
- clean
rk stage clean: remove one stage that names itself, and nothing else.
Structs§
- Candidate
Entry - One candidate under
artifacts/. - Capability
Note - One capability’s answer, as the receipt carries it.
- Composed
- A stage composed and ready to write: every file with its stage-relative path, and the receipt.
- Note
- One destination named with a reason.
- Parameters
- The resolved landing parameters, stated whole.
- Prepared
- An output path checked and made ready: its parent exists and is canonical, the resolved stage root is known, and nothing nonempty stands there.
- Receipt
- The explanatory receipt a stage carries, and the document
rk stage --jsonreports. Metadata only: no later command reads it as input.
Enums§
- Output
Source - Where the resolved output path came from.
Constants§
- ARTIFACTS_
DIR - The directory below the stage root holding the candidate tree.
- INTERRUPT_
VAR - The interruption proof’s seam: the stage-relative path after which a materialization stops on purpose, as if the write after it had failed.
- OUTPUT_
ROOT_ VAR - The variable naming an alternative base for the default stage path.
- PAUSE_
AFTER_ LAND_ VAR - The proof’s seam after publication.
- PAUSE_
BEFORE_ CLEANUP_ VAR - The proof’s seam for the failure cleanup: a directory where a stopped
write announces
stoppedbefore it quarantines its sibling and waits forproceed. - PAUSE_
BEFORE_ LAND_ VAR - The proof’s seam before publication: a finished write announces
finishedunder this directory before it claims its sibling and waits forproceed. - RECEIPT_
NAME - The receipt’s name at the stage root.
- REFERENCE_
DIR - The directory below the stage root holding the installed knowledge.
- REFERENCE_
ROOTS - Every reference root a stage writes, in the order the receipt lists them.
- SETUP_
SKILL - The skill whose installed text and routed resources the reference tree carries.
- STAGES_
DIR - The directory below the state root that holds the default stages.
- STAGE_
SCHEMA - The shape version of the stage receipt and of the
rk stagereport.
Functions§
- compose
- Compose the stage for
projection, rooted atstage_root, from the projection, the resolved parameters, the target’s record, and this binary’s embedded knowledge. - prepare
- Resolve where the stage will stand, refuse a stage inside the target, refuse an existing nonempty output, create the parent, and name the canonical stage root.
- recorded_
schema_ version - The
schema_versionthe target’s landing record declares, read leniently:Nonewhere no record exists or it does not parse as a JSON object carrying an integer there. Explanatory, never a gate. - reference_
files - Every file the reference tree carries, as
(path, bytes)belowreference/. - resolve_
output - Resolve the output directory:
--outputfirst, then a target and version directory belowRK_STAGE_ROOT, then the same below the private state root. - target_
key - The filesystem-safe key naming one target below a stage base.
- write
- Write the composed stage whole, then rename it into place.
- write_
stopping_ at - [
write], stopped on purpose after the file atstop, as if the write after it had failed: the interruption proof’s seam.