Files
narratio/docs/roadmap/audit/catalog.md

926 lines
48 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Consolidated Audit Catalog
Catalogued: 2026-12-01
Repository baseline: `191bd4342bc75246caf8bd3d65f33fb8f5f0b8df`.
## Scope And Use
This catalog accounts for **53 findings across all 11 audit reports** in this
directory, consolidated into **43 entries: one P1, twelve P2, and thirty P3**.
Every original finding belongs to one catalog entry. Original-entry links retain
the detailed code references, evidence, alternatives, and qualifications.
All entries are open in the source reports. This pass consolidates that recorded
state; it implements no remediation and makes no new runtime-defect claim.
Only audit documents changed between the first audit's code baseline and this
review's baseline. The original evidence therefore concerns the same application
code, but its limits still apply: source-established hazards are distinct from
dynamically reproduced failures, and green tests do not disprove unexercised
conditions.
Entries are ordered first by the highest source priority and then by likely
consequence and breadth: data safety and lifecycle integrity, valid-workflow
failures/resource pressure, followed by maintainability and smaller hygiene
corrections. Ordering within a priority is a review judgment, not a new severity
assessment or a measured production-impact ranking.
This is an inventory, not a staged implementation plan. Directions summarize the
audits' possible remedies without closing unresolved operational choices.
Required regression work is included with its associated production finding;
the independent S3-upload test gap remains separate. Related entries identify
shared change surfaces, not extra prerequisites.
## Remediation Ownership And Remaining Decisions
The [session-restore roadmap](../session-restore.md) owns the agreed redesign for
importing published artifacts. Disposition notes below relate findings to that
work without expanding its 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 the roadmap.
All 43 findings 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 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, 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.
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.
## Consolidation Decisions
- Production defects and their matching test gaps share entries: CN-01/TE-04,
FC-02/TE-02, CN-03/TE-05, FC-01/TE-03, and EH-01/TE-06.
- Repeated ownership findings share entries: CX-01/BN-04, CX-02/EQ-04,
CX-05/EQ-03/BN-05, and CX-06/BN-03. The last entry retains CX-06's broader
extraction-evidence consideration as well as publication.
- Related but distinct problems remain separate: graph ownership versus
repeated reverse-index construction; prerequisite selection versus history
hydration; extraction protocol ownership versus large-function decomposition;
transfer-size enforcement versus sibling-temp reuse; and manual-clean safety
versus its dead file-target branch.
- Cross-references in audit summaries are not counted again. Deliberately
retained behavior, rejected generalizations, and areas with no actionable
finding are outside this catalog.
## Architecture Context
Narratio remains a fixed-stage orchestrator. The application coordinates
invocations, locks, plans, stages, and restore; adapters own external transports.
ConfigKit supplies completed configuration, CommandKit/ckconfig supply native
CLI/inspection, and Narratio derives separate domain catalogs. Manifest-backed
speaker/artifact checkpoints govern product reuse. Publication selects immutable
snapshots through a current pointer, restore installs manifest authority last,
and cleanup has a separate authorization/lifecycle. See the
[implemented overview](../../internal/overview.md) and
[architecture policy](../../policy/architecture.md).
## Prioritized Findings
### CAT-01 — P1: Coordinate whole-session deletion with active invocations
Status: Open
**Disposition / owner.** Independent locking remediation — the [agreed direction](discussion.md#1-coordinate-destructive-cleanup-with-other-work)
permits one workspace-wide lock. Restore will use that coordination, but the
[restore roadmap](../session-restore.md) does not own this fix. Wait-versus-busy
behavior remains to confirm.
Original findings: [CN-01](04-concurrency.md#cn-01--p1-whole-session-cleaning-bypasses-and-can-dismantle-session-exclusion),
[TE-04](08-testing.md#te-04--p2-whole-session-cleanup-tests-never-contend-with-an-active-invocation).
**Issue.** Manual `session clean` and `--all` bypass session locking and can
delete the in-tree lock pathname while a run, restore, or preflight still holds
its inode. A new invocation can then lock a replacement inode and overlap the
original writer. Existing cleanup tests never combine manual deletion with an
active invocation.
**Direction.** Use a stable coordination identity or admission gate that survives
deletion, including admission of new sessions during `--all`. Select
wait-versus-busy behavior explicitly. Add real-lock, controlled-interleaving
coverage for deletion and a second contender. The already-locked final cleanup
stage is a different operation.
Related: [CAT-39](#cat-39--p3-simplify-manual-clean-to-its-live-directory-only-contract).
### CAT-02 — P2: Make restored carried products agree with manifest authority
Status: Open
**Disposition / owner.** Planned — the [restore roadmap](../session-restore.md#build-and-consume-restore-defined-completion)
owns this remedy. Its publication-import and synthesized-completion model
supersedes historical producer-evidence reconciliation; implementation and the
original round-trip regression outcomes remain outstanding.
Original findings: [FC-02](01-correctness.md#fc-02--p2-carried-publication-bytes-conflict-with-restored-manifest-evidence),
[TE-02](08-testing.md#te-02--p2-publication-and-restore-tests-do-not-prove-carried-output-authority-is-coherent).
**Issue.** After publishing A, locking its source, generating B locally, and
republishing, the remote commit carries A while its session-manifest snapshot
retains B's completion evidence. Restore can succeed with A's bytes and B's
checksum/fingerprint authority; normal resolution then rejects the restored
product. Separate publish/restore tests miss this interaction.
**Direction.** Implement the roadmap's publication import and locally synthesized
completion instead of restoring historical execution evidence. Retain
publish–lock–regenerate–republish–restore–resolve round trips for built-in and
configured outputs, verifying usable restored products without reconstructing
their historical generation fingerprints or provenance.
Related: [CAT-20](#cat-20--p3-share-typed-publication-control-evidence-across-producer-and-consumers).
### CAT-03 — P2: Enforce non-forced session creation at the write boundary
Status: Open
Original findings: [CN-02](04-concurrency.md#cn-02--p2-session-initializations-no-overwrite-check-is-not-atomic).
**Issue.** Local stat-then-write and remote Exists-then-unconditional-upload allow
concurrent `session init` calls to overwrite a destination without `--force`. Both
can report success; local writes can also truncate or mix content.
**Direction.** Use exclusive local creation and the existing remote absence
precondition for non-forced writes. Keep deliberate forced replacement separate
and test competing creators. A preliminary existence check may inform diagnostics
but cannot authorize the later write.
### CAT-04 — P2: Bind prepared S3 audio bytes to their observed generation
Status: Open
**Disposition / owner.** Independent audio-acquisition remediation — [discussion topic 4](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together)
selects accepting the raw-audio generation actually downloaded; implementation
and verification remain pending. The [restore roadmap](../session-restore.md)
relaxes generation-history requirements for imported products, not source identity
for local audio reuse.
Original findings: [CN-04](04-concurrency.md#cn-04--p2-s3-audio-provenance-can-combine-two-object-generations).
**Issue.** Preparation records listing metadata from generation A but can download
same-sized generation B. Its checksum then describes B while source provenance
describes A, allowing incorrect reuse after a remote rollback.
**Direction.** Retain metadata from the same opened response as the streamed body.
Accept and record that observed raw-audio generation when the download passes
existing acquisition checks, even if it differs from the earlier listing.
Test replacement between listing and reading, including rollback/reuse. This
corrects per-object consistency without a whole-session snapshot guarantee or
automatic retries until sources stop changing.
Related: [CAT-06](#cat-06--p2-stop-known-size-downloads-before-oversized-bodies-exhaust-staging-space).
### CAT-05 — P2: Retain subprocess and stream ownership through delayed completion
Status: Open
**Disposition / owner.** Independent subprocess remediation — [discussion topic 5](discussion.md#5-finish-subprocess-shutdown-before-releasing-its-files)
selects joining process/output completion after bounded termination escalation,
before releasing resources. Implementation and verification remain pending;
publication import does not remove downstream process ownership.
Original findings: [CN-03](04-concurrency.md#cn-03--p2-the-exceptional-subprocess-reap-timeout-releases-ownership-too-early),
[TE-05](08-testing.md#te-05--p2-subprocess-lifecycle-tests-do-not-exercise-a-delayed-reap-after-escalation).
**Issue.** The exceptional final reap timeout can return without receiving the
wait result. `ProcessState` inspection, redactor flushing, diagnostic closure, and
caller-owned result-file closure can then overlap a still-active waiter or stream
copier. Current tests exercise ordinary shutdown or pre-populated completion, not
delayed completion beyond escalation.
**Direction.** Retain bounded graceful-to-forceful escalation, then join process
and output completion before reading process state, flushing/closing diagnostics,
or returning resource ownership to callers. Add a controlled delayed-wait/stream
test for release ordering and preserved error causes. Exceptional I/O delays can
outlast escalation timers; no absolute return-time guarantee or early-return
ownership handoff is required.
### CAT-06 — P2: Stop known-size downloads before oversized bodies exhaust staging space
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#existing-restore-controls-remain-useful)
touches verified downloads. Transfer-size enforcement remains a separate audit
remediation across all listed callers. [Discussion topic 4](discussion.md#4-keep-downloaded-audio-and-its-source-identity-together)
approves bounded known-size streaming with existing unknown-size behavior;
implementation and verification remain pending.
Original findings: [RS-02](05-resources.md#rs-02--p2-known-size-downloads-consume-the-full-response-before-rejecting-oversize).
**Issue.** Restore, previous-input hydration, S3 audio, and immutable-object
verification can know the expected size yet copy the entire body before rejecting
oversize. Invalid responses can fill temporary storage and hold the session lock
unnecessarily.
**Direction.** Enforce the existing known size during transfer, with correlated
response metadata and size-plus-one detection, then close/remove failed staging.
Retain checksum/generation checks and installation ordering. Test early rejection
and destination preservation; a declared zero size is known. Unknown-size audio
needs no newly invented universal cap.
Related: [CAT-04](#cat-04--p2-bind-prepared-s3-audio-bytes-to-their-observed-generation), [CAT-21](#cat-21--p3-share-closed-sibling-temporary-file-creation-mechanics).
### CAT-07 — P2: Correct recovery instructions that publish before inspection
Status: Open
**Disposition / owner.** Coordinate documentation — the [restore roadmap](../session-restore.md#align-policies-and-canonical-documentation)
changes recovery guidance. Explicitly verify the inspection-before-publication
sequence; a restore documentation rewrite alone does not close this finding.
Original findings: [DOC-01](13-documentation.md#doc-01--p2-recovery-examples-publish-before-the-stated-inspection-step).
**Issue.** Troubleshooting's unsupported-manifest recovery invokes a full run,
then force publish, while describing inspection before explicit publication. The
first command can already publish and run authorized cleanup. A separate
diagnostics block also includes a mutating forced publish.
**Direction.** For inspection-first recovery, bound regeneration through analyze,
inspect, and then publish. Alternatively, describe the full run's
publication/cleanup effects accurately. Move publication retries out of the
inspection-only diagnostics sequence. This is a documentation correction, not a
new command confirmation or publication restriction.
### CAT-08 — P2: Stream local audio copies instead of buffering whole recordings
Status: Open
Original findings: [EF-01](02-efficiency.md#ef-01--p2-local-audio-copying-buffers-the-complete-recording).
**Issue.** The changed/missing local-copy path hashes a recording, reads all its
bytes into memory, then writes them atomically. One large speaker file therefore
requires recording-sized auxiliary RAM despite sequential processing.
**Direction.** Use the existing streaming artifact/file-copy mechanism while
preserving unchanged-destination checks, naming, workspace modes, atomic
visibility, and recorded checksums. The improvement is O(1) auxiliary buffering
relative to file size, not asymptotically faster I/O. No new audio-size limit is
required.
### CAT-09 — P2: Bound publication's simultaneously open source descriptors
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)
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).
**Issue.** Publication retains descriptors for every run file, previous-cache
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.** 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).
### CAT-10 — P2: Hydrate previous inputs for the full analysis prerequisite closure
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
changes preparation and previous-session acquisition. The prerequisite-inclusive
requirement fix still needs explicit implementation and regression coverage;
publication-inventory-only discovery does not supply the missing closure.
Original findings: [FC-01](01-correctness.md#fc-01--p2-previous-session-hydration-omits-analysis-prerequisites),
[TE-03](08-testing.md#te-03--p2-previous-session-hydration-coverage-stops-short-of-dependency-closure).
**Issue.** Preparation and previous-cache restore collect history requirements
from enabled/explicit targets only, while analyze separately schedules
prerequisites. A prerequisite's required history can remain unavailable despite an
available remote product; optional history can disappear silently. Existing tests
cover these mechanisms separately.
**Direction.** Use one prerequisite-inclusive requirements view for preparation,
semantic evidence, store composition, and restore. Retain explicit targets
separately for force/publication policy. Add selected-child/disabled-prerequisite
preparation-to-analysis coverage for required and optional history, unrelated-work
exclusion, and restore.
Related: [CAT-17](#cat-17--p3-centralize-configured-artifact-dependency-queries).
### CAT-11 — P2: Verify the bytes supplied to the production S3 upload adapter
Status: Open
Original findings: [TE-01](08-testing.md#te-01--p2-s3-upload-tests-do-not-verify-the-transmitted-content).
**Issue.** The SDK fake records upload requests without consuming their bodies.
Replacing the production body with unrelated fixed bytes survived the full suite;
higher-level storage fakes bypass that mapping. This is a demonstrated protection
gap, not a finding that the unmodified adapter sends wrong bytes.
**Direction.** Consume and compare upload bytes in the narrow SDK fake for file
and conditional-reader uploads, retaining key/precondition assertions and
appropriate stream-error coverage. A local HTTP SDK test is an alternative; live
S3 is unnecessary.
### CAT-12 — P2: Share audio discovery and accept valid same-basename recordings in inspection
Status: Open
**Disposition / owner.** Independent audio-discovery remediation — coordinate with the
[roadmap's preparation changes](../session-restore.md#adapt-preparation-and-operator-reporting).
Artifact-only execution does not fix raw-audio inspection;
[discussion topic 7](discussion.md#7-give-preparation-and-inspection-the-same-audio-selection-rules)
remains open.
Original findings: [CX-01](03-complexity.md#cx-01--p2-audio-discovery-is-duplicated-and-inspection-rejects-valid-inputs),
[BN-04](11-boundaries.md#bn-04--p3-audio-discovery-is-owned-independently-by-preparation-and-inspection).
**Issue.** Preparation and operator inspection independently implement source
resolution, filtering, eligibility, duplicates, and ordering. Preparation
preserves distinct same-basename recordings with unique prepared names; inspection
rejects them. The audits also identify differing duplicate-path and
file-eligibility handling.
**Direction.** Give read-only audio selection a shared owner, preferably
`internal/audio`. Keep copying/naming/checkpoints in preparation and reporting in
app. Preserve duplicate-resolved-source rejection, local destination
disambiguation, and the separately selected S3 basename rule. Resolve eligibility
differences against the existing contract rather than adopting the strictest
check. Retain cross-consumer regression coverage.
Related: [CAT-13](#cat-13--p2-give-s3-session-planning-the-evidence-needed-for-truthful-reuse-decisions).
### CAT-13 — P2: Give S3 session planning the evidence needed for truthful reuse decisions
Status: Open
**Disposition / owner.** Independent planning/preflight remediation — the [agreed decision](discussion.md#3-inspect-s3-when-planning-and-preflighting)
selects read-only S3 checks for both commands. Coordinate with the
[restore roadmap's planning changes](../session-restore.md#preparation-and-readiness-support-artifact-only-execution);
skipping covered audio work does not fix planning for raw-audio sessions.
Original findings: [FC-03](01-correctness.md#fc-03--p2-session-planning-reports-reusable-s3-preparation-as-changed).
**Issue.** The planning projection omits the object store needed to inspect S3
audio identities. Resume converts that missing collaborator into 'inputs changed',
so plan can predict prepare reruns and dependent invalidation while actual
execution reuses identical evidence.
**Direction.** Supply read-only remote identities to the shared planning decision,
or explicitly report conditional/unverified evidence if remote inspection is
intentionally unavailable. Test unchanged, changed, and unavailable identities
while proving no workspace mutation. Keep this distinct from local audio discovery
disagreement.
Related: [CAT-12](#cat-12--p2-share-audio-discovery-and-accept-valid-same-basename-recordings-in-inspection).
### CAT-14 — P3: Close temporary committed-manifest cleanup gaps
Status: Open
**Disposition / owner.** Potentially eliminated — the [restore roadmap](../session-restore.md#decouple-remote-discovery-from-execution-snapshots)
removes unnecessary execution-snapshot publication. Close only after verifying
that the temporary-manifest creation and ownership gaps disappear; repair any
retained lifecycle rather than assuming snapshot removal fixes it.
Original findings: [RS-03](05-resources.md#rs-03--p3-publications-temporary-manifest-has-cleanup-gaps-before-ownership-transfer).
**Issue.** Publication can orphan a system-temp committed-manifest file when
writing/closing fails or opening it fails before the transfer collection accepts
ownership. These files are outside run-history cleanup.
**Direction.** Make the creator own removal immediately, and retain caller cleanup
until transfer ownership is explicit. Exercise write/close/handoff failure paths.
Straightforward deferred cleanup suffices; this is distinct from intentionally
retained attempt diagnostics.
Related: [CAT-09](#cat-09--p2-bound-publications-simultaneously-open-source-descriptors), [CAT-21](#cat-21--p3-share-closed-sibling-temporary-file-creation-mechanics).
### CAT-15 — P3: Preserve input-error classification for resolved domain validation
Status: Open
Original findings: [EH-01](06-error-handling.md#eh-01--p3-domain-configuration-failures-lose-the-cli-input-classification),
[TE-06](08-testing.md#te-06--p3-cli-classification-tests-omit-real-resolved-domain-rejections).
**Issue.** Cross-document storage/audio conflicts and product-destination
collisions return ordinary errors, so commands exit 1 instead of the documented
identifiable-input status 2. Existing tests check rejection or synthetic markers
but do not carry these real failures through the CLI.
**Direction.** Use a narrow cause-preserving domain input marker at the
rejection/classification boundary, or integrate suitable checks with native
validation diagnostics. Add real-command cases for both conflicts, valid
counterparts, and joined operational/cancellation precedence. Environmental
failures stay operational; no new validation rule is needed.
### CAT-16 — P3: Flatten inspection-error aggregation
Status: Open
Original findings: [EF-05](02-efficiency.md#ef-05--p3-publication-inspection-errors-form-a-quadratic-formatting-tree).
**Issue.** Repeated `errors.Join(previous, next)` creates a left-nested
publication-inspection error tree. Formatting F bounded-size failures takes
quadratic cumulative copying and linear nesting, particularly during storage
outages.
**Direction.** Collect ordered failures and join once. Preserve per-output
details, partial results, and `errors.Is`/`errors.As` causes. Existing preflight
collectors provide a local pattern.
Related: [CAT-25](#cat-25--p3-separate-inspectionreadiness-collection-assessment-and-presentation).
### CAT-17 — P3: Centralize configured-artifact dependency queries
Status: Open
**Disposition / owner.** Independent dependency-refactoring owner — the [restore roadmap](../session-restore.md#restore-synthesizes-a-local-completion-baseline)
uses a fixed stage/output coverage mapping, not this configured-artifact graph.
Do not make graph consolidation a prerequisite; coordinate only where existing
artifact reconciliation is actually changed.
Original findings: [CX-05](03-complexity.md#cx-05--p3-artifact-dependency-semantics-span-several-representations-and-owners),
[EQ-03](10-equivalence.md#eq-03--p3-configured-artifact-dependency-mechanics-have-multiple-owners),
[BN-05](11-boundaries.md#bn-05--p3-configured-artifact-graph-operations-are-fragmented-across-domain-owners).
**Issue.** One derived edge relation has separately maintained normalization,
validation adjacency, topological ordering, prerequisite traversal, and
reverse-edge mechanics. Targets-only selection is easily confused with required
work, as the history-hydration defect illustrates.
**Direction.** Expose a small validated dependency view alongside the derived
artifact catalog, or a narrow key/edge package if dependency direction requires
it. Share deterministic order, closure, and dependent queries while retaining
origin diagnostics and caller-owned force/reuse/invalidation policy. Keep
configuration definitions, runtime availability, and the fixed stage relation
distinct.
Related: [CAT-10](#cat-10--p2-hydrate-previous-inputs-for-the-full-analysis-prerequisite-closure), [CAT-18](#cat-18--p3-reuse-the-analysis-reverse-dependency-index-within-an-invocation).
### CAT-18 — P3: Reuse the analysis reverse-dependency index within an invocation
Status: Open
Original findings: [EF-02](02-efficiency.md#ef-02--p3-analysis-rebuilds-the-same-dependency-index-after-each-completion).
**Issue.** Each new/changed completion rebuilds and sorts the unchanged reverse
graph. Independent artifacts still incur quadratic setup work. This performance
issue can be fixed independently of broader graph ownership.
**Direction.** Construct the immutable reverse index once and reuse it for
success/failure invalidation. Preserve traversal ordering, eligibility, and
invalidation timing. Complete-collection checkpoint costs remain separate.
Related: [CAT-17](#cat-17--p3-centralize-configured-artifact-dependency-queries).
### CAT-19 — P3: Describe stable prepared products once for materialization and reuse
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
changes preparation and reuse. Review the shared stable-product description
there to avoid another parallel inventory; the roadmap does not itself perform
this consolidation or replace evidence for locally prepared products.
Original findings: [CX-02](03-complexity.md#cx-02--p3-prepared-stable-inputs-have-parallel-materialization-and-resume-definitions),
[EQ-04](10-equivalence.md#eq-04--p3-preparation-and-resume-separately-describe-the-same-stable-products).
**Issue.** Preparation, party/player writing, resume reconstruction, managed-kind
matching, and semantic presence repeat stable-product inventories and dependency
mappings. Existing renderers and source descriptors are already shared, but
callers can omit different products.
**Direction.** Use a small stage-owned read-only product description backed by
current descriptors, with separate write and expected-evidence projections.
Preserve snapshot normalization, combined-glossary dependencies, source
relocation, ConfigKit immutability, and bounded presence-only fingerprinting. Keep
audio and previous acquisition explicit and retain independent literal
inventory/corruption tests.
Related: [CAT-34](#cat-34--p3-include-the-combined-glossary-in-prepared-input-documentation).
### CAT-20 — P3: Share typed publication control evidence across producer and consumers
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#decouple-remote-discovery-from-execution-snapshots)
changes publication consumers and extraction availability. Typed local control
evidence remains a separate simplification; neither snapshot removal nor import
completion automatically centralizes the remaining codecs.
Original findings: [CX-06](03-complexity.md#cx-06--p3-unstructured-metadata-carries-cross-package-control-evidence),
[BN-03](11-boundaries.md#bn-03--p3-machine-consumed-publication-metadata-lacks-a-shared-contract-owner).
**Issue.** Publish writes map-based completion/outcome evidence; cleanup and app
inspection independently reconstruct keys, status strings, types, and in-memory
versus JSON-decoded collection shapes. Extraction has a related producer/reader
metadata boundary.
**Direction.** Start with narrow typed publication values and codecs under an
existing shared owner, preserving the JSON shape. Keep cleanup authorization and
tolerant display policy at their callers. Apply the same treatment to extraction
evidence where useful; leave free-form diagnostics flexible. Test direct and
persistence-round-trip use. Typing does not resolve carried-product authority.
Related: [CAT-02](#cat-02--p2-make-restored-carried-products-agree-with-manifest-authority).
### CAT-21 — P3: Share closed sibling-temporary-file creation mechanics
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#existing-restore-controls-remain-useful)
retains staging and validation before installation. Reassess the common mechanics
across the surviving download callers; helper extraction remains separate from
both product import and CAT-06's transfer bounds.
Original findings: [EQ-02](10-equivalence.md#eq-02--p3-verified-downloads-duplicate-sibling-temporary-file-ownership).
**Issue.** Audio, previous-input hydration, and ordinary restore repeat creating,
writing, closing, and error-cleaning a sibling temporary file before
domain-specific verification and installation.
**Direction.** Use a small `internal/fileops` helper returning an owned closed
temporary path, or a narrowly scoped cleanup callback. Keep selection,
cancellation, validation, root confinement, and installation with callers. Atomic
reader-copy helpers that install before validation are not substitutes. Retain
representative consumer failure/retry tests.
Related: [CAT-06](#cat-06--p2-stop-known-size-downloads-before-oversized-bodies-exhaust-staging-space), [CAT-14](#cat-14--p3-close-temporary-committed-manifest-cleanup-gaps).
### CAT-22 — P3: Share the minimal transcript-envelope predicate
Status: Open
Original findings: [EQ-01](10-equivalence.md#eq-01--p3-four-boundaries-repeat-the-same-minimal-transcript-shape-validator).
**Issue.** Seriatim, Audita, stage acceptance, and artifact resolution
independently implement the same JSON top-level `segments` array check. Their
surrounding filesystem and diagnostic rules legitimately differ.
**Direction.** Prefer a byte-oriented predicate in existing `internal/contracts`,
leaving acquisition, bounds, file eligibility, and contextual errors at each
boundary. Preserve empty arrays and unrelated members; do not impose segment IDs
or a universal downstream schema. Keep independent literal fixtures and
representative adapter/consumer tests.
### CAT-23 — P3: Move Notarius native output mapping and executable lookup to their boundary
Status: Open
Original findings: [BN-02](11-boundaries.md#bn-02--p3-notarius-output-protocol-translation-partly-lives-in-stage-orchestration).
**Issue.** Stage code implements Notarius lane-ID sanitization and native bundle
filenames, and performs executable discovery shared by execution and readiness.
These are external-protocol/launch details rather than Narratio product policy.
**Direction.** Move native mapping to the existing adapter through a narrow
resolver or requested-output result contract; route executable selection through
adapter/composition. Stages retain required-lane selection, canonical names,
collisions, confinement, bounded JSON checks, checksums, and promotion. This
ownership correction is distinct from decomposing the large stage functions.
Related: [CAT-24](#cat-24--p3-separate-trimextract-invocation-phases-from-product-acceptance).
### CAT-24 — P3: Separate trim/extract invocation phases from product acceptance
Status: Open
Original findings: [CX-03](03-complexity.md#cx-03--p3-trim-and-extraction-mix-invocation-mechanics-with-product-acceptance).
**Issue.** Large stage entry points interleave layout, disabled branches, debug
rendering, native execution, validation, promotion, and metadata. Extraction
readiness and execution also repeat resolved invocation options.
**Direction.** Extract cohesive typed operations and shared invocation options,
keeping explicit orchestration and one final acceptance path where behavior is
shared. Preserve validation before promotion, post-call reference verification,
and failure diagnostics. Avoid a generic stage framework or helpers that only
relocate statements.
Related: [CAT-23](#cat-23--p3-move-notarius-native-output-mapping-and-executable-lookup-to-their-boundary).
### CAT-25 — P3: Separate inspection/readiness collection, assessment, and presentation
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
changes inspection and readiness for restored inputs. The broader separation of
collection, assessment, and presentation retains independent audit ownership;
do not require it before adding coverage-aware decisions.
Original findings: [CX-04](03-complexity.md#cx-04--p3-inspection-and-readiness-combine-collection-policy-and-presentation).
**Issue.** Operator entry points mix local/remote evidence acquisition,
independent probes, preparation outcomes, cancellation, policy interpretation, and
report mutation. Scriptorium discovery interpretation is interleaved with
transport iteration.
**Direction.** Collect cohesive typed results, isolate tool-specific readiness and
pure requirements interpretation, then project the existing reports. Preserve
partial findings, independent work after ordinary failures, preparation-blocked
checks, cancellation, read-only inspection, and preflight effects. No check
registry or stronger readiness rule is required.
Related: [CAT-16](#cat-16--p3-flatten-inspection-error-aggregation).
### CAT-26 — P3: Place diagnostic-view layout grammar with canonical workspace paths
Status: Open
Original findings: [BN-01](11-boundaries.md#bn-01--p3-diagnostic-view-layout-policy-is-embedded-in-file-operation-mechanics).
**Issue.** Fileops constructs and recognizes Narratio-specific
run/stage/log/debug/probe paths independently of the canonical path owner. A
layout change therefore spans file mechanics and multiple domain callers.
**Direction.** Move the existing view operation to `internal/artifacts` and its
path model, or consider a focused workspace owner if the broader extraction is
justified. Keep ordinary root-scoped file mechanics in fileops and attempt/cleanup
decisions in callers. Retain advancement, failure, self-skip, reuse, and
confinement coverage.
### CAT-27 — P3: Index repeated previous-input and prepared-record lookups
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#decouple-remote-discovery-from-execution-snapshots)
changes previous-input discovery and prepared-record consumers. Reassess the
surviving scans after those changes; inventory-only selection does not by itself
remove repeated linear lookups.
Original findings: [EF-03](02-efficiency.md#ef-03--p3-previous-session-metadata-is-repeatedly-searched-as-a-list).
**Issue.** Requirement resolution repeatedly scans remote commit declarations,
local input identities are repeatedly selected from manifest lists, and
optional-absence reporting repeatedly searches skipped names.
**Direction.** Build phase-local source/kind indexes and skipped-name membership
sets (or use appropriate sorted lookup). Keep one selected commit, candidate
multiplicity, ambiguity checks, deterministic result order, and content
verification. Index selection rather than caching payloads across invocations.
### CAT-28 — P3: Index restore report action updates
Status: Open
**Disposition / owner.** Coordinate — the [restore roadmap](../session-restore.md#adapt-preparation-and-operator-reporting)
touches restore reporting. Carry or index action identity if that path is changed;
new manifest construction alone does not fix quadratic report updates.
Original findings: [EF-04](02-efficiency.md#ef-04--p3-restore-reporting-performs-a-full-search-after-each-install).
**Issue.** Each restored object's success/failure searches the report's full
action list, yielding quadratic bookkeeping when all actions download.
**Direction.** Use a private composite-key-to-report-index map or carry the
original index with execution actions. Preserve report order and shape and the
separate manifest-last installation order.
### CAT-29 — P3: Correct force-after-enablement guidance
Status: Open
**Disposition / owner.** Coordinate documentation — the [restore roadmap](../session-restore.md#align-policies-and-canonical-documentation)
adds render selection and supplied-baseline reuse. Correct the existing
render/publish/analyze enablement guidance explicitly while distinguishing
ordinary local semantic reuse from restore-defined completion.
Original findings: [DOC-02](13-documentation.md#doc-02--p3-operator-guidance-incorrectly-requires-force-after-enablement).
**Issue.** Operations says newly enabled/configured render, publish, or analyze
requires force, contradicting current fingerprints and reconciliation.
**Direction.** Explain automatic reruns for observable configuration changes when
the affected stage is selected. Reserve force guidance for intentional
current-result replacement or private upstream changes. Link to canonical resume
descriptions rather than repeating stale behavior.
### CAT-30 — P3: Correct internal resume and fingerprint descriptions
Status: Open
**Disposition / owner.** Coordinate documentation — the [restore roadmap](../session-restore.md#align-policies-and-canonical-documentation)
rewrites resume descriptions. Check each original mismatch for locally generated
work as well as documenting the new baseline; do not change fingerprints to
match obsolete prose.
Original findings: [DOC-03](13-documentation.md#doc-03--p3-internal-resume-summaries-describe-obsolete-fingerprint-inputs).
**Issue.** Analyze prose incorrectly includes debug selection in fingerprints;
prepare prose includes source ownership/party mode; the manifest overview omits
prepare's durable source/content validator.
**Direction.** Describe the current typed payloads and prepare's combined
semantic/content checks, or shorten the overview to links to focused stage owners.
Preserve diagnostic-only debug selection and provenance-only ownership. Correct
prose without changing fingerprints to match it.
### CAT-31 — P3: Correct annotated-example dependency, credential, and cleanup claims
Status: Open
Original findings: [DOC-05](13-documentation.md#doc-05--p3-annotated-example-comments-retain-obsolete-contracts-and-defaults).
**Issue.** Comments require redundant authored `depends_on` edges, label example
S3 secret-reference names as defaults, and understate cleanup as one run's work
directory.
**Direction.** State inferred input dependencies, operator-selected credential
references, and whole-session run-history cleanup accurately. Link to the
configuration/operations owners. YAML-loading tests cannot detect incorrect
comments.
### CAT-32 — P3: Document Seriatim reports as diagnostics
Status: Open
Original findings: [DOC-04](13-documentation.md#doc-04--p3-seriatim-reports-are-documented-as-canonical-artifact-outputs).
**Issue.** Merge and normalize output lists advertise canonical `artifacts/`
report files, while implementation retains reports in run-local logs and returns
only canonical transcripts as substantive outputs.
**Direction.** Separate products from diagnostics and link to the
workspace/retention owner. Keep the selected content taxonomy; moving reports back
to canonical artifacts is not a prose fix.
### CAT-33 — P3: Align credential-ownership descriptions with native ConfigKit startup
Status: Open
Original findings: [DOC-06](13-documentation.md#doc-06--p3-internal-credential-ownership-descriptions-predate-native-bootstrap).
**Issue.** Internal fileops/adapter prose assigns credential precedence/mode
responsibility to app and describes bootstrap during object-store construction.
Actual acquisition delegates configured startup to ConfigKit before typed loading,
and storage consumes resolved values.
**Direction.** Describe native startup at acquisition and link upstream for its
semantics; link operations for operator-managed permissions. Remove stale
credential-policy prose from file helpers. Do not restore duplicate bootstrap or
filesystem enforcement in Narratio.
### CAT-34 — P3: Include the combined glossary in prepared-input documentation
Status: Open
**Disposition / owner.** Coordinate documentation — the [restore roadmap](../session-restore.md#align-policies-and-canonical-documentation)
changes prepared-input/publication descriptions. Verify the retained combined
input inventory explicitly; execution-snapshot removal does not make the four
individual Audita inputs a five-input invocation.
Original findings: [DOC-07](13-documentation.md#doc-07--p3-internal-glossary-inventories-omit-the-combined-prepared-document).
**Issue.** Manifest/publish/restore summaries count four retained glossaries,
omitting the combined fifth envelope that is prepared, committed, and restored.
**Direction.** Include combined alongside party/campaign/setting/spells,
preferably linking to one inventory instead of repeating counts. Audita
intentionally receives four individual envelopes; keep that distinct.
Related: [CAT-19](#cat-19--p3-describe-stable-prepared-products-once-for-materialization-and-reuse).
### CAT-35 — P3: Remove assertions on incidental serialization and validation order
Status: Open
Original findings: [TE-07](08-testing.md#te-07--p3-some-assertions-freeze-incidental-serialization-or-validation-order).
**Issue.** A metadata test freezes JSON object-member order and a campaign test
with multiple invalid conditions freezes the first diagnostic. Valid internal
reorderings fail despite equivalent contractual results.
**Direction.** Assert JSON structure/omissions and the intended validation
condition without prescribing irrelevant order. Retain canonical-byte assertions
where bytes actually define fingerprints or remote contracts; do not delete
meaningful boundary tests.
### CAT-36 — P3: Remove confirmed orphaned production and test helpers
Status: Open
Original findings: [DD-01](12-deadcode.md#dd-01--p3-completely-orphaned-helper-functions-remain-in-production-and-tests).
**Issue.** Reachability analysis and source review identify six disconnected
production helpers and six unused test helpers across Notarius, cleanup,
configuration, and fixtures.
**Direction.** Remove the exact source-listed declarations and newly unused
imports/files. Retain live path/bundle validation, supported callbacks, and
independent preparation assertions. Verify current references before deletion; no
replacement abstraction or compatibility shim is needed.
### CAT-37 — P3: Remove unused constants and retired workspace path fields
Status: Open
Original findings: [DD-02](12-deadcode.md#dd-02--p3-unused-constants-and-retired-workspace-paths-advertise-obsolete-concepts).
**Issue.** Six disconnected constants and unused
`SessionPaths.ReportsDir`/`ConfigDir` fields, assignments, and directory constants
preserve obsolete names without providing runtime capabilities.
**Direction.** Delete only the listed inert model elements. Keep active artifact
vocabulary and commit/path helpers. This does not authorize deleting session
directories, changing layout, migrating sessions, or inventing an output fallback.
### CAT-38 — P3: Remove inert extraction descriptor fields and nil-only plumbing
Status: Open
Original findings: [DD-03](12-deadcode.md#dd-03--p3-extraction-still-carries-descriptor-fields-that-the-current-model-discarded).
**Issue.** Four extraction fingerprint fields are JSON-excluded and unused. An
extraction evidence contract field has no non-nil producer and is passed through
redundant extraction-only plumbing.
**Direction.** Remove those fields and extraction-only parameters/copies while
retaining live analyze/catalog/manifest contracts. Existing fingerprint bytes can
remain unchanged. No schema migration, stricter lane check, or retired
configuration descriptor is needed.
### CAT-39 — P3: Simplify manual clean to its live directory-only contract
Status: Open
Original findings: [DD-04](12-deadcode.md#dd-04--p3-manual-cleaning-retains-a-file-target-mode-unavailable-through-its-cli).
**Issue.** Both CLI cleaning modes always pass `directory=true`; file-target
behavior and wrapper variants survive only through unit tests.
**Direction.** Use one live directory validation path and remove the forwarded
mode, file-only branch, and obsolete wrappers/tests. Preserve confinement,
symlink/root/traversal checks, dry runs, missing targets, and deletion scope. This
simplification does not fix the separate active-session lock hazard.
Related: [CAT-01](#cat-01--p1-coordinate-whole-session-deletion-with-active-invocations).
### CAT-40 — P3: Remove the superseded publish-default mutation helper
Status: Open
Original findings: [DD-05](12-deadcode.md#dd-05--p3-a-superseded-publish-default-mutation-helper-survives-only-in-a-no-op-test-call).
**Issue.** `applyMissingPublishDestinations` has only a test caller whose explicit
destination makes the call a no-op. Production uses native ConfigKit normalization
and the shared derivation directly.
**Direction.** Remove the obsolete writer and irrelevant call; retain derivation
and explicit-destination protection through the live boundary. Do not alter
configuration ownership or introduce new destination semantics.
### CAT-41 — P3: Remove the duplicate normalized-transcript test
Status: Open
Original findings: [TE-08](08-testing.md#te-08--p3-two-normalized-transcript-tests-are-exact-duplicates).
**Issue.** Two differently named analyze tests have identical bodies and
assertions for the same manifest-authoritative normalized source.
**Direction.** Keep one authority test and delete its exact duplicate. Retain
neighboring source-kind and missing-input cases, which protect different behavior.
### CAT-42 — P3: Discard the unused normalized-path result while retaining validation
Status: Open
Original findings: [DD-06](12-deadcode.md#dd-06--p3-input-hashing-stores-a-normalized-path-that-is-never-consumed).
**Issue.** Input hashing reassigns a normalized relative path that is never used
afterward; only the validation error matters.
**Direction.** Discard the unused return value explicitly. Preserve the
normalization call and error check, which enforce live path confinement.
### CAT-43 — P3: Correct the logging package summary
Status: Open
Original findings: [DOC-08](13-documentation.md#doc-08--p3-logging-package-documentation-advertises-a-removed-responsibility).
**Issue.** GoDoc advertises structured logger construction, but the package
supplies a Reporter interface and nil-safe forwarding helpers, with presentation
supplied by CommandKit.
**Direction.** Update the package summary or link to the implemented reporting
owner. No logger constructor or new logging abstraction is needed.