Accept audit cleanup scope and native capture extraction

This commit is contained in:
2026-11-25 17:38:58 +00:00
parent 2da5fdc5f0
commit f1b62bdf53

View File

@@ -315,32 +315,49 @@ CAT-025 remains outstanding until that work is implemented.
## 9. Cleanup Scope And Optional Improvements ## 9. Cleanup Scope And Optional Improvements
**Findings:** CAT-026 through CAT-033. **Findings:** CAT-026 through CAT-033.
**Status:** Proposed scope; confirm before treating every entry as required work. **Status:** Accepted scope; implementation pending, with CAT-033 deferred.
- Remove the confirmed private dead helpers and obsolete policy labels - Remove the confirmed private dead helpers and obsolete policy labels
(CAT-030/CAT-031), preserving live identity bytes and behavior. No new tests of (CAT-030/CAT-031) after checking they remain unused, preserving live identity
declaration counts or absence are needed. bytes and behavior. No new tests of declaration counts or absence are needed.
- Give the six exported `NormalizationPolicy` aliases a short intended-use check. - Give the six exported `NormalizationPolicy` aliases a short intended-use check.
Remove them if they have no supported purpose; defer any whose purpose remains
unclear rather than expanding the review into a compatibility project.
They reside under `internal/`; capitalization alone does not establish a They reside under `internal/`; capitalization alone does not establish a
supported external API. Do not turn unused internal metadata removal into a supported external API. Do not turn unused internal metadata removal into a
broad compatibility project, or recreate cache fingerprints to give it a use. broad compatibility project, or recreate cache fingerprints to give it a use.
- Remove incidental prompt-prose/run-ID assertions, use controlled scheduling in - Remove incidental prompt-prose/run-ID assertions, use controlled scheduling in
concurrency tests, and separate order-dependent example fixtures concurrency tests, and separate order-dependent example fixtures
(CAT-026–CAT-029). Preserve genuine schema, routing, ownership, worker-limit, (CAT-026–CAT-029). Include these explicitly in remediation scope. Use
and maintained-example contracts. Do not replace fragile assertions with test-controlled content and bounded, cancellation-safe scheduling gates.
snapshots or add tests for every private helper. Preserve genuine schema, routing, ownership, worker-limit, ordering, safe
- Treat native-capture package extraction (CAT-032) as optional. Proceed only if allocation, uniqueness, and maintained-example contracts, including the distinct
a small direct API improves ownership and callers; a package move alone is not session-ID contract. Do not replace fragile assertions with snapshots or add
a demonstrated behavior improvement. tests for every private helper.
- Treat a KMP token matcher (CAT-033) as optional. Ordinary short entity names - Carry out native-capture package extraction (CAT-032) as required ownership
make the current matcher effectively linear. Assess representative workloads remediation, independent of performance benefit. A focused framework capture
before paying additional algorithm maintenance cost; no benchmark gate or package owns native request preparation hooks, result/exchange evidence, and
name-length restriction is proposed. capture-error retention, using native PromptKit types and the existing
`EvidenceWriter`. Core operations and independently executing validators use
that same implementation. Pipeline retains operation identity and step/lane/
chunk evidence paths; CLI/recorder retain filesystem allocation and run-level
capture lifecycle/finalization. Prefer a dedicated capture package over expanding
the storage-oriented debug package; exact naming remains an implementation
choice. Preserve cancellation, error causes, prepared-value ownership, admission
behavior, and existing evidence behavior without duplicate preparation or model
calls. No replacement execution API, telemetry service, or synchronized-writer
wrapper is included.
- Defer a KMP token matcher (CAT-033) until representative workloads demonstrate
worthwhile benefit. Ordinary short entity names make the current matcher
effectively linear. Keep existing exact token-matching semantics; no benchmark
gate or name-length restriction is selected.
Deferral or declining a refactoring opportunity can be a valid outcome. Closing Deferral or declining a refactoring opportunity can be a valid outcome. Closing
every catalog entry through code changes is not itself the goal. every catalog entry through code changes is not itself the goal.
**Decision:** Pending. **Decision:** Cleanup, test improvements, and capture-package extraction accepted
as above; token-matching optimization deferred. Catalog implementation statuses
remain outstanding until the selected work lands; deferral is not a code fix.
## 10. Remediation Sequence And Verification ## 10. Remediation Sequence And Verification
@@ -359,12 +376,14 @@ Recommended approach:
run/source lifetime. Preserve standalone use and current-source cache checks; run/source lifetime. Preserve standalone use and current-source cache checks;
no process-global cache or new cache-key dimensions are needed. no process-global cache or new cache-key dimensions are needed.
3. Add signal cancellation after Item 3, then undertake coherent ownership work 3. Add signal cancellation after Item 3, then undertake coherent ownership work
in the composition/copying, producer/reconciliation, and finalization clusters. in the composition/copying, capture, and finalization clusters. The selected
producer/reconciliation migration is already complete.
Shorten intermediate lifetimes only after their remaining consumers are clear. Shorten intermediate lifetimes only after their remaining consumers are clear.
Keep correctness changes distinguishable from broader readability refactors. Keep correctness changes distinguishable from broader readability refactors.
4. Apply local sort-key improvements and useful domain sharing. Fold confirmed 4. Apply local sort-key improvements and useful domain sharing. Fold confirmed
dead-code and test cleanup into focused work where convenient. Reassess the dead-code and explicitly scoped test cleanup into focused work where convenient.
optional package and token-matcher changes last. Capture-package extraction is required under Item 9; token-matcher optimization
remains deferred.
This is an ordering guide, not a serial dependency chain. Cheap independent fixes This is an ordering guide, not a serial dependency chain. Cheap independent fixes
can proceed without waiting for broader discussion. Practical reachability and can proceed without waiting for broader discussion. Practical reachability and