Skip to main content

Module projection

Module projection 

Source
Expand description

The one pure target-specific projection over this binary’s embedded sources.

Projection::compute takes a ProjectionInput, values alone, and answers the complete candidate artifact tree this installed binary would land in one target: every destination with its ownership Kind, its Placement, the complete proposed bytes, the rendered region where the destination is a marked region, and the embedded source paths it was rendered from. Staging and production landing share it byte for byte, so what an agent studies in a stage is what a landing writes.

This module reads snippets and blocks through src/embedded.rs directly and reads nothing else: no target file, no environment, no Git state, no clock, no registry, no network. Whatever a projection needs from the target arrives as TargetEvidence, gathered before construction by evidence::gather, which lives in its own file so a source scan can hold this one to the pure boundary.

Every pure piece of the landing model has one implementation here: the kind table, the token substitution, the block templating, the splice and marker judgments, and the Nix crate-shape judgment. Which embedded source belongs to which capability, and whether a capability is available at the target’s dimensions, is the catalog’s answer in crate::profile::catalog, and this module renders what the catalog selects. src/landing.rs re-exports the pieces under their old names.

One input type, one compute function, one candidate shape: staging and every landing verb consume this one projection.

Re-exports§

pub use crate::landing::manifest::Provider;

Modules§

evidence
Gathering the target evidence a projection consumes.

Structs§

Candidate
One proposed destination.
Collision
One block destination the target’s document cannot take.
CrateShape
The structural facts of the target’s crate that the seeded Nix package expression and the seed flake’s smoke check rely on.
Omission
One destination withheld from this target, with why.
Projection
The complete candidate artifact tree for one target.
ProjectionInput
The complete input to one projection: the resolved landing parameters and the typed evidence read from the target beforehand.
TargetEvidence
What a projection needs to know about the target, gathered before the projection runs and carried as values.
TrunkGuards
The two authored guard entries the integration mode selects between, beside the mode itself.

Enums§

Kind
Who owns a landed file’s bytes after landing.
Placement
How a candidate occupies its destination.

Constants§

AGENTS_BLOCK
The authored routing-block template.
AGENTS_DESTINATION
The destination the routing block splices into.
AGENTS_LINE_BRANCHES
The routing block’s mode line, branches form.
AGENTS_LINE_INTEGRATION_FORGE
The routing block’s integration line, forge form.
AGENTS_LINE_INTEGRATION_LOCAL
The routing block’s integration line, local form.
AGENTS_LINE_WORKTREE
The routing block’s mode line, worktree form.
BLOCK_BEGIN
The block’s opening marker.
BLOCK_DESTINATIONS
Every block destination, in the order a landing writes them.
BLOCK_END
The block’s closing marker.
BRANCH_GRAMMAR
The one branch grammar.
BRANCH_SHAPE_TOKEN
The head-branch shape the release driver gives its own request.
CODE_SCANNING_DESTINATIONS
Every destination the opt-in code scanning capability can land, against the provider that lands it.
CODE_SCANNING_TECHS
The bindings that ship a code scanning workflow.
GITLAB_ROOT_PIPELINE
The GitLab root pipeline, the one destination a release-less landing withholds where the target owns it.
GITLAB_TITLE_FRAGMENT
The GitLab title fragment the root pipeline includes.
GLOSSARY_BLOCK
The authored glossary template.
GLOSSARY_DESTINATION
The destination the glossary block splices into.
HOOKS_BEGIN
The hook block’s opening marker, a YAML comment at column zero.
HOOKS_DESTINATION
The destination the hook block splices into.
HOOKS_END
The hook block’s closing marker.
HOOK_TYPES_LINE
The top-level key the fresh hook file carries and the skills verify on an existing one: the commit-msg and pre-push hooks run only where their hook types are installed.
LINE_PREFIX_RE_TOKEN
The same prefix, escaped for a slash-delimited regular expression.
LINE_PREFIX_TOKEN
The release-line branch prefix, naming the lines a release trigger accepts beside the trunk.
NIX_DESTINATIONS
The destinations of the opt-in Nix capability, present in a projection only where the landing’s nix parameter is on.
NIX_WITHHOLDABLE
The subset a target with a flake of its own keeps out: the seed pair, whose files would sit beside a flake release-kit did not author.
OWNER_TOKEN
The mechanical substitution sites in rendered files.
PRE_COMMIT_BLOCK
The authored hook-block template.
PRE_COMMIT_INTEGRATE_NOTE
The header note naming the pre-integrate contract.
PRE_COMMIT_SWEEP_NONE
The header note for the pairing whose sweep skips nothing.
PRE_COMMIT_SWEEP_SKIP
The header note naming what a CI sweep skips.
PRE_COMMIT_TRUNK_COMMIT_GUARD
The forge integration mode’s guard against a trunk commit.
PRE_COMMIT_TRUNK_PUSH_GUARD
The forge integration mode’s guard against a trunk push.
PRE_COMMIT_WORKTREE_GUARD
The worktree mode’s guard entry.
PUSH_GUARD_TOKEN
The token a release workflow’s job condition carries, so that a rendering which adds a second trigger cannot let the new event enter a job written for a push.
RELEASE_GATE_JOB
The gate’s own job, added to a release workflow.
RELEASE_GATE_TRIGGER
The gate’s trigger block, added to a release workflow’s on key.
REPO_PLACEHOLDER
The repository a preview stands in for where nothing answered.
REPO_TOKEN
The full recorded project path, including nested namespaces.
REQUEST_JOB_TOKEN
The id of the job that opens and refreshes the release request.
REQUIRED_CHECK_TOKEN
The check the release gate judges.
REQUIRED_WORKFLOW_TOKEN
The workflow whose completion wakes the release gate.
SCOPE_SHAPE
The one commit scope shape.
SCOPE_SHAPE_TOKEN
The one scope shape: the title checks’ regular expression.
SCORECARD_DESTINATIONS
The destinations of the opt-in Scorecard capability, present in a projection only where the landing’s scorecard parameter is on.
SECURITY_SPANS
The three replaceable spans of a landed security policy, each as its ordered begin and end marker.
STYLE_TOKEN
The recorded release style: trunk arms the bot’s request in the landed release workflow, lines leaves every request unarmed.
TRUNK_BRANCH_TOKEN
The one permanent branch. A landed release trigger, ref guard, and branch guard each name it, so a target whose trunk is not master needs its own answer in its own bytes.

Functions§

authored
An authored block without the one final newline the repository’s hooks enforce on every file under blocks/; a test in src/embedded.rs holds each file to exactly one.
block_markers
The markers of a block destination, or None for a whole-file one.
code_scanning_incompatibility
Why the named code scanning provider cannot run at this (technology, forge), or None where it can or none is named.
code_scanning_licence_refusal
Why the code scanning capability’s licence condition refuses this target, or None where no condition applies or the licence satisfies it.
compose_glossary
The glossary block from its authored template: markers included and without a trailing newline. It carries no token and no mode, so the same bytes land in every target.
compose_hooks
The hook block from its authored template, for one pairing of the two Git workflow axes.
compose_routing
The routing block from its authored template and the mode’s one orientation line.
destinations
Every destination the embedded sources can land, in declaration order.
embedded_block
One authored block this binary embeds, as text, by its embedded path.
extract_block
The marked block inside a document, markers included, or None where the text carries no complete block.
flake_pair_withheld
Why the flake half of the Nix capability stays out of this landing, or None where the pair lands whole.
glossary_block
The glossary block from this binary’s embedded template.
hooks_block
The hook block for one checkout mode, from this binary’s embedded templates.
hooks_marker_defect
marker_defect for the hook file, the destination whose entries execute.
integration_line
The routing block’s integration line for one integration mode.
kind_of
The declared kind of a destination, or None for a file the sources does not classify.
licence_states_an_open_source_codebase
Whether one SPDX expression is well formed and states an open-source codebase.
marker_defect
The one definition of an ill-formed block document, shared by every splice and every reader that judges one: None for a whole-file destination or a well-formed document.
nix_unsupported_shape
Why the whole Nix capability stays out of a landing, or None where the target’s crate shape supports the seed.
nix_withholding
The Nix destinations an opted-in landing withholds at this target, with the one reason, or None where the capability lands whole or nix is off.
release_driver_shape
What a release driver’s own release request is shaped like, and which job maintains it, where this release drives that driver on GitHub.
release_gate_spans
The three replaceable spans of a release workflow under the rendering that gates its request, each as its ordered begin and end marker.
render
Substitute the landing parameters into a rendered file’s bytes.
routing_block
The routing block for one checkout mode, from this binary’s embedded templates.
routing_line
The routing block’s mode line for one checkout mode.
scope_is_shaped
Whether one scope matches SCOPE_SHAPE.
splice_hooks_block
The whole .pre-commit-config.yaml content after splicing the rendered hook block.
splice_marked_block
The whole document’s bytes after splicing a marked block into it.
substitute
Every token occurrence replaced with value.
supported_pairs
Every (driver, forge) pair at which the release automation is available, in path order.