Affiliations and dated roles integration
Verification Boundary
Contact aggregate relationship writes, organization affiliation reads, date reconciliation and role assignment cross real relational and transaction boundaries.
What This Suite Proves
The tests establish affiliation identity and dated role periods, primary selection, effective current/past reads, organization-derived contact details and link removal. Automatic-role tests compare assignments with stored results. Reconciliation tests cover business-day boundaries and deferred follow-up handling, including failures that keep later work pending.
What It Does Not Prove
Classification catalogue CRUD belongs to the types and settings group. These service tests do not exercise the schedule trigger or deployed queue delivery. A successful computed relationship plan alone is insufficient evidence for a browser lifecycle or the permission matrix at the public dispatcher.
Level and Rationale
Overlapping periods, source references and automatic-role writes join several tables. Real database state is necessary to establish identity preservation, atomic relationship replacement and the behavior of deferred work after a day changes. Isolated date arithmetic does not cross those seams.
Real Dependencies and Test Doubles
PostgreSQL, the affiliation persistence functions, role assignment and reconciliation services are real. Test execution contexts and explicit business-date fixtures provide the workspace calendar. Declared follow-up seams isolate failures; they do not represent successful remote settlement unless the source asserts the persisted effect.
Must Not Be Doubled
Never replace affiliation and role tables, effective information views or the transactions under test. Keep the actual time-zone conversion for date-boundary cases. A supplied organization page or role list would bypass the graph and could hide a relationship assigned to the wrong workspace.
Fixtures and Isolation
Fixtures create their own people, employers, affiliation types and role periods, then remove them in reference order. Date follow-up tests own the watermark and pending-work premises they change. Run this group without another reconciliation suite changing the same seeded workspace calendar or dependency seam.
Determinism and Retries
The business-date fixtures include time-zone boundaries and explicit day windows. UUID values are compared through fixture variables where generated. Stages preserve the original refusal and cleanup evidence; automatic retries would blur whether pending work settled once or was applied repeatedly.
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
The integration tier proves local reconciliation effects and recovery, while the public date endpoint only adds dispatch and authority checks. It cannot establish that production enables the schedule. The existing timing, authority and overlapping-period findings remain the statement of missing coverage.