Organization aggregate persistence
Verification Boundary
Organization persistence and its owned detail tables are exercised against PostgreSQL, including parent hierarchy and archived organizations.
What This Suite Proves
Organization rows, addresses, phone numbers and custom values are written and read through their persistence boundaries. Field-rule tests distinguish writable values from computed values. Archive tests establish the stored archive stamp, retained affiliation context and restoration behavior. Read tests preserve permanent logo references and organization projections.
What It Does Not Prove
Contact correction is outside this group. Compliance calculations and attention publishing are registered separately, even though an organization read includes their results. A direct service refusal does not establish that an unauthorized HTTP caller is denied; use the local API suite for that boundary.
Level and Rationale
Parent references, workspace constraints and archive state need a real database. A mocked organization answer cannot establish that children still identify their parent, that persisted details follow the write, or that archive state survives a later independent read.
Real Dependencies and Test Doubles
The organization persistence functions, execution context, PostgreSQL constraints and archive functions are real. Logo preparation uses the asset test seams where declared by the individual spec; remote storage availability is outside this proof. The prepared database supplies the reference classifications used by the fixtures.
Must Not Be Doubled
Keep the organization row and detail tables, parent constraints and archive transactions real. A replacement hierarchy read would hide a broken reference, and a save-answer assertion without a fresh read would only establish mapping rather than durability.
Fixtures and Isolation
The group creates named organizations and any required parent records. Table tests start from acceptable rows before violating a particular constraint. Cleanup follows dependency order so children and detail rows do not prevent parent cleanup; fixtures do not authorize changes to unrelated shared records.
Determinism and Retries
Fixed hierarchy fixtures and explicit expected values make the graph stable. Archive instants are compared using the expectations the source declares rather than an invented wall-clock performance bound. Mocha stages preserve the original setup failure, and this register adds no retry policy.
How It Runs
Run the command in the frontmatter from the service repository after preparing the test database. It selects every file in this aggregate register under the repository Mocha bootstrap and runs serially. This is the aggregate selection of the integration gate; the complete repository integration command includes other modules and is wider than this register.
Coverage Gaps
Organization persistence does not prove a console editor, complete historical rendering or asynchronous compliance notice delivery. The organization field, archive and dependency-race findings remain open where they lack direct assertions. Public archive and delete settlement is assessed in the API lifecycle suite.