Preserve page creation outcomes through recovery

This commit is contained in:
2026-10-06 00:53:33 +00:00
parent a1ee067b53
commit 91712fd900
6 changed files with 116 additions and 16 deletions

View File

@@ -24,11 +24,13 @@ conflicting page.
If the page is absent, the client posts to `/api/v1/repos/{owner}/{repo}/releases`
with the selected tag and commit, the release note's H1 as title, the complete
note as body, and draft and prerelease disabled. A create conflict, interrupted
response, or malformed create response triggers one lookup. An exact page found
response, or malformed create response (including inconsistent decoded fields)
triggers one lookup. An exact page found
there confirms the existing content; a differing page is a conflict. If that
lookup cannot determine the result after a possibly successful write, the
client returns an unknown outcome. Other HTTP failures retain their structured
failure kind and status code.
failure kind and status code. A recovered create retains its write history;
a later asset-inspection failure reports partial page progress.
For a binary-producing release, the client can build a deterministic
`SHA256SUMS` file from the declared artifact names and SHA-256 digests. Entries

View File

@@ -96,6 +96,8 @@ cleanup. The offline suite and public boundary checks pass.
### R2 — High: Some successful page writes are reported as not attempted
Status: Resolved.
Category: Failure handling and recovery-state correctness.
**Evidence:** [EnsureRelease](../../internal/gitea/release.go), at the
@@ -121,6 +123,12 @@ unknown. Retain the selected bounded reconciliation and immutable-content rules.
its matching and conflicting follow-up lookups, and a recovered create followed
by asset-inspection failure. Assert both request counts and returned state.
**Resolution:** Semantic create-response failures now use one reconciliation
lookup. Recovered page results retain create-request history, preserving partial
progress on later asset-inspection failure. Local HTTP tests cover matching,
conflicting, and unavailable lookups; a CLI fixture verifies recovered creation
followed by failed asset inspection. Both affected suites pass.
### R3 — Medium: Read-only asset failures are classified as unknown writes
Category: Divergence from the selected outcome contract.