Finish publication recovery workflow
This commit is contained in:
@@ -124,48 +124,65 @@ the complete checked-in release note. Report its result separately from the
|
||||
completed source release. For failed or uncertain delivery, follow the recovery
|
||||
instructions below using the same immutable version.
|
||||
|
||||
## Resolve failures
|
||||
## Resolve publication failures
|
||||
|
||||
A failed push triggers a URL-resolution check against the captured endpoint,
|
||||
then at most one exact authoritative tag query. If the endpoint no longer
|
||||
resolves to itself, recovery reports `unknown` without querying the rewritten
|
||||
destination. An exact tag-object match confirms publication even when Git
|
||||
reported an error. A proven absent tag is `not_published`; a different object
|
||||
is a conflict; an unreadable query is `unknown`. The command retains its local
|
||||
tag and reports the state, phase,
|
||||
candidate commit, tag object, and captured publication endpoint when available.
|
||||
Do not retry an unknown result until you resolve the authoritative ref at that
|
||||
exact endpoint. Copy the reported endpoint value into the variable below using
|
||||
normal shell quoting; retain the version and tag object from the same result.
|
||||
The command checks that Git URL rewriting still resolves this value to itself;
|
||||
the manual check below applies the same rule before querying:
|
||||
Each publication invocation attempts to save its captured identity before the
|
||||
tag push. The CLI reports the saved record path separately from publication
|
||||
success or failure and, after a push or immediate-reconciliation error, prints a
|
||||
copyable command that selects that exact record. Run that command to make a
|
||||
separate later observation:
|
||||
|
||||
```sh
|
||||
releasekit_endpoint='COPY_CAPTURED_ENDPOINT'
|
||||
releasekit_version='vX.Y.Z'
|
||||
test "$(git ls-remote --get-url -- "$releasekit_endpoint")" = "$releasekit_endpoint" &&
|
||||
git ls-remote --refs -- "$releasekit_endpoint" "refs/tags/$releasekit_version"
|
||||
'/path/to/releasekit' reconcile --record '/absolute/path/to/attempt-record.json'
|
||||
```
|
||||
|
||||
A failed URL-equality check or remote query leaves the outcome unresolved.
|
||||
Correct transport configuration before continuing. The reported endpoint may
|
||||
be different from `origin`'s fetch URL or its current push URL; querying either
|
||||
of those does not establish absence at the captured endpoint.
|
||||
The saved evidence fixes the original endpoint and tag identity. Later recovery
|
||||
uses current supported transport settings for the recorded remote name, but it
|
||||
does not substitute the current remote URL, inspect the local tag or current
|
||||
HEAD, load a profile, rerun checks, or change repository state. A completed
|
||||
observation reports `published`, `not_published`, or `conflict`; an incomplete
|
||||
observation reports `unknown` with diagnostic context. Resolve an unknown result
|
||||
by correcting the identified endpoint rewrite, transport configuration, or
|
||||
missing evidence. For incomplete saved identity, select another record with the
|
||||
required fields or use complete typed evidence through the Go API.
|
||||
|
||||
Compare the returned object ID with the tag object reported by the command.
|
||||
An exact match confirms publication. If the ref is absent, the version was not
|
||||
published; only then may you deliberately remove the unpublished local tag
|
||||
with `git tag -d vX.Y.Z` before correcting the candidate or retrying. Do not
|
||||
move, overwrite, or delete a tag that exists remotely. If a different object
|
||||
uses the version, choose a new version after resolving the conflict.
|
||||
If command output was lost, list local attempts and explicitly select the
|
||||
matching record by its module, full tag, and saved identity:
|
||||
|
||||
If local tag inspection fails after creation, the reported ref may remain even
|
||||
when no tag object ID was obtained. Inspect that ref before recovery.
|
||||
```sh
|
||||
releasekit publication-attempts --repo "$PWD"
|
||||
releasekit reconcile --record '/absolute/path/from-the-list/attempt-record.json'
|
||||
```
|
||||
|
||||
Discovery only reads the local store. It neither queries remotes nor chooses an
|
||||
attempt automatically. Use a supported ReleaseKit CLI if the executable named
|
||||
in the printed handoff command is no longer available. An older record may lack
|
||||
the endpoint, tag-object ID, candidate commit, or another field required for a
|
||||
conclusive result.
|
||||
|
||||
A later observation that the tag is absent describes the remote at that time;
|
||||
it does not prove the version was never published. Never reuse a version known
|
||||
to have been published, and preserve published tags and contents as immutable.
|
||||
Keep removal of an unpublished local tag, candidate correction, and retry as
|
||||
explicit operator decisions after reviewing the record and authoritative
|
||||
remote state. A conflicting object requires resolving the conflict and selecting
|
||||
an unused version when appropriate; do not move, overwrite, or delete a
|
||||
published tag.
|
||||
|
||||
If record storage fails, ReleaseKit reports the recording warning separately;
|
||||
the warning does not change the actual publication outcome. The saved handoff is
|
||||
then unavailable. A Go caller that retained `PublicationResult.Evidence` can
|
||||
still pass that typed evidence directly to `ReconcilePublication`. Process
|
||||
termination before the record is written, removed storage, and older incomplete
|
||||
records can leave no sufficient saved evidence for later recovery.
|
||||
|
||||
Later reconciliation adds no successful-push read-back, polling, CI, consumer
|
||||
installation, or hosted-delivery gate. Hosted page delivery remains separate.
|
||||
|
||||
If validation or a guard fails before this invocation pushes, correct and
|
||||
commit the candidate, publish `main`, and run the command again. A retained
|
||||
local tag still requires the authoritative-state check above before removal;
|
||||
a concurrent publisher may already have published the version. The prepared
|
||||
local tag still requires reviewing the selected record and authoritative state
|
||||
before deciding whether to remove it. The prepared
|
||||
Woodpecker workflow builds the CLI from the tagged checkout, then uses
|
||||
`ci-deliver` for page-only delivery. To activate it after configuring the
|
||||
destination and secret, copy it to `.woodpecker/releasekit-source-delivery.yml`
|
||||
|
||||
Reference in New Issue
Block a user