Skip to main content

Module release_state

Module release_state 

Source
Expand description

Where a landed target’s release stands: the release request, the last release, and the symptoms a stuck release shows.

The judgments are pure and take forge answers as JSON values, so each rule is testable without a forge. The reads spawn the forge CLI the setup verbs resolve, gh api or glab api, and the registry reads spawn curl. A read that fails for any reason other than a definite not-found answers unknown, because a credential this runtime cannot reach is an observation boundary and never a state of the release.

SATISFIES release-state:a-forge-field-reads-unknown-without-credentials

Structs§

ForgeCli
The forge CLI, resolved once.
LastRelease
The newest release and whether it reached its consumers.
Merged
The newest merged release request, and what followed it.
Page
What a release page carries.
Pair
What the landed pair releases through, from the record.
Request
The open release request, as the forge reports it.
Run
Whether a run or a pipeline finished, and how.
Symptom
One symptom a release shows, with the recovery section that owns it.

Enums§

Answer
One answer a forge or a registry gives: a field the runtime could not read is unknown, and a field the landing makes meaningless is not-applicable.
Api
One read-only forge API answer.
Checks
Where a request’s checks stand.
Registry
A registry with a public read-back.

Constants§

ARTIFACT_WITHOUT_ATTESTATION
The code for an artifact no attestation covers.
LOCAL_TAG_DIFFERS
The code for a release tag the clone holds at another commit than the forge.
LOCAL_TAG_NOT_ON_FORGE
The code for a release tag the clone holds and the forge does not.
MERGED_NOTHING_PUBLISHED
The code for a merged release request that published nothing.
PUBLISHED_NO_ARTIFACTS
The code for a published version whose release page has no artifact.
TAG_WITHOUT_RELEASE
The code for a release tag with no complete release page.

Functions§

github_checks
Where a list of GitHub check runs stands.
github_run_on
The run of workflow on commit sha, selected by the commit and the push event, never by recency: a workflow that also reports on requests makes the newest run the wrong one.
gitlab_checks
Where a GitLab pipeline status stands.
gitlab_pipeline_on
The pipeline on commit sha that ran on reference.
gitlab_project
The GitLab project id a path names, URL-encoded once.
is_version
Whether text reads as <major>.<minor>.<patch>, with an optional pre-release suffix.
local_tag_drift
SATISFIES release-state:a-symptom-names-its-recovery
newest_release
The newest release among tags: a v<major>.<minor>.<patch> tag with no pre-release suffix, by version precedence.
orphan_tags
SATISFIES release-state:a-symptom-names-its-recovery
package_name
The package name the registry knows, read from the target’s own version file: [package].name in Cargo.toml, [project].name in pyproject.toml.
proposed_version
The version a release request’s title proposes: its last whitespace-separated token that reads as a version, with any leading v dropped.
registry_for
The registry a release publishes to, from its driver and its answer.
registry_serves
Whether the registry serves package, at version where one is named: a 200 answers yes, a 404 answers no, and anything else is unknown.
symptoms
Every symptom the observed state shows. Pure: the reads gather the facts, and this rule alone decides what they mean.