Skip to content

Move the audit append path into Base - #2253

Merged
peterdrier merged 3 commits into
mainfrom
claude/project-thread-2c8v71
Nov 3, 2026
Merged

peterdrier merged 3 commits into
mainfrom
claude/project-thread-2c8v71

Conversation

@peterdrier

Copy link
Copy Markdown
Owner

Requested by Peter · project thread

What

PR 2 of 4 (after #2252). IAuditLogService (with AuditLogEntrySnapshot) and AuditActionDefinition with IAuditActionContributor / AuditActionContributor move from Humans.AuditLog/Contracts/ to src/Humans.Base/AuditLog/. Namespace stays Humans.AuditLog.Contracts (Peter's call for this series), so no using changes.

54 projects drop their Humans.AuditLog reference (30 src, including Email.Contracts and Finance.Contracts, plus test projects). In src, AuditLog stays referenced by:

  • Web (composition)
  • Agent (IAuditViewerService) and GoogleIntegration (ILegacyGoogleSyncAuditReader), whose contracts stay in the section
  • Calendar, Expenses, Store, Teams, Tickets and Users, whose views render <vc:audit-log> and need the assembly for @addTagHelper

Why

Most of the 37 sections referenced AuditLog only to write audit rows or declare actions (~100 lines with Base-only dependencies).

Existing surface checked

No new durable surface: existing public types change assembly, not shape. One XML cref to IAuditViewerService (which stays in the section) became <c>.

Checklist

  • Review tier: tier:standard (wide reference change, no behavior change).
  • No migration edited by hand: no migrations.
  • No NOT NULL column: no schema change.
  • Targeting main on peterdrier/Humans, branched off origin/main.

Docs: AuditLog.md (also drops the stale Humans.Gdpr reference left over from #2252, and Debug from the <vc:audit-log> consumer list since it only names the tag in text) and health.md; reference comments in seven csproj files.

Verification: dotnet build Humans.slnx -v quiet (0 errors) and dotnet test Humans.slnx -v quiet, no failures. Integration tests not run (opt-in).


Generated by Claude Code

IAuditLogService (with AuditLogEntrySnapshot) and AuditActionDefinition with its
contributor contract move from Humans.AuditLog/Contracts to Humans.Base/AuditLog,
namespace unchanged. Projects that only wrote audit rows or declared actions drop
their AuditLog reference. AuditLog is still referenced by Web, Agent (viewer),
GoogleIntegration (legacy reader) and the six sections whose views render
<vc:audit-log>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186neA78CpJeYKoxRTGsySg
@peterdrier peterdrier self-assigned this Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Reviewed commit 9df7260. 1 inline finding(s) posted.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

PR Surface Report

Compared 3929aea0...3de6dd02. Scored with reforge 0.32.0.

Summary: 59 changed file(s) | EF migrations: 0 added file(s), max 0/1 per context

Reforge Surface Score

metric base head delta
total 61544 61554 +10
surface 14394 14394 0

Section Deltas

section base head delta
Base 3572 3652 +80
AuditLog 417 347 -70

Section Size & Complexity Deltas

section LOC delta files delta classes delta cognitive p95 delta
AuditLog -88 -2 -3 0
Base +88 +2 +3 0
Corpus 0 0 0 0

Corpus is the solution-wide rollup (same source as Corpus Size & Complexity below), not a sum of the section rows above - cognitive p95 in particular doesn't compose across sections.

Rule Deltas

rule base head delta
sectionSize 7189 7199 +10

Published Write Surface

16 of 51 sections publish write capability, 51 interfaces (0).

Newly published

  • Base -> IAuditLogService

No longer published

  • AuditLog -> IAuditLogService

Interface Surface

No new interfaces or interface members.

Diff Size

bucket added deleted
code 9 41
tests 0 25
docs 12 10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186neA78CpJeYKoxRTGsySg
@peterdrier

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T11:11:42.380598Z 495e063 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

/// <summary>For a caller that needs rows as data (the issue thread). Pages use <c>&lt;vc:audit-log&gt;</c>.</summary>
Task<IReadOnlyList<AuditLogEntrySnapshot>> GetFilteredEntriesAsync(

P1 Badge Keep AuditLog query contracts out of Base

Moving these query methods and AuditLogEntrySnapshot with the append seam exposes AuditLog-owned reads and a section DTO through Base, which every section references. This creates a second public face for AuditLog and allows future consumers to query the section without declaring a dependency on its contract; move only the LogAsync seam to Base and leave the read methods/snapshot in AuditLog's Contracts surface.

AGENTS.md reference: AGENTS.md:L21-L23

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186neA78CpJeYKoxRTGsySg
@peterdrier

Copy link
Copy Markdown
Owner Author

Re the Codex P1 (keep the AuditLog query methods out of Base): traced it. The two reads on IAuditLogService have four callers: GetFilteredEntriesAsync from Users (DuplicateAccountService), Issues (IssuesService) and Expenses (ExpenseReportService); GetEntityIdsForEntityTypeActionsAsync from Shifts (ShiftsController). Users and Expenses still reference AuditLog for <vc:audit-log>, so splitting the reads into a section-owned contract would put the reference back only on Issues and Shifts. It also means a new public interface, which is Peter's call. Asked him; leaving this PR as is until he decides.


Generated by Claude Code

@peterdrier
peterdrier merged commit 4599514 into main Nov 3, 2026
7 checks passed
@peterdrier
peterdrier deleted the claude/project-thread-2c8v71 branch November 3, 2026 13:33
peterdrier pushed a commit that referenced this pull request Nov 3, 2026
#2253 moved IAuditLogService into Base whole, reads and AuditLogEntrySnapshot
included. Base now holds only the two LogAsync overloads. Issues, Expenses
and Users read through IAuditViewerService.GetFilteredAsync; Shifts' orphan
scan reads GetEntityIdsForEntityTypeActionsAsync, now on the viewer.
AuditLogEntrySnapshot is internal to the AuditLog section again. Issues and
Shifts get their AuditLog reference back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186neA78CpJeYKoxRTGsySg
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.

2 participants