Repository navigation
feat(contracts): schema, repositories, merge-field engine, and audit registrations (TASK-0064) - #78
Merged
Ediminator merged 3 commits intoNov 6, 2026
Conversation
…udit (TASK-0064) Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
…ration assertions Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
… and public token resolution (TASK-0064) Signed-off-by: Ediminator <211899731+Ediminator@users.noreply.github.com>
Ediminator
deleted the
feat/task-0064-contracts-schema-repositories-merge-engi
branch
November 6, 2026 22:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
TASK-0064control/ownlight/backlog/TASK-0064-contracts-schema-repositories-merge-engine-and-audit.md8b69468dd648ec86c7d2d9a3ca42bac5562c3133)Summary
drizzle/0022_nifty_blazing_skull.sql):contract_templates(id,name,slug,description,project_type_key,title_en,title_de,body_en,body_de,is_default,is_active,position, timestamps) andcontracts(id,project_id,client_id,proposal_id,template_id,contract_number,title,locale,status,rendered_body,merge_values_snapshot,canonical_text_sha256, SES signature & countersignature evidence columns, PDF storage seal columns, token hash/revocation/expiry, reminder tracking, timestamps).studio_settingswith 10 studio signatory and physical business address columns (contract_signatory_name,contract_signatory_title,contract_countersignature_mode,studio_address_line1,studio_address_line2,studio_postal_code,studio_city,studio_country_code,studio_phone,studio_email).src/server/db/seeds/contracts.ts) and committed AcceptedADR-0019(docs/architecture/adr/0019-contracts-and-e-signature.md).src/server/contracts/merge-engine.ts):client,project,shoot,package,studio,contract) with strict HTML-escaping, C0 control character stripping, unmapped token reporting, and canonical UTF-8 SHA-256 snapshot freezing (createCanonicalSha256).src/server/contracts/template-repo.ts,src/server/contracts/repo.ts,src/server/studio/signing-settings.ts,src/server/contracts/schema.ts):requireActorauthorization, sequentialCTR-YYYY-NNNNcontract numbering, draft-only immutability enforcement (ContractImmutableError), public cookieless-safegetContractByTokenHash(enforcingtokenRevokedAt === nulland maskinginternalNotes: null), and strict Zod validation.src/server/audit/allowlist.ts,src/server/timeline/registry.ts,docs/privacy/data-inventory.md):contract_template.*,contract.*,studio_settings.contract_updated), 4 localized timeline events (contract.sent,contract.signed_by_client,contract.countersigned,contract.voided), and GDPR Art. 30 data inventory entries.Validation
--profile full): 13/13 steps PASS (stmts:90.86%, branches:85.63%, funcs:87.33%, lines:91.16%)validator): PASS (0 blocking)security-privacy-auditor): PASS (0 blocking)