diff --git a/docs/roadmap/audit/discussion.md b/docs/roadmap/audit/discussion.md index 28e5b992..3a8bb76a 100644 --- a/docs/roadmap/audit/discussion.md +++ b/docs/roadmap/audit/discussion.md @@ -283,21 +283,34 @@ implemented. ## 8. Extension And Capture Concurrency Obligations **Finding:** CAT-025. -**Status:** Proposed documentation clarification; optional support choice remains open. +**Status:** Accepted documentation scope; implementation pending. Document the actual shared-instance, immutable-source, callback, and operation lifetime model in canonical internals and interface comments. Current default implementations were not found to race; this is clarity for extension authors -and direct framework consumers. +and direct framework consumers. Prepared extractors, extract validators, and +shared codecs can receive overlapping calls. Keep per-operation mutable state +local or operation-owned and synchronize intentionally shared mutable state. +Source data shared by operations remains read-only. Describe the call pattern by +interface and stage, including merge/normalization following completed extraction +for a lane, without implying every method is invoked concurrently. The runner +waits for dispatched operations, not arbitrary extension-created background work; +extensions must manage that work's lifetime relative to borrowed collaborators. -The recommendation is to state existing caller-side concurrency obligations for -explicit capture writers and point to the safe recorder. Supporting serial-only -writers would be a separate choice. If needed, serialization must wrap the shared -writer at the appropriate lifetime; separate operation mutexes do not serialize -one shared sink. No general addition of locks or serialization of extraction is -proposed. Upstream-owned callback/client rules should remain linked upstream. +State the existing caller-side obligation for custom capture writers shared across +concurrent operations to support concurrent calls, and point to the standard +synchronized recorder. Defer an optional synchronized writer wrapper until a +concrete serial-only consumer needs it. If introduced later, all users of the +underlying writer must share the same wrapper; separate operation mutexes do not +serialize one shared sink. No automatic core serialization, per-job module +construction, or general addition of locks is selected. -**Decision:** Pending. +Explain where Notarius shares native clients, observers, and callbacks, linking +to upstream-owned concurrency contracts rather than restating their guarantees. + +**Decision:** All three recommendations accepted as above, including deferral of +the optional writer wrapper. Remaining work is documentation and verification; +CAT-025 remains outstanding until that work is implemented. ## 9. Cleanup Scope And Optional Improvements