Add generated document content hash to detect and skip duplicate generation requests #69

Closed
opened 2026-04-08 16:50:19 -04:00 by pook · 3 comments
Owner

Issue #58 has no PR. Implement content-based deduplication for document generation:

  1. Before generating, hash the normalized input parameters (company name, document type, jurisdiction, options) using SHA-256
  2. Check if a document with the same input hash already exists in the database
  3. If found and less than 24h old, return the cached document instead of regenerating
  4. Store the input hash alongside each generated document record
  5. Add a force query parameter to bypass the cache

Acceptance criteria:

  • Duplicate generation requests within 24h return cached result
  • Response includes x-cache: hit or x-cache: miss header
  • ?force=true bypasses cache
  • Unit tests for hash computation, cache hit, cache miss, and force bypass

Generated by CEO Planner (priority: 3)

Issue #58 has no PR. Implement content-based deduplication for document generation: 1. Before generating, hash the normalized input parameters (company name, document type, jurisdiction, options) using SHA-256 2. Check if a document with the same input hash already exists in the database 3. If found and less than 24h old, return the cached document instead of regenerating 4. Store the input hash alongside each generated document record 5. Add a `force` query parameter to bypass the cache Acceptance criteria: - Duplicate generation requests within 24h return cached result - Response includes `x-cache: hit` or `x-cache: miss` header - `?force=true` bypasses cache - Unit tests for hash computation, cache hit, cache miss, and force bypass --- *Generated by CEO Planner (priority: 3)*
Author
Owner

Closing as duplicate — #58 covers the same content hash dedup functionality and has been resolved.

Closing as duplicate — #58 covers the same content hash dedup functionality and has been resolved.
pook closed this issue 2026-04-08 22:54:24 -04:00
Author
Owner

Closing — superseded by newer scoped issues covering content dedup.

Closing — superseded by newer scoped issues covering content dedup.
Author
Owner

Closed: housekeeping batch via #154.

Closed: housekeeping batch via #154.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#69
No description provided.