docs(audit): close OPP-002 — the AuditTrail shared kernel already exists - #112
Merged
Conversation
The row says "5+ contexts implement immutable histories" and proposes extracting an AuditTrail shared kernel. Measured today: the shared kernel already exists in two layers, and no context has its own. Domain/ValueObjects/AuditProps.cs is a single audit stamp used by SIXTEEN contexts. Domain/Audit/AuditEntry plus IAuditEntryRepository is one append-only trail - a repository-wide search for a second history repository returns exactly one interface. The strongest evidence is GT-588's signing wire. It signs every governed decision by decorating that single interface, and that only works because gate evaluation, approval recording, decision publication and agent turns already write through it. Five paths, one trail. The duplication this row assumes would have made that decorator impossible. Append-only is enforced by AuditAppendOnlyTests, which fails if either the repository or the aggregate grows a mutator. One real thing the row was circling, recorded rather than lost: AuditProps deliberately does NOT adopt the Core's shared-kernel AuditProps, because the Core's members are CreatedAt/UpdatedAt and mutable-in-place while the Tracker's are CreatedAtUtc/UpdatedAtUtc on immutable records the persisted schema depends on. That divergence is written in the type's own docstring citing ADR-0071 - a deliberate deviation with a reason, not the missing extraction this row describes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The row says "5+ contexts implement immutable histories" and proposes extracting an AuditTrail shared kernel. Measured today: it already exists, in two layers, and no context has its own.
Domain/ValueObjects/AuditProps.csDomain/Audit/AuditEntry+IAuditEntryRepositoryThe evidence that settles it
GT-588's signing wire. It signs every governed decision by decorating that single interface — and that only works because gate evaluation, approval recording, decision publication and agent turns already write through it. Five paths, one trail. The duplication this row assumes would have made that decorator impossible to write.
Append-only is enforced by
AuditAppendOnlyTests, which fails if either the repository or the aggregate grows a mutator.One real thing the row was circling
AuditPropsdeliberately does not adopt the Core's shared-kernelAuditProps: the Core's members areCreatedAt/UpdatedAtand mutable-in-place, while the Tracker's areCreatedAtUtc/UpdatedAtUtcon immutable records that the persisted schema depends on. That divergence is written in the type's own docstring citing ADR-0071.It is a deliberate deviation with a reason, not the missing extraction this row describes — recorded here so closing the row does not bury it.
Board: 0 OPEN, 1 BLOCKED (GAP-004), 107 RESOLVED.
🤖 Generated with Claude Code