@davoodmehraban89 / Factor-easy / commits / 373e67e
Fork 0

سامانه صدور فاکتور و حسابداری

Document verified Office Slice C7 evidence

davoodmehraban89 committed Oct 1, 2026 at 00:29 UTC 373e67ebaddfb9c1e80cf477319f536d6df38e3d
1 file changed +39
docs/OFFICE_SLICE_C7_VERIFICATION.md new
+39
@@ -0,0 +1,39 @@
1 +# Office Slice C7 — Searchable Archive + OCR Provenance Verification
2 +
3 +Date: 2026-10-01
4 +Project: `hcsixhqbyuhpshfwqpjx`
5 +
6 +## Delivered
7 +- PostgreSQL full-text archive search across correspondence metadata, body, archive classification/tags and latest OCR text.
8 +- Server-side tenant/RBAC/confidentiality filtering remains authoritative.
9 +- Append-only OCR capture evidence records source reference, provider label, language, optional confidence, raw provider text, actor and timestamp.
10 +- Human OCR correction is a separate append-only event; raw provider output is preserved while latest correction becomes searchable.
11 +- Search results expose `match_source` plus OCR provenance/correction state.
12 +- Query length is capped at 200 characters and result count at 200.
13 +- UI exposes OCR evidence/correction controls and clearly labels the OCR boundary.
14 +
15 +## Production verification
16 +Transactional adversarial verification: PASS.
17 +- Persian metadata/body/OCR terms were found through server full-text search.
18 +- Corrected OCR text replaced raw OCR text for latest searchable content while raw evidence remained immutable.
19 +- Match source correctly distinguished metadata/body/OCR.
20 +- Oversized query was rejected after the C7 search-input guard.
21 +- Cross-tenant search returned no rows and cross-tenant OCR evidence write was rejected.
22 +- Rollback residue: zero.
23 +
24 +## Migrations
25 +- `20260930205325 office_slice_c7_searchable_archive_ocr_provenance`
26 +- `20260930205347 office_c7_search_input_guard`
27 +- Production migration history also contains `20260930205309 office_slice_c7_fulltext_ocr_provenance`; it produced no remaining C7-named callable function in the inspected live schema. This migration-history entry must remain preserved; do not rewrite production history.
28 +
29 +## CI
30 +Verified head: `c307422eae508b57e448a3c9b4b3e3506836f3e2`.
31 +- Quality `36776208848`: PASS including C7 invariant and Real-DOM.
32 +- Security `36776208767`: CodeQL JavaScript PASS; Dependency Review skipped because repository Dependency Graph is not enabled.
33 +- Pages `36776208873`: PASS.
34 +
35 +## Advisor status
36 +C7 uses public SECURITY INVOKER wrappers over private authorization-checked implementations; authenticated-callable public SECURITY DEFINER warning count remains 20. Leaked-password protection remains disabled. Performance advisor remains informational unused-index notices.
37 +
38 +## Explicit boundary
39 +C7 **does not perform OCR** and **does not verify real Persian OCR accuracy**. Real Persian OCR remains unverified until a real OCR provider and representative Persian scans are connected and measured. Qualified digital signature and external delivery adapters remain outside C7.