سامانه صدور فاکتور و حسابداری
Plan Office C7 full-text OCR provenance
davoodmehraban89 committed
Oct 1, 2026 at 00:22 UTC
d5fd371e14b097356339c2c68d09aae61c31c0ad
1 file changed
+22
docs/superpowers/plans/2026-10-01-office-slice-c7-fulltext-ocr-provenance.md
new
+22
@@ -0,0 +1,22 @@
1
+# Office Slice C7 — Full-text Archive + OCR Provenance/Correction Plan
2
+
3
+Date: 2026-10-01
4
+
5
+**Goal:** Add tenant-safe server-side full-text archive search and append-only OCR-text provenance/correction without claiming real Persian OCR accuracy.
6
+
7
+## Scope
8
+- Weighted PostgreSQL full-text search over correspondence identity, subject, counterparty, body, archive metadata and latest effective OCR text.
9
+- `simple` text-search configuration, validated against Persian tokens in Production.
10
+- Append-only `ocr_text_recorded` evidence with provider-output provenance and human-correction lineage.
11
+- Human correction must reference and preserve the prior raw OCR payload.
12
+- Latest OCR RPC for controlled correction UI.
13
+- Archive UI shows OCR state/version/source and uses ranked server search.
14
+- No OCR engine/provider is connected in C7; accuracy remains unverified until representative real scans are processed and measured.
15
+
16
+## Security invariants
17
+1. Tenant isolation, entitlement, confidentiality and source-record read access remain server-authoritative.
18
+2. Only Office archive/configure authority may record OCR text or corrections.
19
+3. Direct audit-evidence forgery remains blocked.
20
+4. Human correction requires prior OCR evidence and cannot replace raw provider output.
21
+5. Public RPC wrappers are SECURITY INVOKER; privileged implementations remain private with empty search_path.
22
+6. C1-C6, ELI, accounting and Golden gates remain green.