Skip to content

[C] #514: per-module chronological census, splitting BusinessRecordModel's hand-maintained arrays #969

Description

@mforce

Track C of #514, carved out of #858 during the 2026-09-26 audit. Enforcement and structure only, no behaviour change. No prerequisites: this can ship at any time, independently of every other Track C slice.

The problem

src/Cluckwork.Infrastructure/Persistence/BusinessRecordModel.cs is 153 lines holding two hand-maintained arrays:

  • ChronologicalListTypes (:21-34), the census of business records that are paged or read by time
  • MappedExclusions (:36-48), the deliberate exemptions

ValidateCensus (:84-111) walks the EF model against them. #819 requires every new mapped table to be classified through one of these, so every module must edit one shared file for every new time-paged table. The list already spans six modules, and it grew again in #912 when SalesOrderItem was added.

This is the one item in #858 that degrades with every feature regardless of whether anything ever goes behind a contract, and it is the only part of Track C with nothing in front of it.

Scope

  • Each module contributes its own chronological types and its own exclusions, declared beside that module's code rather than in one shared array.
  • The contributions are merged before ValidateCensus runs. The walk and the validation stay centralized and unchanged.
  • No dependency-injection changes, no contract types, no seam work, no schema change, no migration.

Done when

Mutation Expected
add a mapped, time-paged table to a module and contribute nothing red, naming the table and the module that owns it
contribute a type that is not mapped red
contribute the same type from two modules red, duplicate contribution
delete a module's contribution while its tables remain red
move a type's contribution between modules with no other change green

ValidateCensus's existing assertions pass unedited, and the EF model digest is identical before and after.

Explicitly not in this slice

No module goes behind a contract. No ICreatedRecord / IMutableRecord classification changes. AuditEvent stays excluded per #819. The other items in #858 are untouched.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiAPI/endpoint layerepic-514Modular monolith architecture (#514)priority:tier4Deferred or speculativesize:SHours to a day; few files, no migrationsliceThin vertical work itemtrack:C#514 Track C — moves production code; UNSCHEDULED, needs authorisation

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions