From aa0379294fba8422f7e6469261e4730b1c19bd8e Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Tue, 1 Dec 2026 12:43:10 +0000 Subject: [PATCH] Record publication source lifetime decision --- docs/roadmap/audit/catalog.md | 30 ++++++++++-------- docs/roadmap/audit/discussion.md | 52 +++++++++++++++++--------------- 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/docs/roadmap/audit/catalog.md b/docs/roadmap/audit/catalog.md index 8de1e17..ff3c8a9 100644 --- a/docs/roadmap/audit/catalog.md +++ b/docs/roadmap/audit/catalog.md @@ -46,15 +46,15 @@ that the roadmap implements the entire finding. Findings close only after their relevant behavior or code removal is verified. Original audit reports, finding identities, priorities, and source links remain unchanged. -Directions for CAT-02, CAT-04, and CAT-05 reflect subsequent agreed choices. +Directions for CAT-02, CAT-04, CAT-05, and CAT-09 reflect subsequent agreed choices. Other direction paragraphs retain the audit's candidate remedies; agreed choices and roadmap ownership are identified by the disposition notes. -Audio generation/size handling is [agreed in topic 4](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together), -and subprocess completion is [agreed in topic 5](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files), -with implementation pending. Continue the remaining decisions in -[discussion topics 6–7](discussion.md#6-open-publication-sources-as-they-are-needed): -publication source lifetimes and audio eligibility. +Decisions on [audio generation/size handling](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together), +[subprocess completion](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files), +and [publication source lifetimes](discussion.md#6-open-publication-sources-as-they-are-needed) +are agreed, with implementation pending. Continue with +[topic 7: audio eligibility](discussion.md#7-give-preparation-and-inspection-the-same-audio-selection-rules). Topic 1 also retains the smaller choice about waiting versus reporting a busy workspace. Remote checkpoint timing and failure handling are deferred, not decisions blocking publication import. @@ -275,7 +275,10 @@ Status: Open **Disposition / owner.** Independent publication-resource remediation — coordinate with the [roadmap's snapshot removal](../session-restore.md#decouple-remote-discovery-from-execution-snapshots). Removing one manifest source does not bound the remaining descriptors; -[discussion topic 6](discussion.md#6-open-publication-sources-as-they-are-needed) remains open. +[discussion topic 6](discussion.md#6-open-publication-sources-as-they-are-needed) +selects sequential source opening, verification, upload, and closure, accepting +late-source failure after unselected uploads. Implementation and verification +remain pending. Original findings: [RS-01](05-resources.md#rs-01--p2-publication-retains-one-open-descriptor-per-source). @@ -284,12 +287,13 @@ source, selected output, and committed manifest until its final defer, although uploads are sequential. Valid larger inventories can exhaust lower process descriptor limits before transfer begins. -**Direction.** Separate destination planning from source possession and use -bounded verified opening/transfer lifetimes. Preserve confined regular-file -opening, checksum checks, hashing/uploading through the same descriptor, and -pointer-last publication. Review upfront validation semantics when choosing the -design; raising limits or capping artifact count does not remove the scaling -problem. +**Direction.** Plan identities, destinations, and rules upfront; then open, +verify, upload, and close sources one at a time. Preserve confined regular-file +opening, checksum checks, and hashing/uploading through the same descriptor. +Validating every source before any upload is no longer required. A late invalid +source may leave an unselected attempt, while pointer-last publication preserves +the current selection on failure. No artifact-count cap, source-snapshot system, +or new cleanup subsystem is needed. Related: [CAT-14](#cat-14--p3-close-temporary-committed-manifest-cleanup-gaps). diff --git a/docs/roadmap/audit/discussion.md b/docs/roadmap/audit/discussion.md index 5256f97..6b0fff9 100644 --- a/docs/roadmap/audit/discussion.md +++ b/docs/roadmap/audit/discussion.md @@ -13,8 +13,8 @@ own the detailed evidence. This document records decisions, explains consequence and distinguishes recommendations from approved scope. No remediation has been implemented by this document. -The operator has settled the main direction for topics 1 through 5. Topics 6 -and 7 need discussion. Each open topic ends with a question and space for a +The operator has settled the main direction for topics 1 through 6. Topic 7 +needs discussion. Each open topic ends with a question and space for a response. Implementation details can be settled during planning after the operator-facing behavior is clear. @@ -346,7 +346,7 @@ the escalation timers. CAT-05 remains open pending implementation and verificati ## 6. Open publication sources as they are needed -Status: Open +Status: Decision agreed; implementation pending Finding: [CAT-09](catalog.md#cat-09--p2-bound-publications-simultaneously-open-source-descriptors). @@ -373,36 +373,40 @@ An earlier failure may already leave immutable uploads that were never selected as current. Preserving the old current pointer is the important existing commit boundary; failure does not promise that no remote bytes were uploaded. -### Recommendation +### Agreed direction Keep complete destination planning, then open, verify, upload, and close each -source using a bounded number of handles. Retain confinement and regular-file -checks and use the verified handle for the transfer. Accept that a later invalid -source may be discovered after earlier immutable uploads, while leaving the -previous current publication selected. +source in sequence using a bounded number of handles. Retain confinement, +regular-file and checksum checks, and use the verified handle for hashing and +transfer. Close each source when its transfer and verification finish rather +than retaining all sources until the stage ends. -This relaxes the documented all-sources-rejected-before-upload behavior. Record -that relaxation expressly if approved. It adds no artifact-count cap and requires -no copies of every source solely to pin its original generation. +An invalid later source may be discovered after earlier immutable uploads. +Such a failure leaves the prior publication current; the new attempt is not +selected. On a first publication, failure leaves no newly selected publication. +Keep the current-pointer write last, after all required publication work succeeds. -### Viable alternatives +This explicitly relaxes the documented all-sources-rejected-before-upload behavior. +Planning identities, destinations, and rules remains upfront; opening and validating +every source before any upload is no longer required. -- Run a bounded upfront validation pass, then reopen and revalidate sources for - transfer. This preserves early detection of initially invalid sources but adds - work; later changes can still fail during transfer. -- Make verified disk-backed snapshots before uploading. This can preserve stronger - source pinning with fewer descriptors, at the cost of disk space, I/O, and - temporary-file management. No known use case currently establishes that need. +Use the existing sequential transfer mechanism. This decision adds no artifact-count +cap, descriptor-limit tuning, disk-backed source snapshots, or upload-concurrency +framework. Unselected objects from unsuccessful attempts do not require a new +cleanup subsystem as part of this fix. Existing publication locks retain their +semantics, including carrying locked remote products without opening their local +replacements. -### Question for discussion - -May publication discover an invalid later source after earlier immutable uploads, -provided it leaves the previous publication current? I recommend yes and a simple -one-source-at-a-time transfer lifecycle. +Verify bounded source-handle lifetimes with a growing inventory and a late-source +failure that leaves current publication unchanged. Retain the existing source +validation and pointer-ordering coverage. Operator response: -_Pending discussion._ +_Approved: plan destinations upfront, then open, verify, upload, and close one +source at a time. A later invalid source may leave an unselected remote attempt; +the current publication must remain unchanged on failure. CAT-09 remains open +pending implementation and verification._ ## 7. Give preparation and inspection the same audio selection rules