Repository navigation
Description
Verified DDD / documentation gap
Live #312 exact head 5fa9b191864b11f6a842c64a84e03e5a532525de creates the persisted relation document_record_persist_receipt in migration 0024_document_record_idempotent_persistence.sql and treats it as the authoritative append-only replay receipt for document_records persistence. The same head's canonical docs/DATA_MODEL.md and docs/ERD.md do not name that relation, and scripts/foundation-contract-core.mjs does not include it in DATABASE_OBJECT_NAMES or MIGRATION_BACKED_DATABASE_OBJECT_NAMES.
This leaves code, DDD documentation, and the migration-backed logical-object validator out of alignment: the repository can preserve migration 0024 while the canonical model/ERD and migration-backed identity contract remain unaware of the new persisted aggregate-support relation.
Owner boundary
This is a document_records owner repair on the #107 → #312 stack. Do not move replay truth into talent_acquisition, people_core, #307, or a cross-service SQL/shared-kernel schema. document_record_persist_receipt remains tenant-scoped, PII-minimized, append-only persistence evidence owned with persist_document_record_once(...).
Acceptance
- Add
document_record_persist_receiptto the canonical Data Model with its purpose, tenant scope, idempotency-key/semantic-digest binding, committed document identity, receipt digest, database-owned time, append-only semantics, and explicit exclusion of document bytes/free-form HR content. - Add the receipt relation and its tenant/document cardinality to
docs/ERD.mdwithout implying ownership outsidedocument_records. - Extend the canonical database-object/migration-backed inventory so a future rename/removal of
document_record_persist_receiptfails repository validation rather than silently drifting. - Add/adjust regression coverage so the migration-backed validator proves the receipt table is present in executable migration SQL and is not satisfied by comments/literals.
- Keep ADR 0309, TRACEABILITY, OPERABILITY and TEST_STRATEGY consistent; do not mark protected/released maturity while feat(document-records): make persistence retries idempotent #312 is stacked Draft.
- Reseal
manifest.jsonfrom exact final bytes and rerun the canonical Foundation validator plus focused Node/Python contracts. - Reconcile the resulting exact feat(document-records): make persistence retries idempotent #312 authority into descendant feat(packaging): implement CandidateDocumentDisposition packet contract #307 metadata without copying the mutable receipt schema into the consumer.
No gate weakening, feature-local workflow, temporary base retarget, force push, destructive rebase, self-approval, or predecessor GREEN transfer.
Activity
seonghobae commentedon Sep 12, 2026
Current owner repair is now ordinary-forward on #312 exact
b996e19090e5cc38ef0a4d41a8b4de6d561b89d8.Implemented lineage:
1b714de0050276832e5e656a9065e65b89580b4a: canonical Data Model registersdocument_recordanddocument_record_persist_receipt, including tenant/idempotency identity, semantic/receipt digests, first committed document identity, database-owned time, PII exclusion, replay semantics, and creation/retry-only lifecycle scope.792a9060807cf225eeec4e7a9d90346a978ec64f: ERD initially registered the receipt relation.ce7a5807fcf109fe2588d94f3eeef62f18f995f0: receipt added toDATABASE_OBJECT_NAMESandMIGRATION_BACKED_DATABASE_OBJECT_NAMES.f8d035c2e65401149612023a18d99bba370ea425: focused regression requires executableCREATE TABLE document_record_persist_receipt; comments, quoted strings, and dollar-quoted bodies cannot satisfy migration identity.1ba3a15ef3e0c9f60e3b5f36526271382610cc95: resealed the 96-artifact manifest. Exact-treenpm run validatepassed all 56 Node tests plus Python/Foundation/OpenAPI/dispatcher validation, generated manifest bytes matched, andgit diff --checkpassed.||--||overstated total dataset cardinality because migration 0024 does not backfill historicaldocument_recordrows.0bdf9012d4f46e52b482694e6c0272b38d18d816corrects it to zero-or-one receipt per document while preserving exactly-one receipt for first commits throughpersist_document_record_once(...).b996e19090e5cc38ef0a4d41a8b4de6d561b89d8reseals that corrected ERD (SHA-256 2fef217f1b7789685dcd7cc37fef25782c2bb48268b5e39001293a9cbb52f755, 8,217 bytes / 75 lines).The issue remains open rather than being prematurely closed. #312 is still a stacked Draft: protected-base PostgreSQL/Foundation admission, exact-head hosted checks, qualifying independent review, and downstream #307 authority reconciliation remain prerequisites before this gap can be considered integrated.