Skip to content

docs(audit): close OPP-002 — the AuditTrail shared kernel already exists - #112

Merged
beyondnetPeru merged 1 commit into
developfrom
docs/close-opp-002
Aug 2, 2026
Merged

docs(audit): close OPP-002 — the AuditTrail shared kernel already exists#112
beyondnetPeru merged 1 commit into
developfrom
docs/close-opp-002

Conversation

@beyondnetPeru

Copy link
Copy Markdown
Contributor

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.

layer what reach
Domain/ValueObjects/AuditProps.cs the per-row audit stamp 16 contexts — Geo, Governance, Qa, Tenancy, Sdlc, Integration, Intake, Discovery, Products, Design, Audit, Artifacts, Release, Metrics, Construction
Domain/Audit/AuditEntry + IAuditEntryRepository the append-only trail one; a repository-wide search for a second history repository returns exactly one interface

The 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

AuditProps deliberately does not adopt the Core's shared-kernel AuditProps: the Core's members are CreatedAt/UpdatedAt and mutable-in-place, while the Tracker's are CreatedAtUtc/UpdatedAtUtc on 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

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.
@beyondnetPeru
beyondnetPeru merged commit 50e55a1 into develop Aug 2, 2026
5 checks passed
@beyondnetPeru
beyondnetPeru deleted the docs/close-opp-002 branch August 2, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant