سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 19:30 UTC
Document verified Office Slice C3 evidence
davoodmehraban89 committed
Sep 30, 2026 at 23:52 UTC
99ee15cbfce3c1124ccaaec5f2fde6ee3aff20af
1 file changed
+61
docs/OFFICE_SLICE_C3_VERIFICATION.md
new
+61
@@ -0,0 +1,61 @@
1
+# Office Slice C3 — Related-Letter Graph + Archive Classification/Search Verification
2
+
3
+Date: 2026-09-30
4
+Project: `hcsixhqbyuhpshfwqpjx`
5
+
6
+## Delivered
7
+- Append-only correspondence relations: `reply_to` and symmetric `related`.
8
+- Server rejection of self-links, duplicate reply parents, reply cycles and duplicate reverse related links.
9
+- Append-only archive classification events with folder, classification code and bounded tags.
10
+- Latest-classification semantics hardened with `clock_timestamp()`.
11
+- Server-authoritative archive search over readable correspondence and classification metadata.
12
+- Related-letter search through `p_related_to`.
13
+- Office archive UI for search/filter, classification and relation creation.
14
+
15
+## Production migrations
16
+- `20260930154625 office_slice_c3_related_archive`
17
+- `20260930154720 office_c3_event_time_ordering`
18
+
19
+Archived SQL:
20
+- `supabase/migrations/20260930154625_office_slice_c3_related_archive.sql`
21
+- `supabase/migrations/20260930154720_office_c3_event_time_ordering.sql`
22
+
23
+## TDD / implementation evidence
24
+- Plan: `3b38982986df7e44daeeeef1c655cad250063082`.
25
+- Failing static gate: `dfa379e6b874bcb3132dce9574338a8a26afbcb0`.
26
+- Failing Real-DOM gate: `55b872c5632537acf1de64405b50e5e2a5197b03`.
27
+- CI gate wiring: `9051709e7c83329062ecae2dd6c57cc33092d7d3`.
28
+- Event-ordering regression captured before hardening: `4a591be83a3b2415efbe8591c700e82902875a8a`.
29
+- Production migration archives: `e5c16b07a4f280ec7d7735b375c0ac23062e2b71`, `500c519af90f1633eb2a8cb926a41db3ecf517dc`.
30
+- Runtime/UI: `07da0f88649412a87fde8d75a45c2a604b3b26f9`, asset refresh `cd975c74b5e7eef2b8ac14f1fc520efe58eaca22`.
31
+
32
+## Transactional production adversarial verification
33
+All C3 correspondence fixtures, temporary membership, permission grant and temporary license-seat expansion were created inside one transaction and rolled back.
34
+
35
+PASS:
36
+1. A scoped member's archive search returned only the correspondence inside that member's company scope.
37
+2. Linking a readable source to an unreadable target was rejected server-side.
38
+3. Scoped member could classify a readable correspondence.
39
+4. Classification of an unreadable correspondence was rejected.
40
+5. Self relation was rejected.
41
+6. A reply source received exactly one reply parent; a second parent was rejected.
42
+7. A three-letter reply cycle was rejected.
43
+8. Reverse duplicate `related` relation was rejected.
44
+9. Latest classification replaced older classification for search semantics without mutating old evidence.
45
+10. Related-graph search from one letter returned the expected three-node fixture graph.
46
+11. Cross-tenant principal received no C3 archive rows.
47
+12. Rollback left zero correspondence/audit/member residue and restored `max_users=1`.
48
+
49
+## GitHub verification
50
+Verified main head containing C3: `44bea5e8e63bf37e6de8cbbd369168ea4a9bfb19`.
51
+- Quality `36740544828`: PASS, including accounting/Golden, ELI-1/2/3/4, Office C1/C2/C3 and Real-DOM.
52
+- Security `36740544795`: CodeQL JavaScript PASS. Dependency Review remains skipped because the repository Dependency Graph boundary is unchanged.
53
+- Pages `36740543917`: build/deploy/report PASS.
54
+
55
+## Security/advisor disposition
56
+Current Supabase guidance recommends `SECURITY INVOKER` by default and, when `SECURITY DEFINER` is necessary, an empty `search_path`, schema-qualified relations and restricted EXECUTE grants. C3 follows the latter controls and has explicit negative authorization tests. The advisor still reports authenticated-callable SECURITY DEFINER RPC warnings; broader RPC exposure redesign remains a tracked P1 security item rather than being silently treated as closed.
57
+
58
+Leaked-password protection remains disabled. Performance advisor currently reports unused-index informational notices.
59
+
60
+## Scope boundary / NOT VERIFIED
61
+C3 does not claim OCR quality, qualified digital signature, templates/editor, approval/signature lifecycle, external archive adapters or persistent two-real-user browser E2E.