Resume and safely clean recorded rehearsals
This commit is contained in:
@@ -49,3 +49,20 @@ keeps matching pipeline numbers, workflow and step observations, the job result,
|
||||
and partial outcomes in the selected attempt record. A timeout or cancellation
|
||||
leaves those observations available for explicit recovery; it does not cancel
|
||||
the independent CI job or establish that cleanup is safe.
|
||||
|
||||
## Cleanup and recovery
|
||||
|
||||
Recovery selects one explicit record and uses its captured destinations with
|
||||
current explicitly supplied credentials. A started or uncertain dispatch is
|
||||
eligible for cleanup only after every matching observed pipeline and relevant
|
||||
job is terminal and the CI search is checked again. Missing, active, or
|
||||
unavailable CI evidence leaves cleanup pending. Cleanup verifies the recorded
|
||||
tag object and page identity, then removes the page and its assets, the remote
|
||||
tag, and the matching local tag. It records intent before each deletion and
|
||||
reobserves ambiguous outcomes. A canceled observation does not cancel CI;
|
||||
cleanup uses an independent bounded context.
|
||||
|
||||
A completed result describes the recorded resources and the CI runs observed
|
||||
at cleanup time. Later operator-initiated reruns, CI history, notifications, and
|
||||
webhook effects are outside that result. Records remain available for operator
|
||||
retention.
|
||||
|
||||
@@ -656,6 +656,16 @@ cancellation. Use controlled clocks/waits at the external boundary where useful.
|
||||
|
||||
## Stage 13: Implement cleanup, resume, and uncertain-state recovery
|
||||
|
||||
**Completed:** Explicit resume and cleanup use recorded destinations and
|
||||
credentials supplied by the caller. Cleanup rechecks matching CI runs, verifies
|
||||
the diagnostic marker, page and tag identities, records each deletion intent,
|
||||
and reconciles ambiguous acknowledgments. It uses a bounded context independent
|
||||
of canceled observation and preserves conflicts and incomplete attempts.
|
||||
Credential recovery reads the captured profile or explicit file overrides.
|
||||
Local Git/HTTP tests cover active and missing pipelines, foreign resources,
|
||||
lost deletes, interruption, and repeated cleanup. The offline `go test ./...`
|
||||
suite, focused race tests, and API/dependency check pass.
|
||||
|
||||
**Work:** complete rehearsal lifecycle coordination and public recovery calls.
|
||||
|
||||
1. Expose `ResumeRehearsal` and `CleanupRehearsal`, each accepting an explicit
|
||||
|
||||
Reference in New Issue
Block a user