Expand description
The pull engine (Phase 22, DPLN-06): a live tree to a declared tree that renders back to the live effective view.
Pure: it takes an ObservedFiles the transport already read and returns
a SourceTree; it touches no filesystem, network or clock. The action
(actions::deploy::deploy_pull) reads the host through a
TreeReader and writes the result.
§Layering (D-12)
Files of the core collection go to the base tree (resources/,
tags/); files of the target’s mode collection go to the
modes/<env>/ overlay, so render’s overlay reproduces the gateway’s
own layering. A unit in both collections lands in both. Bytes are kept
exactly as read, a bootstrapped resource keeps the gateway’s uuid (D-12).
§The render fixpoint (D-09)
A pulled tree is only worth writing if it is one the declared pipeline
accepts and reproduces. pull therefore renders its own tree and
repeats, dropping units, until a round drops nothing (at most
PULL_MAX_ROUNDS rounds):
- a unit holding a secret location (Embedded or plaintext) is dropped with
reason
REASON_EMBEDDED_SECRET; - a unit any other render finding names is dropped with
render_refused: <finding message>; the messages name paths and key names, never values; - once render succeeds, a unit whose rendered files are not exactly its
effective live files (mode copy when present, else
core; same file set, same bytes) is dropped withREASON_NOT_ROUND_TRIPPABLE: a minted uuid, a dropped.gitkeep, acorefile the mode copy lacks.
A render error whose findings map to no unit (for example one naming
manifest.yaml) is returned as is: the manifest is the operator’s to fix.
Because every kept unit renders byte-for-byte to its live copy, pull
then render then plan is empty, and every dropped unit is unmanaged
in the plan (the live copy exists, nothing renders it).
§Skip reasons (22-03 checkpoint, option-a)
embedded_secret, not_round_trippable, render_refused: <finding>,
type_without_rule, denied_type. No reason ever carries a value.
Structs§
- Pull
Input - What
pullneeds. - Pull
Outcome - What
pullproduced. - Skipped
- One live unit (or type) pull did not write, and why.
Constants§
- PULL_
MAX_ ROUNDS - The most render rounds
pullruns before it gives up. - REASON_
DENIED_ TYPE - Skip reason: a live type on the deny list.
- REASON_
EMBEDDED_ SECRET - Skip reason: the unit holds an Embedded or plaintext secret location.
- REASON_
NOT_ ROUND_ TRIPPABLE - Skip reason: render does not reproduce the unit’s live files.
- REASON_
RENDER_ REFUSED - Skip reason prefix: render refused the unit; the finding follows.
- REASON_
TYPE_ WITHOUT_ RULE - Skip reason: a live type with no render rule.
Functions§
- generate_
manifest - The
manifest.yamltext for a gateway that has none (D-10), and the live types it leaves out. - pull
- Run the pull: assemble, render to a fixpoint, keep what round-trips.