Share sibling temporary file creation for downloads

This commit is contained in:
2026-12-02 21:33:02 +00:00
parent 93876ff2cf
commit a623ecb518
8 changed files with 116 additions and 100 deletions

View File

@@ -9,9 +9,9 @@ and destination-directory policy.
Ordinary workspace replacement uses standard operating-system path semantics.
Callers with a root-scoped safety contract own that validation at their boundary.
Remote object acquisition is owned by its domain caller. The caller writes a
sibling temporary file, validates the complete result, and passes that file to
`InstallSiblingTempFile` only when it is ready to become canonical. Callers own
Remote object acquisition is owned by its domain caller. `WriteSiblingTemp` writes and closes a sibling temporary file, returning
ownership to the caller. The caller validates the complete result and passes it
to `InstallSiblingTempFile` only when it is ready to become canonical. Callers own
remote object selection, validation, conflict handling, and temporary-file
cleanup.

View File

@@ -41,10 +41,10 @@ their scope. Unless assigned otherwise, a finding remains independent audit
remediation. Shared code does not make a refactoring a prerequisite or assign
the whole finding to a roadmap.
Thirty-one entries are closed by the safety, transfer, audio discovery, S3
Thirty-two entries are closed by the safety, transfer, audio discovery, S3
planning, prerequisite-history, publication-import, CLI classification,
inspection aggregation, test maintenance, dead-code removal, and associated
documentation work; 12 remain open. **Planned** identifies
documentation work; 11 remain open. **Planned** identifies
an agreed remedy awaiting implementation. **Potentially eliminated** requires verification that the offending
lifecycle is removed. **Coordinate** identifies shared changes, not a commitment
that a related feature implements the entire finding. Findings close only after their
@@ -637,7 +637,10 @@ Related: [CAT-02](#cat-02--p2-make-restored-carried-products-agree-with-manifest
### CAT-21 — P3: Share closed sibling-temporary-file creation mechanics
Status: Open
Status: Closed
**Closure.** Download callers share closed sibling temporary-file creation;
fileops and consumer tests cover failure cleanup, validation, and retry.
**Disposition / owner.** Coordinate — [restore](../../internal/command-restore.md#installation-and-local-baseline)
retains staging and validation before installation. Reassess the common mechanics

View File

@@ -397,7 +397,7 @@ Validation: `go test ./internal/artifacts ./internal/stage ./internal/app`.
## Stage 13: Share Closed Sibling-Temporary-File Creation
CAT IDs: CAT-21. Status: Pending.
CAT IDs: CAT-21. Status: Complete.
Read [EQ-02](audit/10-equivalence.md#eq-02--p3-verified-downloads-duplicate-sibling-temporary-file-ownership).
Inspect `audio/s3_audio.go`, `stage/prepare_previous.go`, and