1.8 KiB
1.8 KiB
Task H.5.1: PDF Integrity Audit & Payload Parity
Files Added
scripts/audit-template-version-integrity.tsscripts/audit-placeholder-integrity.tsscripts/audit-payload-parity.tsscripts/audit-approved-snapshot-parity.tsscripts/generate-pdf-integrity-report.tsdocs/business/pdf-placeholder-registry.mddocs/implementation/task-h51-pdf-integrity-audit.md
Files Modified
package.jsonscripts/generate-pdf-audit-report.tsdocs/implementation/pdf-parity-checklist.mddocs/business/pdf-mapping-registry.mddocs/implementation/technical-debt.mdscripts/pdf-audit-utils.ts
Integrity Coverage
- template-version integrity checks active template uniqueness, active version uniqueness, orphan mappings, and approved template-version references
- placeholder integrity checks duplicate names, typo-like names, unmapped placeholders, dead mappings, and reserved dynamic topic names
- payload parity computes SHA256 hashes for preview, generation, and computed snapshot payloads
- approved snapshot parity compares stored snapshot payloads against computed snapshot payloads when they exist
- integrity summary writes machine-readable artifacts into
artifacts/pdf-audit/
Verification Result
npx tsc --noEmitpassednpm run audit:pdfruns the full H.5 + H.5.1 stack- current integrity result is expected to be
WARNINGwhen the audit fixture has not yet generated a persisted approved snapshot/artifact
Remaining Risks
- stored approved snapshot parity still depends on generating a real approved PDF artifact for
QT-H5-AUDIT - template field
lineis still treated as a tolerated designer-owned oddity rather than a normalized mapping field - the audit stack validates payload integrity and runtime parity, not screenshot-level pixel parity