From 57fce85c822cb0a8a7c057400a64cef2892b6f8f Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Wed, 25 Nov 2026 17:46:07 +0000 Subject: [PATCH] Define the remaining audit remediation roadmap --- docs/roadmap/audit-remediation.md | 378 +++++++++++++++++++++++++++ docs/roadmap/audit/catalog.md | 10 + docs/roadmap/audit/discussion.md | 60 +++-- docs/roadmap/core-integration-api.md | 11 +- docs/roadmap/future.md | 4 + 5 files changed, 436 insertions(+), 27 deletions(-) create mode 100644 docs/roadmap/audit-remediation.md diff --git a/docs/roadmap/audit-remediation.md b/docs/roadmap/audit-remediation.md new file mode 100644 index 00000000..be680f56 --- /dev/null +++ b/docs/roadmap/audit-remediation.md @@ -0,0 +1,378 @@ +# Audit Remediation Roadmap + +## Status, Purpose, And Ownership + +**Status:** Target design and scope accepted; detailed implementation planning +and implementation pending. + +This roadmap defines the end state and required work for the remaining +[audit catalog](audit/catalog.md) findings, incorporating the accepted decisions +in the [discussion record](audit/discussion.md). It is the feature/design handoff +to a planning agent, not the worker's detailed execution plan. No application +changes are implemented by this document. + +The catalog owns finding inventory, evidence links, and implementation status. +The discussion preserves decision rationale. This roadmap owns the consolidated +target and scope; a subsequent implementation plan will own ordered worker +stages, concrete dependencies, verification, and progress. Original audit reports +describe their historical baseline and are not instructions to restore superseded +behavior, particularly diagnostic group caps. + +Planning baseline: `f1b62bdf532118ffc62d0e2bdaefc429bb495df2`. The +[core/integration API migration](core-integration-api.md) and its +[review remediation](remediation.md) are complete. CAT-007, CAT-015, CAT-016, and +CAT-034 are resolved. Of the 30 remaining catalog entries, 29 are in scope here; +CAT-033 is deliberately deferred. Recheck affected callers against current source +when planning, since the core migration partially addressed several findings. + +## Goals And Preserved Boundaries + +The resulting application has clear owners for composition, operation execution, +capture, run finalization, and reusable domain mechanics. Ordinary execution avoids +unnecessary source-scale work. Failure preserves completed-work diagnostics and +error causes without retaining obsolete intermediates. Tests protect meaningful +contracts while permitting legitimate changes to prose and private structure. + +Continue the fixed typed pipeline and native ConfigKit, PromptKit, and CommandKit +architecture. Core retains the implemented operation lifecycle; integrations own +domain interpretation, identity, prompts, correction assignments, and fallback +construction. Generic framework changes must remain usable by non-D&D integrations. +No upstream dependency upgrade is required by this roadmap. + +Preserve configured validation, strict/permissive disposition, cache identity and +reuse controls, generated-reference eligibility, domain schemas, durable identity +bytes, and artifact-first output. PromptKit continues to own native structural +validation/repair, continuation mechanics, and backend admission. Maintain the +bounded worker pool without adding another scheduler or retry mechanism. + +The selected behavior changes are diagnostic group-cap removal, whole-source +capture sharing, cooperative process signals, and correction of cataloged defects. +Refactoring elsewhere preserves established configuration, CLI, acceptance, +ordering, and output contracts. Debug layout remains private. No new result +envelope, durable report sidecar, configuration interpreter, resource-management +framework, or generalized normalization engine is selected. + +## Target Design And Required Work + +### 1. Correct Accepted Boundary Inputs + +**Findings:** CAT-001, CAT-002, CAT-011, CAT-012, CAT-013. + +Correct the documented edge cases at their existing owners without narrowing +accepted inputs to make the implementation easier: + +- Generic chunking handles extreme accepted sizes without overflowing allocation + arithmetic or endpoints; ordinary overlap behavior remains intact. +- Timestamp validation checks exact negativity even when float conversion + underflows. Preserve finiteness, precision, zero/negative-zero handling, and + ordering without a new magnitude limit. +- Reconciliation context expansion handles extreme nonnegative radii using + source-distance-aware arithmetic, retaining the existing material budget. +- Generated producer lookup uses distinct structured step/lane keys rather than + delimiter encodings that collide for accepted identifiers. Do not prohibit NUL + characters as a substitute for fixing lookup identity. +- Metadata copying distinguishes finite shared-prefix slice views from real + cycles. Preserve detached concrete containers, cycle rejection, and useful + error paths; do not ban shared backing arrays or use a JSON round trip. + +Reproduce static counterexamples at their actual boundaries and retain focused +regressions alongside ordinary cases. These fixes do not depend on the broader +composition/copying refactor. + +### 2. Source Work Proportional To What Is Needed + +**Findings:** CAT-004, CAT-005. + +Citation text resolution resolves, sorts, and coalesces selected source ranges, +then visits selected units rather than allocating a document-wide bitmap and +scanning the entire document per record. Preserve source order, errors, one +inclusion of overlapping evidence, and newline joining, including empty, sparse, +disjoint, invalid, and non-monotonic-ID cases. + +Prepare one immutable whole-source position index at the run/source lifetime for +sharing by applicable extraction jobs. Retain local construction for standalone +callers. Preserve whole-document resolution, current-source checks on cache hits, +and isolation between runs and sources. A chunk-only index or process-global cache +does not satisfy this target. Select the small passing/ownership API during +planning; do not introduce a generalized caching facility. + +### 3. A Reusable Native Capture Owner And Convenient Evidence + +**Findings:** CAT-003, CAT-024, CAT-032. + +Extract native request capture into a focused framework package. It owns prepared +request hooks/snapshots, native result and exchange evidence, and capture-error +retention, using PromptKit types and the existing `EvidenceWriter` directly. +Core operations and independently executing validators use the same implementation. +This is required ownership work, independent of any performance improvement. + +Pipeline retains operation identity and step/lane/chunk evidence paths. CLI and +recorder retain filesystem allocation, run-level capture lifecycle, and finalization. +Prefer a dedicated capture package over expanding storage-oriented debug; exact +names remain implementation choices. Preserve prepared-value ownership, +cancellation and capture causes, admission behavior, cache-hit evidence, and +existing observations without duplicate preparation or model calls. Do not add +a telemetry service, replacement execution interface, or synchronized writer wrapper. + +Finish guarding expensive debug-only construction at its owning boundaries when +capture is disabled, including deferred chunk outcomes and run-wide envelopes. +The core migration's lazy operation projections are a starting point, not proof +that all CAT-003 work is complete. Required artifact encoding still runs normally. + +For enabled capture, use the most convenient representation: + +- Record original input and complete parsed source once per run. Operation inputs + reference them using clear logical bundle paths through the same capture sink. + Explicit writer consumers receive shared and operation records alike, without + an assumed CLI filesystem root or records written to another destination. +- Keep particular chunks, operation selections, selected reference contents, and + incoming artifacts directly readable within operation evidence initially. +- Keep convenient native prepared messages, responses, and exchanges, including + useful duplication. Reading a prepared request needs no reconstruction tool. +- A complete bundle preserves whole-source context; an isolated operation directory + need not carry a whole transcript. Logical references require no symlink scheme. + +Keep requested capture required and its failures visible. Retain secret-aware +omissions and actual available evidence. No generalized deduplication, capture +modes, silent truncation, quotas, automatic deletion, or heuristic scrubbing is +included. Private filenames remain implementation choices. + +### 4. Completed Diagnostics And One Runner Finalization Boundary + +**Findings:** CAT-006, CAT-008, CAT-009, CAT-022; CLI coordination in CAT-023. + +Use private working state and one clear runner finalization boundary across +success, failure, and cancellation. The returned logical result does not retain +private execution accumulators, normalized working bytes, or reuse bookkeeping +after their last consumers. Extract cohesive source, chunk/map, and output phases +so stage ordering and failure boundaries are readable without a generic dispatcher. + +Collect completed-operation diagnostics independently of lane continuation or +publication eligibility, including after draining work on failure. Preserve +canonical lane/chunk ordering with sparse and out-of-order completions, without +double counting. Incomplete lanes produce no artifacts or generated handoffs. + +Diagnostic volume alone cannot fail an otherwise successful pipeline. Remove the +local producer group-count cap and final warning/non-warning group-count caps, +including collection-level truncation/omission machinery used solely by those +caps. Retain every distinct group, occurrence counts, and representative sampling +within each group, initially the existing three examples and omitted-sample counts. +Do not replace removed caps with configuration or an exhaustive diagnostic ledger. + +Genuine diagnostic-contract, arithmetic-overflow, reporting, and requested-capture +failures remain failures. Preserve the primary and relevant finalization causes +alongside available valid diagnostics, without repeating a failed aggregation. +Preserve cancellation precedence. Existing errors can describe incompleteness; +no new report schema is needed. Keep completion reporting and fallback disclosure. + +Release references to reorder maps, extraction values, and other intermediates +after their final consumers on success and failure, including while slower sibling +lanes continue. Do not clear shared backing storage or discard data needed for +handoff, capture, encoding, or completed-work diagnostics. + +### 5. Clear CLI Lifecycle And Cooperative Signals + +**Findings:** CAT-010, CAT-023. + +Keep the native command declaration small, with a cohesive private invocation and +finalization owner. Preserve one configuration/engine, supplied-value semantics, +capture allocation before preparation, cause retention, and distinct execution, +physical publication, and report-delivery outcomes. The runner returns logical +results; CLI publishes artifacts, completes capture, and presents native reports. +This is separate from runner phase control and introduces no new command framework. + +At the executable boundary, the first SIGINT or SIGTERM cancels the invocation +context so dispatch stops, native requests cancel, started jobs drain, and ordinary +failure/capture finalization runs. A subsequent signal permits ordinary process +termination and may interrupt finalization. Add no shutdown deadline/configuration +or SIGKILL guarantee. Embedded callers retain ownership of their contexts and +receive no process-wide signal handlers from application invocation. + +Cancellation initiates no fallback or model retry and makes no successful completion +claim. Retain existing cache entries, published artifacts, and available debug +evidence under the established lifecycle. Use a small standard-library adapter and +focused offline subprocess coverage with a local fake backend; do not promise +cooperation from collaborators that ignore cancellation. + +### 6. Pipeline Interpretation And Pure Copying At Their Owner + +**Findings:** CAT-014, CAT-017, CAT-018. + +Within the existing pipeline package, provide shared catalog-independent structural +layout and catalog-aware selected-target inventory. Layout establishes ordered +steps/lanes and identities; inventory selects modules/defaults/variants and reference +slots without requiring them to be populated. Complete resolution reuses these +operations. CLI discovers targets, supplies bindings, then checks completeness; +do not introduce a partial/allow-missing mode in the full resolver. + +ConfigKit and its application integration retain loading, imports, inheritance, +source presence, and provenance. CLI retains selector grammar and precedence. +Pipeline resolution/preparation retains complete binding, capabilities, exact type +compatibility, validator selection/order, and generated-dependency checks. + +Place pure copying beside pipeline-owned types. Preserve values and distinguish +copying from trimming, defaults, and normalization. Inventory supported mutable +option containers before consolidating copies; preserve omission, explicit empty, +explicit zero, and detached ownership. Remove redundant copies where ownership +permits, without imposing universal immutability or a reflection-based copier. +Source-metadata cycle handling remains a separate responsibility. + +Decompose resolution into cohesive same-package helpers and per-binding checks +while retaining useful error context. Demonstrate reuse through configuration, +resolver, and CLI callers and independent selection/isolation tests, rather than +moving duplicated logic into smaller files. + +### 7. Family-Owned Rules And Shared Deterministic Mechanics + +**Findings:** CAT-019, CAT-020, CAT-021. + +Put reusable scene checks with a small scene-family domain owner; tiny predicates +may live beside domain types. Normalizers and validators use it. Validator adapters +retain extraction-specific cardinality, assessment classification, and corrective +prose. Codec acceptance shares only identical primitives, preserving differences +such as trimmedness and the optional nature of selectable checks. + +Introduce a pure duplicate-grouping helper returning retained positions and groups. +Start with NPC occurrences, location occurrences, and combat turns. Families supply +eligibility and identity keys, and own sorting, cloning, original-input-index +mapping, and diagnostics. Include spells only if its nil/allocation behavior fits +cleanly. Leave item occurrences separate initially, preserving its bucket-plus- +exact-equality check. Do not collapse distinct evidence, combine evidence ranges, +or make domain eligibility rules uniform to simplify the helper. + +Calculate invariant sorting keys once per normalized record using the existing +combat approach. Preserve ties, invalid-reference ordering, and defensive comparison +for inputs whose canonical form is not established. Genuine evidence tie comparison +may still require linear work. This improvement is independent of duplicate sharing. +Use independent family expectations; no universal normalizer or sorting framework. + +### 8. Explicit Extension Contracts And Maintainable Tests + +**Findings:** CAT-025, CAT-026, CAT-027, CAT-028, CAT-029. + +Document sharing and lifetimes in module internals and interface comments: +prepared extractors, extraction validators, and shared codecs can receive overlapping +calls; per-operation mutable state stays local/operation-owned, intentionally shared +mutable state is synchronized, and shared source is read-only. Describe each stage's +actual call pattern rather than claiming every module method runs concurrently. +The runner waits for dispatched operations, not arbitrary extension goroutines; +extensions own their background work's lifetime relative to borrowed collaborators. + +Custom writers shared across concurrent operations must support concurrent calls; +point to the standard synchronized recorder. Defer a synchronized wrapper until +a concrete serial-only consumer needs one. Link native client/observer/callback +contracts upstream and explain where Notarius shares them. Add no automatic writer +serialization, per-job module construction, or blanket locking. + +Include these test improvements explicitly: + +- Replace incidental production-English assertions and message-location markers + with test-controlled content and behavioral preparation/binding checks. Preserve + schemas, input/default selection, required properties, cache hints, and follow-up + routing. Prompt quality remains a human review concern, not a prose snapshot. +- Replace sleep-induced overlap and unbounded handshakes with explicit start/release + gates, bounded cancellation-safe failure handling, and joining started work. + Preserve worker limits and ordering; test watchdogs create no runtime deadline. +- Separate maintained-example checks and independent resolved fixtures, retaining + useful integration coverage without shared-map execution-order dependence. +- Remove the private run-ID format regex while preserving uniqueness, safe paths, + collision/allocation behavior, and partial-write protection. Keep the separate + versioned session-ID contract and its exact-value protection. + +### 9. Remove Obsolete Metadata And Helpers + +**Findings:** CAT-030, CAT-031. + +Recheck and delete the audit's confirmed unused private policy labels and three +private helpers. Preserve live identity constants/bytes, keys, reason codes, +schemas, guidance, and similarly named live helpers. Do not resurrect policy +fingerprints or alter cache keys to give dead labels a purpose. + +Give the six exported internal `NormalizationPolicy` aliases a short intended-use +review. Remove those without a supported purpose; explicitly defer any whose +purpose remains unclear. Capitalization alone establishes no external API, and +this review requires no broad compatibility initiative. Existing behavioral tests +suffice for declaration deletion; add no count/absence tests. + +## Coverage And Disposition + +All catalog entries have the following disposition; section numbers identify the +target above, not mandatory worker stage numbers. + +| Catalog entries | Disposition / target | +| --- | --- | +| CAT-001, CAT-002, CAT-011, CAT-012, CAT-013 | Required: section 1 boundary correctness | +| CAT-004, CAT-005 | Required: section 2 source work | +| CAT-003, CAT-024, CAT-032 | Required: section 3 capture | +| CAT-006, CAT-008, CAT-009, CAT-022 | Required: section 4 finalization and lifetimes | +| CAT-010 | Required: section 5 signals | +| CAT-023 | Required: sections 4–5 CLI/runner separation | +| CAT-014, CAT-017, CAT-018 | Required: section 6 composition and copying | +| CAT-019, CAT-020, CAT-021 | Required: section 7 domain mechanics | +| CAT-025, CAT-026, CAT-027, CAT-028, CAT-029 | Required: section 8 contracts and tests | +| CAT-030, CAT-031 | Required: section 9 cleanup; aliases have the stated conditional disposition | +| CAT-007, CAT-015, CAT-016, CAT-034 | Already resolved; preserve established behavior | +| CAT-033 | Deferred; retain the matcher until representative workloads justify optimization | + +Deferral does not mean a defect was fixed. No token-matching algorithm replacement, +name-length cap, or new benchmark gate is part of acceptance. Future email/NWS +integrations, broader domain/package migration, release publication, and upstream +feature work are outside this remediation. + +## Planning Handoff And Sequencing + +Prepare one detailed implementation plan for a worker to execute in order. Keep +the completed core migration's plan/history intact. Use this roadmap as the target; +the planner selects concrete Go signatures, files, and independently reviewable +stages, without reopening accepted policy choices or treating historical audit +recommendations as stronger authority than the decisions here. + +Recommended ordering is narrow correctness fixes, ordinary-run source efficiency, +capture ownership/representation, finalization and shutdown, composition/domain +helpers, and remaining cleanup/final acceptance. This is dependency guidance, not +an artificial serial dependency between independent fixes. Improve fragile tests +before relying on them, and update interface documentation with affected changes. +Keep package extraction distinguishable from evidence behavior changes and narrow +bug fixes distinguishable from readability refactors. + +For each worker stage, identify the catalog coverage, scope, prerequisites, +observable completion criteria, relevant validation, and documentation updates. +Verify current callers and partial fixes before prescribing changes. Ensure no +required finding disappears inside a broad refactor and no resolved finding becomes +a second migration. Report any newly discovered conflict rather than silently +strengthening inputs, acceptance, or compatibility requirements. + +The planner should specify a usable intermediate state and focused commits. Detailed +test commands and exact stage boundaries belong in that plan; no new framework or +mandatory test matrix is needed to express them. Handing off or executing that plan +is subsequent work, not part of creating this roadmap. + +## Verification And Completion + +Use [testing policy](../policy/testing.md) to select focused, offline behavior tests. +Correctness regressions must demonstrate the defect at the relevant boundary. +Retain independent domain-output expectations for ordering, identity, and acceptance; +exercise cancellation, capture failure, and completed-diagnostic retention where +lifecycle changes affect them. Run relevant race checks for changed concurrent +paths and repository-wide `go test ./...`, `go vet ./...`, and +`go build ./cmd/notarius` at shared-contract milestones and final acceptance. +Reuse successful checks for unchanged content; default tests need no credentials +or paid model calls. Claim measured speedups only when measured, without a new +coverage, benchmark, complexity, or broad-audit gate. + +Update canonical internal, architecture, authoring, and operator documents when +their behavior lands. Reconcile diagnostic cap removal and whole-source sharing +with ADR-0015/ADR-0024 through successor decisions/status links as appropriate, +preserving accepted ADR bodies. Keep configuration/CLI references unchanged unless +an implemented selected behavior actually requires an update. + +Completion requires all required coverage rows to have implemented target behavior +and appropriate verification, including capture extraction, ordinary-run costs, +failure paths, source/option isolation, family output preservation, and explicit +test cleanup. Record alias-review dispositions. Catalog statuses must identify +what was actually resolved; CAT-033 remains deferred. Canonical documentation, +implementation status, and code must agree. A smaller file, green happy-path test, +or closed finding count alone is not evidence of completion. + +There are no unresolved product or scope decisions. Remaining API details and +stage decomposition are implementation planning choices within these boundaries. diff --git a/docs/roadmap/audit/catalog.md b/docs/roadmap/audit/catalog.md index 4dad2540..a95bb961 100644 --- a/docs/roadmap/audit/catalog.md +++ b/docs/roadmap/audit/catalog.md @@ -14,6 +14,8 @@ another code audit or an implementation plan. The companion [remediation discussion](discussion.md) collects review recommendations and open choices in discussion order. Accepted decisions there qualify proposed remediation; finding statuses here track implementation. +The [Audit Remediation Roadmap](../audit-remediation.md) consolidates the accepted +target and required work for the remaining findings, with CAT-033 deferred. The [Core And Integration API Roadmap](../core-integration-api.md) established the core/integration boundary. The reassessment below distinguishes its completed work from the remaining audit remediation. @@ -567,6 +569,10 @@ Existing focused tests suffice; declaration-only deletion needs no new test. ### CAT-032 — Reusable Native Capture And Pipeline Scoping Share A Home +**Subsequent decision:** [Discussion Item 9](discussion.md#9-cleanup-scope-and-optional-improvements) +selects package extraction as required ownership remediation, independent of +performance benefit. Implementation remains pending. + **Assessment:** Low-priority package-cohesion opportunity, not an import violation. **Source:** [BND-004](11-boundaries.md#bnd-004--native-capture-and-pipeline-scoping-share-one-implementation-home). @@ -580,6 +586,10 @@ cache-hit evidence; add no telemetry service or replacement execution interface. ### CAT-033 — Token Matching Has Avoidable Worst-Case Repeated Work +**Disposition:** Deferred under +[discussion Item 9](discussion.md#9-cleanup-scope-and-optional-improvements) +until representative workloads justify the optimization; not resolved by a code fix. + **Assessment:** Low-practical-priority algorithmic opportunity; original P3. **Source:** [EFF-004](02-efficiency.md#eff-004--avoid-restarting-token-sequence-matching-at-every-position). diff --git a/docs/roadmap/audit/discussion.md b/docs/roadmap/audit/discussion.md index 5dad33d1..111fee43 100644 --- a/docs/roadmap/audit/discussion.md +++ b/docs/roadmap/audit/discussion.md @@ -5,14 +5,15 @@ This document consolidates the review recommendations for the [audit catalog](catalog.md) into an ordered discussion for maintainers. The catalog owns the finding inventory and prioritization; its linked audit reports -own detailed evidence and qualifications. This document owns the open choices -and subsequent discussion decisions, not another audit or a completed -implementation plan. +own detailed evidence and qualifications. This document preserves discussion +decisions and rationale. The [Audit Remediation Roadmap](../audit-remediation.md) +owns the consolidated target and scope; a subsequent implementation plan will own +detailed worker stages. Prepared on 2026-11-24 against catalog revision -`5a0650250686353cf34fbbbf0e780b04f60e70c1`. Each item distinguishes accepted -decisions from proposals still under discussion. Acceptance selects the intended -design; implementation remains pending unless explicitly recorded otherwise. +`5a0650250686353cf34fbbbf0e780b04f60e70c1`. All discussion decisions are now +accepted with the recorded conditional/deferred scope. Acceptance selects the +intended design; implementation remains pending unless explicitly recorded otherwise. The review supports the existing typed pipeline and native-kit architecture. The strongest opportunities are removing repeated interpretation, unnecessary @@ -20,10 +21,10 @@ work, and retained state. No replacement workflow, retry, configuration, or resource-management framework is indicated. Smaller files and more helpers are useful only when they make ownership and callers clearer. -Work through Items 1–10 in order. Items 1–3 contain explicit behavior choices; +Items 1–10 are settled. Items 1–3 contain explicit behavior choices; Items 4–8 principally need bounded implementation analysis. Items 9–10 settle scope and sequencing. This discussion order is not a mandatory implementation -order, and unresolved choices need not delay independent fixes. +order, and independent fixes need not wait for unrelated refactors. ## 1. Diagnostic Capacity And Pipeline Success @@ -362,7 +363,8 @@ remain outstanding until the selected work lands; deferral is not a code fix. ## 10. Remediation Sequence And Verification **Scope:** Incorporate the preceding decisions into a focused implementation plan. -**Status:** Proposed sequence, not implementation authorization or new release gates. +**Status:** Accepted planning and verification direction. Formal roadmap prepared; +detailed implementation planning and execution remain pending. Recommended approach: @@ -370,20 +372,29 @@ Recommended approach: CAT-011–CAT-013. Native classification/test-oracle handling in CAT-007 is resolved. Preserve supported inputs rather than imposing new restrictions. Reproduce static counterexamples at their real boundaries when implementing the fixes. -2. Prioritize ordinary-run costs in CAT-003–CAT-005 alongside failure visibility - in CAT-008/CAT-009. Keep disabled capture cheap, avoid full-document scans for - sparse citations, and share one immutable source index at the appropriate - run/source lifetime. Preserve standalone use and current-source cache checks; - no process-global cache or new cache-key dimensions are needed. -3. Add signal cancellation after Item 3, then undertake coherent ownership work - in the composition/copying, capture, and finalization clusters. The selected +2. Address ordinary-run source costs in CAT-004/CAT-005: avoid full-document scans + for sparse citations and share an immutable source index at run/source lifetime. + Preserve standalone use and current-source cache checks without a process-global + cache or new cache-key dimensions. +3. Extract native capture and address disabled-capture costs and whole-source + representation (CAT-003/CAT-024/CAT-032). Keep the package move distinguishable + from behavior changes. +4. Implement private working state, completed-diagnostic retention, group-cap + removal, and clear runner/CLI finalization. Add signal cancellation against that + lifecycle; shorten intermediate lifetimes after their final consumers are clear. +5. Consolidate composition/copying and shared domain mechanics, including local + sort-key preparation, as independently reviewable units. The selected core producer/reconciliation migration is already complete. - Shorten intermediate lifetimes only after their remaining consumers are clear. - Keep correctness changes distinguishable from broader readability refactors. -4. Apply local sort-key improvements and useful domain sharing. Fold confirmed - dead-code and explicitly scoped test cleanup into focused work where convenient. - Capture-package extraction is required under Item 9; token-matcher optimization - remains deferred. +6. Finish concurrency documentation, obsolete declarations, test cleanup, and + final acceptance. Improve fragile tests before relying on them during earlier + stages and update interface documentation alongside affected code. The token + matcher remains deferred. + +Use one focused implementation plan linking worker stages to catalog findings and +accepted scope, with dependencies, observable completion criteria, verification, +and documentation updates. Keep finding status in the catalog and rationale here; +do not copy the audit reports into the plan. The +[formal roadmap](../audit-remediation.md) defines the end state for that handoff. This is an ordering guide, not a serial dependency chain. Cheap independent fixes can proceed without waiting for broader discussion. Practical reachability and @@ -403,4 +414,7 @@ Keep the catalog's evidence and qualifications linked rather than duplicating all ten reports in an implementation plan. CAT-007, CAT-015, CAT-016, and CAT-034 are resolved and require no further remediation within their stated scope. -**Decision:** Pending. +**Decision:** All three recommendations accepted: one focused implementation plan, +the dependency-aware sequence above, and boundary-focused verification followed +by repository-wide acceptance. No additional broad audit or new test threshold is +required. Detailed stages remain the planning agent's responsibility. diff --git a/docs/roadmap/core-integration-api.md b/docs/roadmap/core-integration-api.md index db922f4c..65d6c4cd 100644 --- a/docs/roadmap/core-integration-api.md +++ b/docs/roadmap/core-integration-api.md @@ -2,13 +2,16 @@ ## Status And Purpose -**Status:** Target design and API decisions accepted; implementation pending. +**Status:** Implemented and reviewed for the selected core/integration boundary. +See [final acceptance](implementation.md#stage-24--perform-final-sprint-acceptance) +and [review remediation](remediation.md). -This roadmap is the next implementation priority, before the remaining -[audit catalog](audit/catalog.md) remediation. It develops +This roadmap records the completed prerequisite to the remaining +[audit remediation](audit-remediation.md). It develops [discussion Item 5](audit/discussion.md#5-producer-state-and-shared-reconciliation-lifecycle) into an integration-author API initiative, rather than a private-helper cleanup. -The document is a plan; this pass changes no application code. +The target design below is retained as the migration record; its baseline section +describes the pre-migration state. [Implementation Plan](implementation.md) owns the ordered implementation stages and stage-specific validation. This document owns scope, target behavior, and diff --git a/docs/roadmap/future.md b/docs/roadmap/future.md index 2ff9d3ee..b2a04e40 100644 --- a/docs/roadmap/future.md +++ b/docs/roadmap/future.md @@ -5,6 +5,10 @@ configuration, operations, internal, and integration docs. This backlog records proposed extensions to that implementation. Items below are ordered roughly by value and specificity, not as committed release dates. +The accepted [Audit Remediation Roadmap](audit-remediation.md) is the current +follow-on to the completed core/integration migration. It owns that remediation's +target and scope; the proposals below remain separate future work. + ## Near-Term D&D Pipeline ### Evaluate Spell Extraction And Normalization