Capture diagnostic identities and rehearsal records

This commit is contained in:
2026-12-05 22:45:28 +00:00
parent 6f01e9ef0a
commit 181e5a030c
19 changed files with 1284 additions and 60 deletions

View File

@@ -2,7 +2,8 @@
## Status
Draft for review.
Accepted. The implementation plan adopts this lifecycle for explicitly
temporary diagnostic resources; production release immutability is unchanged.
## Date

View File

@@ -182,6 +182,15 @@ absolute files whose readability `validate` checks. These are explicit local
inputs, not inferred SSH authentication requirements; see the
[readiness guide](consumers/readiness.md).
A `rehearsal` object can select a dispatch `selector` (default `root`) and a
`woodpecker` object with `base_url`, numeric `repository_id`, exact `workflow`
and `step` names, and a local `token_file`. These settings are required only
for rehearsal operations. Relative token paths resolve from the checkout root;
the file is read separately from the forge credential and its token is never
stored in the attempt record. See the
[rehearsal record format](integrations/rehearsal-records.md) for captured
identity and recovery evidence.
The `delivery` object contains `forge`, `base_url`, `owner`, `repository`, and
context-specific `credentials`. A delivery request must set `forge` to
`"gitea"`; a missing or unsupported selection is an error for delivery. These

View File

@@ -0,0 +1,32 @@
# Rehearsal identity and records
A diagnostic annotated tag carries the exact source and profile identity for a
single rehearsal. Its message begins with `ReleaseKit rehearsal v1`, followed
by a newline and one compact JSON object. `schema_version: 1` identifies the
manifest. Its fields include the attempt ID, selector, captured commit, profile
path and SHA-256, source directory, Go capability and optional module path,
publication and version selection, diagnostic version, and full tag. A
16-byte random attempt ID is represented by 32 lowercase hexadecimal digits;
the tag and injected version include the same ID.
The manifest is verified against the actual annotated tag target, the event
commit, the selected dispatch row, the exact committed profile bytes, and the
normalized selection decoded from those bytes. The tag namespace alone is not
proof of ownership or permission to delete anything. A profile is read from the
captured commit rather than the current working tree.
Private attempt records use `format_version: 1` and retain the manifest, Git
endpoint and remote, forge and Woodpecker destinations, planned page evidence,
tag object, observed resource IDs, timestamps, and outcomes. They do not store
resolved forge or Woodpecker tokens. Endpoints and paths may themselves contain
sensitive information, so treat records as private. By default they are stored
under the Git common directory in `releasekit/rehearsals/<attempt-id>.json`.
An explicit record-directory override follows the same worktree ignore rules as
publication records. The initial record is created exclusively; updates use a
private temporary file and rename. Records remain available for explicit
recovery and operator retention.
Manifest and record strings that contain non-UTF-8 bytes are omitted in their
lossy JSON form and represented by standard base64 values in `identity_bytes`.
A recognized override supplies the exact bytes on decoding; unknown override
names are ignored. Supported versions tolerate additive unknown fields.

View File

@@ -52,6 +52,8 @@ reports these implemented packages:
| `internal/process` | Cancellable child-process execution, including owned stdin/stdout pipes for serialized exchanges, with per-command environment overlays and removals. |
| `internal/preparation` | Coordination for expected-commit tag checkout and Go module dependency preparation. |
| `internal/readiness` | Working-input inspection and read-only setup observations for explicitly selected capabilities. |
| `internal/recordstore` | Shared private-record location and worktree safety checks. |
| `internal/rehearsal` | Diagnostic tag manifests and private attempt evidence for rehearsal recovery. |
| `internal/releaseidentity` | Committed-object and working-tree module selection, declaration reading, and semantic-version-to-tag derivation. |
| `internal/validation` | Shared Go validation with optional race, full-vet, and static package-compilation target selections, formatting, workspace-file and filesystem-replacement checks, per-blob size limits, and selected Markdown destination and fragment checking; `internal/candidate` retains capture, callback sequencing, and local-state rechecks. |
| `internal/publish` | Publication guards, one validation run, annotated tag creation, push, pre-push evidence recording, saved-attempt discovery, later observation, and recovery state. |

View File

@@ -442,6 +442,14 @@ guidance, and offline coverage are complete, then continue to Stage 9.
## Stage 9: Define rehearsal identity transport and durable attempts
**Completed:** Committed profile capture, diagnostic tag manifests and
verification, separate local Woodpecker credentials, and owner-private attempt
records now preserve exact identity and recovery evidence. Temporary diagnostic
resources are adopted in ADR 0008. The coordinator and CI dispatch that consume
these foundations follow in the later stages. Targeted Git and record tests,
the rehearsal race test, the offline `go test ./...` suite, and the compiled
API/dependency check pass.
**Work:** add internal rehearsal contracts/storage and diagnostic tag support.
1. Adopt `rehearsal.selector`, default `root`, and