سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 08:00 UTC
test: verify integrated reversal and manual guard chain
JVK committed
Nov 4, 2026 at 21:47 UTC
b5ed69327759233f8d1d00cdcdd9ca089f488f57
27 files changed
+1041
-30
.github/workflows/wp1-ledger.yml
+3
@@ -29,6 +29,8 @@ jobs:
29
run: WP1_EVIDENCE_DIR=/tmp/finora-wp1-evidence/correction-cycle node scripts/wp1-correction-cycle.mjs
30
- name: Prove reversal dimension preservation and rollback
31
run: node scripts/wp1-reversal-dimensions-test.mjs
32
+ - name: Prove manual journal update guards and rollback
33
+ run: node scripts/wp1-manual-guards-cycle.mjs
34
- name: Verify full candidate conservative DOWN and UP
35
run: node scripts/wp1-prerequisite-rollback.mjs
36
- name: Upload synthetic evidence
@@ -40,4 +42,5 @@ jobs:
42
/tmp/finora-wp1-evidence/
43
docs/wp1/evidence/prerequisite-rollback/
44
docs/wp1/evidence/reversal-dimensions/
45
+ docs/wp1/evidence/manual-update-guards/
46
retention-days: 14
PROJECT_STATE.md
+5
@@ -279,3 +279,8 @@ Owner requests layer-by-layer click/functional testing of all controls and compa
279
- Owner-authorized WP1 continuation: reproduce and repair draft-update fiscal date/scope and ENFORCE voucher-type bypasses, including posting and authenticated generic writes. Isolated branch `hardening/wp1-manual-update-guards-20261104` at `799cff4`; root client worktree and reversal function are out of scope.
280
- Fresh read-only Git remote check: main `4416794682d29a17976c901d866d182627f63c29`, WP1 branch `799cff4fcb1b9a98f763baf9e79a030c099deb58`. Test only source-derived disposable PostgreSQL, with additive CLI-generated migration, conservative DOWN, negative regressions and retained-history UP/DOWN/UP proof. No production access, push, PR, deployment or archived migration rewrite authorized for this subtask.
281
- Root took over persisted partial test after specialist execution became unavailable.17actual pre-fix bypasses reproduced (explicit RPC,authenticated rawSQL andsync-v2); new additive20261104072719 validates effective fiscal header before child replacement and limits ENFORCE manual types/source relabeling through header-only triggers.17negativecasesGREEN; validadjustment/boundarydates/postingreplay andoff/auditgenericcompatibilityPASS. UP/DOWN/UP exactupdatefunction/ACL andnewtrigger/helperrestorationPASS withpostedhistory/8lines/audit/counters/modes retained. Initialcycleparser omitteddigits in v2 names; correctedregex thenfull17proofPASS, no assertionsweakened. Newmigration manifest/mutationchecksPASS; combinedrootchain/fullCI andindependentSQLreview stillrequired. No productionaccess orchange.
282
+
283
+### 2026-11-04 — Combined guards and nullable revision investigation
284
+- Owner says continue. Both additive repairs integrated on WP1; complete14migration conservative DOWN/UP and integrated manual17negative cycle PASS. Full14SQL including1000events is running; no completion inferred. Client56818d8 exact-head Quality41758729100/Security41758729122/WP1proof41758729204 allSUCCESS. Remote main remains4416794; production unchanged.
285
+- Root source review found four explicit journal CAS checks use `<> p_expected_version`, potentially accepting SQL NULL. Before UI RPC activation, reproduce NULL update/delete/post/reverse bypasses, preserve authorized idempotent replay, add null-safe comparisons with exact rollback and regression evidence. This is an authorized WP1 invariant repair, not a new product feature. Independent specialist SQL review unavailable; not claimed.
286
+- Integrated14chain fullSQL15/15(including1000events) and actualtwo-sessionconcurrency PASS; evidence docs/wp1/evidence/integrated-14. Integratedmanualcycle17negativePASS andall14conservativeDOWN/UPPASS, exact71baselinefunctions/ACLs/triggersandhistoryretained. Manifest96files/24vs38knownversions andmutationchecksPASS; release-safety andclient43NodePASS. Next additiveNULLrepair independently reproduced andcycleproved; integrateandrerunfullchain beforepublish.
docs/wp1/evidence/integrated-14/green-concurrency.log
new
+11
@@ -0,0 +1,11 @@
1
+{"name":"fixture","pass":true,"diagnostic":""}
2
+{"name":"drafts","pass":true,"diagnostic":""}
3
+{"name":"simultaneous_duplicate_create","pass":true,"diagnostic":" "}
4
+{"name":"concurrent_double_click_one_voucher_two_lines","pass":true,"diagnostic":"1,2\n"}
5
+{"name":"two_posts","pass":true,"diagnostic":" "}
6
+{"name":"gapless_numbers","pass":true,"diagnostic":"1,2\n"}
7
+{"name":"original","pass":true,"diagnostic":""}
8
+{"name":"two_reversals_one_winner","pass":true,"diagnostic":"ERROR: FINORA_REVERSAL_OVER_ALLOCATION\nCONTEXT: PL/pgSQL function public.finora_journal_reverse(uuid,text,text,text,text,bigint,jsonb) line 73 at RAISE\n "}
9
+{"name":"no_duplicate_reversals","pass":true,"diagnostic":"1\n"}
10
+{"name":"partial_status_from_view","pass":true,"diagnostic":"partially_reversed\n"}
11
+FINORA_STAGE1_TWO_CONNECTIONS_PASS
docs/wp1/evidence/integrated-14/green-results.json
new
+475
@@ -0,0 +1,475 @@
1
+{
2
+ "baseline": {
3
+ "scope": "source-derived ledger baseline; NOT a production database clone",
4
+ "image": "postgres:17-alpine",
5
+ "migrations": [
6
+ {
7
+ "name": "20260921082958_finora_core_schema_auth_licenses_rls.sql",
8
+ "sourceSha256": "f9fc9d548e1ec1e7c224f2ddf59fee9f59045a97bf7586a6e5211b39732fe206",
9
+ "appliedSha256": "a232419f6a09726036e34be673089839c2a5cc03fbc30453bbe1d7060de5995f",
10
+ "terminalLiteralNewlineRemoved": true
11
+ },
12
+ {
13
+ "name": "20260921083540_finora_records_store_replace_relational.sql",
14
+ "sourceSha256": "f2abeb1043b92abcd32cf9e6ff55013c46eedda360934efff75085356806b9c0",
15
+ "appliedSha256": "b4466d9390945d127d89de45250d212d859d47585c0fb0ab618d14e35c72894f",
16
+ "terminalLiteralNewlineRemoved": true
17
+ },
18
+ {
19
+ "name": "20260921083829_finora_admin_license_rpcs_cancel_and_extend.sql",
20
+ "sourceSha256": "3ffed38bc301088c2c6ac8a43b67f4764110ac5548df52bf62b51c2b01f60330",
21
+ "appliedSha256": "47ddd34936281faf183a1b638defe92ea282ec6a02be5610761b377052cb3745",
22
+ "terminalLiteralNewlineRemoved": true
23
+ },
24
+ {
25
+ "name": "20260922035848_decouple_profile_email_add_email_col.sql",
26
+ "sourceSha256": "55e8dd71c3a038e20bb92e23eb54c3bda372e3869ac0a15ed486cd39de0ee724",
27
+ "appliedSha256": "fb391f06a35947e55883c29541a8e6591699e1a2e17d963a21e75439beb3fed0",
28
+ "terminalLiteralNewlineRemoved": true
29
+ },
30
+ {
31
+ "name": "20260922035916_drop_username_unique_and_format_constraints.sql",
32
+ "sourceSha256": "6abba23c7c7567db3442326a500498b78cfbee6dbd54cf241d1a3a4a7505cb78",
33
+ "appliedSha256": "94ea777568d5558527d884f421d2843f504e1f276b0f3170bb70522526a9f515",
34
+ "terminalLiteralNewlineRemoved": true
35
+ },
36
+ {
37
+ "name": "20260923210625_add_full_name_to_profiles.sql",
38
+ "sourceSha256": "703d8313f9079b541f92725f00434911212a3c5d0d0d84e9756e8ed955558c51",
39
+ "appliedSha256": "3c6ecfbe37c210fe2430c4ca9442e9a425767000b736e284b968221ef7e9783a",
40
+ "terminalLiteralNewlineRemoved": true
41
+ },
42
+ {
43
+ "name": "20260928025331_allow_purchases_collection.sql",
44
+ "sourceSha256": "4b2f60d800ee3caeb55c9b1c966ef18501c8f401eca96b9a3a7bb1c689b7baa8",
45
+ "appliedSha256": "f733e8f53b3d7ce1ffdfd2f3da9b7395393af86532efa45c2a394c414a92a7ef",
46
+ "terminalLiteralNewlineRemoved": true
47
+ },
48
+ {
49
+ "name": "20260928113755_allow_payment_settlement_records.sql",
50
+ "sourceSha256": "65559a79c846c58857a64b48c1f8c4fbf001e9bfb2ecb3790ae4633e0f8757a1",
51
+ "appliedSha256": "5eacb493707b37d2f1198ec9db00880d81ff5c61000c2bd528ac1c8cdfef6f40",
52
+ "terminalLiteralNewlineRemoved": true
53
+ },
54
+ {
55
+ "name": "20260928115233_repair_legacy_invoice_contact_ids.sql",
56
+ "sourceSha256": "c713e1e071858c66e38370e521a43fced55844b2adb130b0c38caea2c6a86226",
57
+ "appliedSha256": "3c5b879607230c6851cdd0b241ee4e04045449809ddd0eb21b58c2d7b3a83bec",
58
+ "terminalLiteralNewlineRemoved": true
59
+ },
60
+ {
61
+ "name": "20260928115616_restrict_internal_license_helpers.sql",
62
+ "sourceSha256": "d6c93f28dcc87ade59756e068a121ad1e34c491cb26a3443cafaeb73a31a1a6e",
63
+ "appliedSha256": "02212f26bb0dc8499b0a4e8d45a17ccf5b129be306c1824c272b40929c3a53c2",
64
+ "terminalLiteralNewlineRemoved": true
65
+ },
66
+ {
67
+ "name": "20260928141512_allow_accounting_foundation_collections.sql",
68
+ "sourceSha256": "9d5c9297debd032c31e5dcea8509ac76212b7a0022533436e5b9ad57f5346f10",
69
+ "appliedSha256": "c41453d59b58f29443e032e116fce162e0f6e3a5e576773e8f5e4ddcf7d11073",
70
+ "terminalLiteralNewlineRemoved": true
71
+ },
72
+ {
73
+ "name": "20260928145306_allow_phase3_double_entry_collections.sql",
74
+ "sourceSha256": "d1a846179c815d0c84ebf2d7dcdfcc81b18e9856016a3aa2552574703ac0dbf2",
75
+ "appliedSha256": "cbfac74cb825ddbe5643c122962ac182d950613223249aee88318e7f3156f4c2",
76
+ "terminalLiteralNewlineRemoved": true
77
+ },
78
+ {
79
+ "name": "20260929083130_phase3_hardening_atomic_sync_and_ledger_guards.sql",
80
+ "sourceSha256": "9eab93235e973bfa869659d6b1f14664c4864b711c0d6518e3865fab6b7f8cfa",
81
+ "appliedSha256": "b2f91d6e8dc513500ab559613490fc2af3bb91faab64664f0bb541322060f027",
82
+ "terminalLiteralNewlineRemoved": true
83
+ },
84
+ {
85
+ "name": "20260929091743_phase4_contracting_collections.sql",
86
+ "sourceSha256": "8506f8296eb3d4b67c80fb0b6b467a4d24b10ef29ad3d2e5779c7250a6a7a12c",
87
+ "appliedSha256": "f0eb58959c93335d48017af4344ffc337c07386c309ea9a9519d20fb03807b8a",
88
+ "terminalLiteralNewlineRemoved": true
89
+ },
90
+ {
91
+ "name": "20260929172129_phase5_complementary_erp_collections.sql",
92
+ "sourceSha256": "eab2d7aa23b5226a28f366e3eb08cd398f74184522b2ec52d8df8a7b34d01d47",
93
+ "appliedSha256": "eab2d7aa23b5226a28f366e3eb08cd398f74184522b2ec52d8df8a7b34d01d47",
94
+ "terminalLiteralNewlineRemoved": false
95
+ },
96
+ {
97
+ "name": "20260929193348_posted_source_immutability_guard.sql",
98
+ "sourceSha256": "4d57fffc27e69e2bf873ebe1d411223ef262190fac428347b9ab413be5876b78",
99
+ "appliedSha256": "4d57fffc27e69e2bf873ebe1d411223ef262190fac428347b9ab413be5876b78",
100
+ "terminalLiteralNewlineRemoved": false
101
+ },
102
+ {
103
+ "name": "20260929193357_accounting_master_uniqueness.sql",
104
+ "sourceSha256": "1b55fb34c8ec683bb84c40f85e82e283f30711a3aa7785f93bfa721e371e6f8c",
105
+ "appliedSha256": "1b55fb34c8ec683bb84c40f85e82e283f30711a3aa7785f93bfa721e371e6f8c",
106
+ "terminalLiteralNewlineRemoved": false
107
+ },
108
+ {
109
+ "name": "20260929220543_license_company_capacity.sql",
110
+ "sourceSha256": "7d4e87152b55ca2be58c47dbd40b0abd9f5b85bc59fa247f8a0bbab3d441774c",
111
+ "appliedSha256": "7d4e87152b55ca2be58c47dbd40b0abd9f5b85bc59fa247f8a0bbab3d441774c",
112
+ "terminalLiteralNewlineRemoved": false
113
+ },
114
+ {
115
+ "name": "20260929220613_restrict_company_limit_rpc.sql",
116
+ "sourceSha256": "3a74e66245125f9b4922032fbc34a4c2981534efd901519c66cd96a837b03756",
117
+ "appliedSha256": "3a74e66245125f9b4922032fbc34a4c2981534efd901519c66cd96a837b03756",
118
+ "terminalLiteralNewlineRemoved": false
119
+ },
120
+ {
121
+ "name": "20260929221252_iran_enterprise_foundation_collections.sql",
122
+ "sourceSha256": "66a07435edc6e8c75a62694ad4b9d734e9c94727bed7bbb95a323e7146d0d4ae",
123
+ "appliedSha256": "66a07435edc6e8c75a62694ad4b9d734e9c94727bed7bbb95a323e7146d0d4ae",
124
+ "terminalLiteralNewlineRemoved": false
125
+ },
126
+ {
127
+ "name": "20260929221754_iran_enterprise_financial_controls.sql",
128
+ "sourceSha256": "c5329091a70c3c2e0bc8c3f24dbd2477ab4e66f3cceb439144f5a85a961d851c",
129
+ "appliedSha256": "c5329091a70c3c2e0bc8c3f24dbd2477ab4e66f3cceb439144f5a85a961d851c",
130
+ "terminalLiteralNewlineRemoved": false
131
+ },
132
+ {
133
+ "name": "20260929222000_iran_enterprise_foundation_collections.sql",
134
+ "sourceSha256": "1884e4c169fd2b0b1d1d9bb0486ee466c41fee8d09fca283830531c635db1720",
135
+ "appliedSha256": "78f1fb98473b0503199760a4ce8c29304e77795356c4716023595c5e6b7cc675",
136
+ "terminalLiteralNewlineRemoved": true
137
+ },
138
+ {
139
+ "name": "20260930025546_modular_entitlements_office_automation_foundation.sql",
140
+ "sourceSha256": "96d31a1db0ebc3673dc016aa1fa2f434d655305f774fc5cc3eef75cae862a9f6",
141
+ "appliedSha256": "96d31a1db0ebc3673dc016aa1fa2f434d655305f774fc5cc3eef75cae862a9f6",
142
+ "terminalLiteralNewlineRemoved": false
143
+ },
144
+ {
145
+ "name": "20260930025647_office_secretariat_atomic_registration.sql",
146
+ "sourceSha256": "e2a05589a486c3662c0edfd10d97f6e258047142f61eb17aeb1110eef6114ea7",
147
+ "appliedSha256": "e2a05589a486c3662c0edfd10d97f6e258047142f61eb17aeb1110eef6114ea7",
148
+ "terminalLiteralNewlineRemoved": false
149
+ },
150
+ {
151
+ "name": "20260930030314_preserve_readonly_access_after_license_expiry.sql",
152
+ "sourceSha256": "50a1793c35f30e1fd320adf5ffe3eac5c7ff43108e8038b1608e95e94ef61398",
153
+ "appliedSha256": "50a1793c35f30e1fd320adf5ffe3eac5c7ff43108e8038b1608e95e94ef61398",
154
+ "terminalLiteralNewlineRemoved": false
155
+ },
156
+ {
157
+ "name": "20260930031853_organization_membership_rbac_foundation.sql",
158
+ "sourceSha256": "5df3530944807adfc4c1a4c57117b48b4582eba965cbb1898a2debc115d8c2b4",
159
+ "appliedSha256": "5df3530944807adfc4c1a4c57117b48b4582eba965cbb1898a2debc115d8c2b4",
160
+ "terminalLiteralNewlineRemoved": false
161
+ },
162
+ {
163
+ "name": "20260930031942_office_shared_rbac_and_referrals.sql",
164
+ "sourceSha256": "13c066da7d67318652dc865f8f5522dd4942497c9f2b9e20c73fb23c04364ec2",
165
+ "appliedSha256": "13c066da7d67318652dc865f8f5522dd4942497c9f2b9e20c73fb23c04364ec2",
166
+ "terminalLiteralNewlineRemoved": false
167
+ },
168
+ {
169
+ "name": "20260930032615_slice_b_rbac_fk_indexes.sql",
170
+ "sourceSha256": "ae9469591c7669d4759e23609f09da48b80791ae1accdab76d910278f52da1a3",
171
+ "appliedSha256": "ae9469591c7669d4759e23609f09da48b80791ae1accdab76d910278f52da1a3",
172
+ "terminalLiteralNewlineRemoved": false
173
+ },
174
+ {
175
+ "name": "20260930032654_harden_legacy_office_storage_member_writes.sql",
176
+ "sourceSha256": "4fce4b570a47af4838243226fdf521e7cb918119400ea36a8c5319cc085c43a4",
177
+ "appliedSha256": "4fce4b570a47af4838243226fdf521e7cb918119400ea36a8c5319cc085c43a4",
178
+ "terminalLiteralNewlineRemoved": false
179
+ },
180
+ {
181
+ "name": "20260930033010_allow_member_core_read_context.sql",
182
+ "sourceSha256": "4fef30460171789e426da776d36098ceb5a743c75f908d8c2e1ffa39a82f9335",
183
+ "appliedSha256": "4fef30460171789e426da776d36098ceb5a743c75f908d8c2e1ffa39a82f9335",
184
+ "terminalLiteralNewlineRemoved": false
185
+ },
186
+ {
187
+ "name": "20260930041735_harden_public_security_definer_rpc_grants_search_path.sql",
188
+ "sourceSha256": "42047543a8764fba8865d76e9474b8afe547d352c23ea39d4e3aa3611ba761c6",
189
+ "appliedSha256": "42047543a8764fba8865d76e9474b8afe547d352c23ea39d4e3aa3611ba761c6",
190
+ "terminalLiteralNewlineRemoved": false
191
+ },
192
+ {
193
+ "name": "20260930045827_enterprise_license_seats_delegated_admin.sql",
194
+ "sourceSha256": "9b304812da17c9f8cad4c6ae6d83181dfdd5177dbb2b3a43970437b69aa1727d",
195
+ "appliedSha256": "9b304812da17c9f8cad4c6ae6d83181dfdd5177dbb2b3a43970437b69aa1727d",
196
+ "terminalLiteralNewlineRemoved": false
197
+ },
198
+ {
199
+ "name": "20260930050542_enterprise_reusable_roles.sql",
200
+ "sourceSha256": "9025f7501b2f27ac74c2f225366d85eac5d12eadb146c4844dc1c072cf10ec7e",
201
+ "appliedSha256": "9025f7501b2f27ac74c2f225366d85eac5d12eadb146c4844dc1c072cf10ec7e",
202
+ "terminalLiteralNewlineRemoved": false
203
+ },
204
+ {
205
+ "name": "20260930050904_eli2_role_tenant_hardening.sql",
206
+ "sourceSha256": "40b433fe28b62f780bc60f8a38f9cf57daf2e6897daabaf7493909be706fb43c",
207
+ "appliedSha256": "40b433fe28b62f780bc60f8a38f9cf57daf2e6897daabaf7493909be706fb43c",
208
+ "terminalLiteralNewlineRemoved": false
209
+ },
210
+ {
211
+ "name": "20260930051849_enterprise_invitations.sql",
212
+ "sourceSha256": "cd735c988394a45be4253c01d2b399e6f502e4a73e6652b4ddb7726e4e71659e",
213
+ "appliedSha256": "cd735c988394a45be4253c01d2b399e6f502e4a73e6652b4ddb7726e4e71659e",
214
+ "terminalLiteralNewlineRemoved": false
215
+ },
216
+ {
217
+ "name": "20260930052909_eli3_fk_index_hardening.sql",
218
+ "sourceSha256": "496e9537aefb1f88ee2cf5269af2a3c23f84e16a40ca36b58f8cc00ea721eb22",
219
+ "appliedSha256": "496e9537aefb1f88ee2cf5269af2a3c23f84e16a40ca36b58f8cc00ea721eb22",
220
+ "terminalLiteralNewlineRemoved": false
221
+ },
222
+ {
223
+ "name": "20260930053652_enterprise_organization_ux.sql",
224
+ "sourceSha256": "225f5c37fe91f5116875bff0bb090aa71824d8d71a93607377b29e86eaf8c947",
225
+ "appliedSha256": "225f5c37fe91f5116875bff0bb090aa71824d8d71a93607377b29e86eaf8c947",
226
+ "terminalLiteralNewlineRemoved": false
227
+ },
228
+ {
229
+ "name": "20260930054352_office_registered_history_read_evidence.sql",
230
+ "sourceSha256": "4e2080d037f9e5ad6ef1baa9c25da4878133c650b5b0487bee2cdcd5d0354d51",
231
+ "appliedSha256": "4e2080d037f9e5ad6ef1baa9c25da4878133c650b5b0487bee2cdcd5d0354d51",
232
+ "terminalLiteralNewlineRemoved": false
233
+ },
234
+ {
235
+ "name": "20260930152500_office_slice_c2_actionable_referrals_sla.sql",
236
+ "sourceSha256": "c02a8dfee81b5d75e824adc6b2ecbfa0835fb92d30424b8f8420dd92a396c4c7",
237
+ "appliedSha256": "c02a8dfee81b5d75e824adc6b2ecbfa0835fb92d30424b8f8420dd92a396c4c7",
238
+ "terminalLiteralNewlineRemoved": false
239
+ },
240
+ {
241
+ "name": "20260930153000_office_evidence_insert_hardening.sql",
242
+ "sourceSha256": "aea8dbd1ca84ee089c3a86586921e333df059798dd9bdbd22fa0e8bc22afacee",
243
+ "appliedSha256": "aea8dbd1ca84ee089c3a86586921e333df059798dd9bdbd22fa0e8bc22afacee",
244
+ "terminalLiteralNewlineRemoved": false
245
+ },
246
+ {
247
+ "name": "20261002080000_identity_wave5a_bootstrap.sql",
248
+ "sourceSha256": "3acd8ff4354d5ad5e4d9423f46c879b58b4e3d0d3447f163142ad1a63d928faa",
249
+ "appliedSha256": "3acd8ff4354d5ad5e4d9423f46c879b58b4e3d0d3447f163142ad1a63d928faa",
250
+ "terminalLiteralNewlineRemoved": false
251
+ },
252
+ {
253
+ "name": "20261007165208_phone_identity_profile.sql",
254
+ "sourceSha256": "7715be48c86ccb7a0f0ac6f6e811e4a451873acf6b51c0d64513702749c18918",
255
+ "appliedSha256": "7715be48c86ccb7a0f0ac6f6e811e4a451873acf6b51c0d64513702749c18918",
256
+ "terminalLiteralNewlineRemoved": false
257
+ },
258
+ {
259
+ "name": "20261011174445_posted_source_idempotency_index.sql",
260
+ "sourceSha256": "92002acb5138f927db6094f8d428ed84954a73c3a26b13d73f96165ef0405e7a",
261
+ "appliedSha256": "92002acb5138f927db6094f8d428ed84954a73c3a26b13d73f96165ef0405e7a",
262
+ "terminalLiteralNewlineRemoved": false
263
+ },
264
+ {
265
+ "name": "20261012080000_fix_identity_bootstrap_license_before_membership.sql",
266
+ "sourceSha256": "9cc237ca25ae27cc023b98f12a82b950991b1a21a3e5713cac6c502d2da2f7ff",
267
+ "appliedSha256": "9cc237ca25ae27cc023b98f12a82b950991b1a21a3e5713cac6c502d2da2f7ff",
268
+ "terminalLiteralNewlineRemoved": false
269
+ }
270
+ ],
271
+ "omittedMigrations": [
272
+ "20260930154625_office_slice_c3_related_archive.sql",
273
+ "20260930154720_office_c3_event_time_ordering.sql",
274
+ "20260930202526_office_registration_tenant_repair.sql",
275
+ "20260930202701_office_slice_c4_versioned_templates.sql",
276
+ "20260930203456_office_slice_c5_internal_approval.sql",
277
+ "20260930203620_office_slice_c5_internal_approval.sql",
278
+ "20260930203709_office_c5_decision_event_order_fix.sql",
279
+ "20260930203839_office_c5_content_digest_hardening.sql",
280
+ "20260930204536_office_slice_c6_sla_reminder_escalation.sql",
281
+ "20260930205309_office_slice_c7_fulltext_ocr_provenance.sql",
282
+ "20260930205325_office_slice_c7_searchable_archive_ocr_provenance.sql",
283
+ "20260930205347_office_c7_search_input_guard.sql",
284
+ "20260930205753_office_c7_remove_abandoned_duplicate_api.sql",
285
+ "20260930205919_office_c7_bind_ocr_source_attachment.sql",
286
+ "20260930222500_iran_enterprise_control_collections.sql",
287
+ "20260930223000_iran_enterprise_financial_controls.sql",
288
+ "20261001173917_office_slice_c8_workflow_policy.sql",
289
+ "20261001180610_office_slice_c8_workflow_runtime.sql",
290
+ "20261001180949_office_c8_policy_publisher_fk_index.sql",
291
+ "20261001204500_request_workflow_d1_foundation.sql",
292
+ "20261001205500_request_workflow_d1_transition_evidence.sql",
293
+ "20261001210500_request_workflow_d1_rpc_security.sql",
294
+ "20261001211500_request_workflow_d1_revision_qualification.sql",
295
+ "20261001223500_request_workflow_d2_legacy_cutover.sql",
296
+ "20261001224500_request_workflow_d2_fk_indexes.sql",
297
+ "20261001230000_request_workflow_d3a_step_runtime.sql",
298
+ "20261001230500_request_workflow_d3a_security_hardening.sql",
299
+ "20261001233000_request_workflow_d3b_conditions_timeline.sql",
300
+ "20261001235500_request_workflow_d3c_operations.sql",
301
+ "20261002000500_request_workflow_d3c_escalation_conflict_fix.sql",
302
+ "20261002001000_request_delegation_to_user_fk_index.sql",
303
+ "20261002010000_request_wave1_legacy_transition_guard.sql",
304
+ "20261002023000_request_wave2_integrity_hardening.sql",
305
+ "20261002033000_request_workflow_d4a_work_queue.sql",
306
+ "20261002070000_request_wave2_duplicate_code_guard.sql",
307
+ "20261002071000_request_wave3_decision_idempotency.sql",
308
+ "20261002072000_request_wave4_operational_integrity.sql",
309
+ "20261002073500_request_wave4b_scheduler_outbox_delivery.sql",
310
+ "20261016100000_phase1a_server_journal_invariants.sql",
311
+ "20261016100500_phase1a_optimistic_version_sync.sql",
312
+ "20261016101000_phase1a_guard_modes_audit.sql",
313
+ "20261016101500_phase1a_journal_core.sql",
314
+ "20261016102000_phase1a_journal_rpc_surface.sql",
315
+ "20261016102500_phase1a_account_role_protection.sql",
316
+ "20261016103000_phase1a_sale_monetary_contract.sql",
317
+ "20261016103100_phase1a_autopost_server_authority.sql",
318
+ "20261016103500_phase1a_purchase_fixed_contract.sql",
319
+ "20261016104000_stage22_manual_guard_owner_mode.sql",
320
+ "20261016104500_stage3_posted_source_immutable.sql",
321
+ "20261102141933_wp1_ledger_scope_authority_hardening.sql",
322
+ "20261104020908_wp1_reversal_dimensions.sql",
323
+ "20261104072719_wp1_manual_update_guards.sql"
324
+ ],
325
+ "platformBootstrap": "supabase/tests/wp0_platform_bootstrap.sql",
326
+ "postgres": "version \n------------------------------------------------------------------------------------------\n PostgreSQL 17.11 on x86_64-pc-linux-musl, compiled by gcc (Alpine 15.2.0) 15.2.0, 64-bit\n(1 row)",
327
+ "imageDigest": [
328
+ "postgres@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b"
329
+ ],
330
+ "platformBootstrapSha256": "49dff07ac8c42b0ee4b2eae046fad9e4579348c31e4d9c39c111e6cd09b3f4eb"
331
+ },
332
+ "mode": "green",
333
+ "scope": "full SQL selection and concurrency",
334
+ "completed": true,
335
+ "applied": [
336
+ {
337
+ "file": "20261016100000_phase1a_server_journal_invariants.sql",
338
+ "sha256": "46c785652ebd48707fc6e8a86cffc70cbc4a2c5ef79b46acee08a8453d02a18a"
339
+ },
340
+ {
341
+ "file": "20261016100500_phase1a_optimistic_version_sync.sql",
342
+ "sha256": "9a38d8e238998c96a8f25e1b1c58c36f47a4ea00d56a90d668c70b465811abd9"
343
+ },
344
+ {
345
+ "file": "20261016101000_phase1a_guard_modes_audit.sql",
346
+ "sha256": "a94a0ee2ba6584ed3bbd4c7b550b02384f57b1f2592884e951da5945fb76919b"
347
+ },
348
+ {
349
+ "file": "20261016101500_phase1a_journal_core.sql",
350
+ "sha256": "95d64e86305dbcc40d2718a3f391e128c77b32d7a9ff86bfbf06b096682435d6"
351
+ },
352
+ {
353
+ "file": "20261016102000_phase1a_journal_rpc_surface.sql",
354
+ "sha256": "009d42fb3183277a72621ef107e1918d8e77e17ffbaa69447c10b0253145aa5b"
355
+ },
356
+ {
357
+ "file": "20261016102500_phase1a_account_role_protection.sql",
358
+ "sha256": "88f3f868d9d3eb8425eba5863d4cf637a387944423dc713ccc072a49688c1796"
359
+ },
360
+ {
361
+ "file": "20261016103000_phase1a_sale_monetary_contract.sql",
362
+ "sha256": "bc419c4a08f2a9d305e4b5387abaf2af4af3eb539f8f4143843c41f1cec3065e"
363
+ },
364
+ {
365
+ "file": "20261016103100_phase1a_autopost_server_authority.sql",
366
+ "sha256": "768a6cd5fc5f595a93240d05c43bb11f4866b5eae710af96f841cc92ec9ce61a"
367
+ },
368
+ {
369
+ "file": "20261016103500_phase1a_purchase_fixed_contract.sql",
370
+ "sha256": "a97c9d6d0bf1e98feb2081e9977f023d91fe13816532578be558bb4d4d03b5d9"
371
+ },
372
+ {
373
+ "file": "20261016104000_stage22_manual_guard_owner_mode.sql",
374
+ "sha256": "7b910723038bb6a8d1fde76fab654f7a6d42ed0f21f5013d466cf02d1be363dd"
375
+ },
376
+ {
377
+ "file": "20261016104500_stage3_posted_source_immutable.sql",
378
+ "sha256": "4ee4d3dd63dc3b47f6953227e4c3e1707e976b954b24bb8e99557bea20e4c3d4"
379
+ },
380
+ {
381
+ "file": "20261102141933_wp1_ledger_scope_authority_hardening.sql",
382
+ "sha256": "cdabffcfa64d99aa88fa900a799a953790a4918e790b644c0ae263c18aed771e"
383
+ },
384
+ {
385
+ "file": "20261104020908_wp1_reversal_dimensions.sql",
386
+ "sha256": "307eaf296a757462c2ec33d8c20c22abee0c63c0816872fc603b27f9498243e9"
387
+ },
388
+ {
389
+ "file": "20261104072719_wp1_manual_update_guards.sql",
390
+ "sha256": "be1e275fd1584cc08403423091784fc1b33eb561e5aefede0eaf4cc54afdca6d"
391
+ }
392
+ ],
393
+ "tests": [
394
+ {
395
+ "file": "wp1_direct_write_regressions.sql",
396
+ "status": 0
397
+ },
398
+ {
399
+ "file": "wp1_manual_update_guards.sql",
400
+ "status": 0
401
+ },
402
+ {
403
+ "file": "wp1_phase1a_cas_rls_behavior.sql",
404
+ "status": 0
405
+ },
406
+ {
407
+ "file": "wp1_phase1a_security_grants.sql",
408
+ "status": 0
409
+ },
410
+ {
411
+ "file": "wp1_phase1a_stage1_account_role_controls.sql",
412
+ "status": 0
413
+ },
414
+ {
415
+ "file": "wp1_phase1a_stage1_all_definer_security.sql",
416
+ "status": 0
417
+ },
418
+ {
419
+ "file": "wp1_phase1a_stage1_counter_two_fiscal.sql",
420
+ "status": 0
421
+ },
422
+ {
423
+ "file": "wp1_phase1a_stage1_sale_purchase_negatives.sql",
424
+ "status": 0
425
+ },
426
+ {
427
+ "file": "wp1_phase1a_stage1_seeded_1000.sql",
428
+ "status": 0
429
+ },
430
+ {
431
+ "file": "wp1_phase1a_stage1_sql_behavior.sql",
432
+ "status": 0
433
+ },
434
+ {
435
+ "file": "wp1_posted_identity_move.sql",
436
+ "status": 0
437
+ },
438
+ {
439
+ "file": "wp1_posting_negatives.sql",
440
+ "status": 0
441
+ },
442
+ {
443
+ "file": "wp1_reversal_dimensions.sql",
444
+ "status": 0
445
+ },
446
+ {
447
+ "file": "wp1_scope_move_and_null.sql",
448
+ "status": 0
449
+ },
450
+ {
451
+ "file": "wp1_shadow_and_constraint_contract.sql",
452
+ "status": 0
453
+ }
454
+ ],
455
+ "concurrency": {
456
+ "status": 0
457
+ },
458
+ "selectedTests": [
459
+ "wp1_direct_write_regressions.sql",
460
+ "wp1_manual_update_guards.sql",
461
+ "wp1_phase1a_cas_rls_behavior.sql",
462
+ "wp1_phase1a_security_grants.sql",
463
+ "wp1_phase1a_stage1_account_role_controls.sql",
464
+ "wp1_phase1a_stage1_all_definer_security.sql",
465
+ "wp1_phase1a_stage1_counter_two_fiscal.sql",
466
+ "wp1_phase1a_stage1_sale_purchase_negatives.sql",
467
+ "wp1_phase1a_stage1_seeded_1000.sql",
468
+ "wp1_phase1a_stage1_sql_behavior.sql",
469
+ "wp1_posted_identity_move.sql",
470
+ "wp1_posting_negatives.sql",
471
+ "wp1_reversal_dimensions.sql",
472
+ "wp1_scope_move_and_null.sql",
473
+ "wp1_shadow_and_constraint_contract.sql"
474
+ ]
475
+}
docs/wp1/evidence/integrated-14/green-wp1_direct_write_regressions.sql.log
new
+18
@@ -0,0 +1,18 @@
1
+BEGIN
2
+INSERT 0 1
3
+ set_config
4
+--------------------------------------
5
+ e4bbd70f-d981-493d-9451-5a4323466a12
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ b1000000-0000-4000-8000-000000000001
11
+(1 row)
12
+
13
+INSERT 0 4
14
+DO
15
+SET
16
+DO
17
+ROLLBACK
18
+NOTICE: WP1_DIRECT_GUARDS_PASS: D1, independent RPC-balanced D2, dimension insert, spoofed GUC
docs/wp1/evidence/integrated-14/green-wp1_manual_update_guards.sql.log
new
+57
@@ -0,0 +1,57 @@
1
+BEGIN
2
+INSERT 0 1
3
+ set_config
4
+--------------------------------------
5
+ d438259f-5e3c-4312-8966-4501eea66010
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ e9000000-0000-4000-8000-000000000001
11
+(1 row)
12
+
13
+INSERT 0 4
14
+ finora_journal_create_draft
15
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16
+ {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:04.306391+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
+ {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:04.317466+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
+ {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:04.325027+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
19
+(3 rows)
20
+
21
+INSERT 0 1
22
+SET
23
+DO
24
+RESET
25
+UPDATE 1
26
+SET
27
+ finora_journal_create_draft
28
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29
+ {"voucher": {"id": "MG_AUDIT", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:05.438991+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "2a45bf8a7f945a968da7ddc92271a8de", "reversalAllocations": null}, "replayed": false}
30
+(1 row)
31
+
32
+UPDATE 1
33
+DO
34
+RESET
35
+UPDATE 1
36
+SET
37
+UPDATE 1
38
+DO
39
+ROLLBACK
40
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_date_range: FINORA_FISCAL_DATE_INVALID
41
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_date_format: FINORA_FISCAL_DATE_INVALID
42
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_null_date: FINORA_FISCAL_DATE_INVALID
43
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_null_header: FINORA_INVALID_DRAFT_UPDATE
44
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_year_closed: FINORA_FISCAL_YEAR_LOCKED_OR_MISSING
45
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_year_company: FINORA_FISCAL_YEAR_LOCKED_OR_MISSING
46
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_opening: FINORA_OPENING_CLOSING_NOT_APPROVED
47
+NOTICE: WP1_MANUAL_NEGATIVE_PASS rpc_closing: FINORA_OPENING_CLOSING_NOT_APPROVED
48
+NOTICE: WP1_MANUAL_NEGATIVE_PASS post_opening: FINORA_OPENING_CLOSING_NOT_APPROVED
49
+NOTICE: WP1_MANUAL_NEGATIVE_PASS post_closing: FINORA_OPENING_CLOSING_NOT_APPROVED
50
+NOTICE: WP1_MANUAL_NEGATIVE_PASS direct_date: FINORA_FISCAL_DATE_INVALID
51
+NOTICE: WP1_MANUAL_NEGATIVE_PASS direct_null_date: FINORA_FISCAL_DATE_INVALID
52
+NOTICE: WP1_MANUAL_NEGATIVE_PASS direct_opening: FINORA_OPENING_CLOSING_NOT_APPROVED
53
+NOTICE: WP1_MANUAL_NEGATIVE_PASS direct_source_relabel: FINORA_MANUAL_DRAFT_SOURCE_IMMUTABLE
54
+NOTICE: WP1_MANUAL_NEGATIVE_PASS v2_date: FINORA_FISCAL_DATE_INVALID
55
+NOTICE: WP1_MANUAL_NEGATIVE_PASS v2_closing: FINORA_OPENING_CLOSING_NOT_APPROVED
56
+NOTICE: WP1_MANUAL_NEGATIVE_PASS v2_source_relabel: FINORA_MANUAL_DRAFT_SOURCE_IMMUTABLE
57
+NOTICE: WP1_MANUAL_UPDATE_GUARDS_PASS: 17 negatives, atomic rejection, valid adjustment, boundary dates, posting replay
docs/wp1/evidence/integrated-14/green-wp1_phase1a_cas_rls_behavior.sql.log
new
+21
@@ -0,0 +1,21 @@
1
+BEGIN
2
+INSERT 0 2
3
+ set_config
4
+--------------------------------------
5
+ 7bc0efd6-b788-4a93-bb18-d0292cc0dd5c
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ 5a368d5f-cf20-4346-acc7-cbfc00129000
11
+(1 row)
12
+
13
+SET
14
+ set_config
15
+--------------------------------------
16
+ 44444444-4444-4444-8444-444444444444
17
+(1 row)
18
+
19
+DO
20
+ROLLBACK
21
+NOTICE: FINORA_1A_CAS_PASS create=1 update=2 stale_rejected=true winner_preserved=true cross_tenant_denied=true
docs/wp1/evidence/integrated-14/green-wp1_phase1a_security_grants.sql.log
new
+2
@@ -0,0 +1,2 @@
1
+DO
2
+NOTICE: FINORA_1A_SECURITY_PASS private 1A routines=27 unsafe search_path=0 anon execute=0
docs/wp1/evidence/integrated-14/green-wp1_phase1a_stage1_account_role_controls.sql.log
new
+62
@@ -0,0 +1,62 @@
1
+BEGIN
2
+INSERT 0 3
3
+ set_config
4
+--------------------------------------
5
+ d31fd5e8-93f8-4542-bb61-1db66aefc576
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ 30b22c45-8c80-4b39-aa82-c6a931a5ad61
11
+(1 row)
12
+
13
+INSERT 0 2
14
+INSERT 0 2
15
+INSERT 0 4
16
+INSERT 0 2
17
+UPDATE 1
18
+INSERT 0 1
19
+INSERT 0 1
20
+INSERT 0 1
21
+INSERT 0 1
22
+INSERT 0 1
23
+INSERT 0 1
24
+INSERT 0 1
25
+INSERT 0 1
26
+DO
27
+SET
28
+ set_config
29
+--------------------------------------
30
+ cccc3333-3333-4333-8333-333333333333
31
+(1 row)
32
+
33
+DO
34
+RESET
35
+UPDATE 1
36
+DO
37
+SET
38
+DO
39
+RESET
40
+DO
41
+UPDATE 1
42
+UPDATE 1
43
+SET
44
+ set_config
45
+--------------------------------------
46
+ aaaa1111-1111-4111-8111-111111111111
47
+(1 row)
48
+
49
+DO
50
+RESET
51
+DO
52
+DO
53
+UPDATE 1
54
+INSERT 0 1
55
+INSERT 0 1
56
+SET
57
+DO
58
+RESET
59
+DO
60
+ROLLBACK
61
+NOTICE: FINORA_ACCOUNT_ROLE_GUARDS_PASS
62
+NOTICE: FINORA_ACCOUNT_ROLE_GUARDS_AND_DRAFT_PIN_PASS
docs/wp1/evidence/integrated-14/green-wp1_phase1a_stage1_all_definer_security.sql.log
new
+2
@@ -0,0 +1,2 @@
1
+DO
2
+NOTICE: FINORA_SECURITY_DEFINER_AUDIT_PASS zero unsafe defs and anon/public grants
docs/wp1/evidence/integrated-14/green-wp1_phase1a_stage1_counter_two_fiscal.sql.log
new
+49
@@ -0,0 +1,49 @@
1
+BEGIN
2
+INSERT 0 1
3
+ set_config
4
+--------------------------------------
5
+ 8e62633c-a290-4682-8bd7-3e6e0ba415ab
6
+(1 row)
7
+
8
+INSERT 0 1
9
+INSERT 0 2
10
+INSERT 0 2
11
+INSERT 0 2
12
+INSERT 0 1
13
+SET
14
+ set_config
15
+--------------------------------------
16
+ 12345678-aaaa-4aaa-8aaa-123456789012
17
+(1 row)
18
+
19
+ finora_journal_create_draft
20
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
21
+ {"voucher": {"id": "NEW_FIRST_41", "date": "1405/05/01", "status": "draft", "version": 1, "sourceId": "", "companyId": "COMP_COUNTER", "createdAt": "2026-11-04T07:40:06.108234+00:00", "createdBy": "12345678-aaaa-4aaa-8aaa-123456789012", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "FY_FIRST", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "5d6aa2f3e0043ba4c7690d7ed8785839", "reversalAllocations": null}, "replayed": false}
22
+(1 row)
23
+
24
+ finora_journal_create_draft
25
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
26
+ {"voucher": {"id": "NEW_SECOND_12", "date": "1405/10/01", "status": "draft", "version": 1, "sourceId": "", "companyId": "COMP_COUNTER", "createdAt": "2026-11-04T07:40:06.125158+00:00", "createdBy": "12345678-aaaa-4aaa-8aaa-123456789012", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "FY_SECOND", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "977a41c99e7865483e6cdc605672a586", "reversalAllocations": null}, "replayed": false}
27
+(1 row)
28
+
29
+SAVEPOINT
30
+ finora_journal_post
31
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
32
+ {"voucher": {"id": "NEW_FIRST_41", "date": "1405/05/01", "number": "41", "status": "posted", "version": 2, "postedAt": "2026-11-04T07:40:06.133772+00:00", "postedBy": "12345678-aaaa-4aaa-8aaa-123456789012", "sourceId": "", "companyId": "COMP_COUNTER", "createdAt": "2026-11-04T07:40:06.108234+00:00", "createdBy": "12345678-aaaa-4aaa-8aaa-123456789012", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "FY_FIRST", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "5d6aa2f3e0043ba4c7690d7ed8785839", "reversalAllocations": null}, "replayed": false}
33
+(1 row)
34
+
35
+ROLLBACK
36
+ finora_journal_post
37
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
38
+ {"voucher": {"id": "NEW_FIRST_41", "date": "1405/05/01", "number": "41", "status": "posted", "version": 2, "postedAt": "2026-11-04T07:40:06.146004+00:00", "postedBy": "12345678-aaaa-4aaa-8aaa-123456789012", "sourceId": "", "companyId": "COMP_COUNTER", "createdAt": "2026-11-04T07:40:06.108234+00:00", "createdBy": "12345678-aaaa-4aaa-8aaa-123456789012", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "FY_FIRST", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "5d6aa2f3e0043ba4c7690d7ed8785839", "reversalAllocations": null}, "replayed": false}
39
+(1 row)
40
+
41
+ finora_journal_post
42
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
43
+ {"voucher": {"id": "NEW_SECOND_12", "date": "1405/10/01", "number": "12", "status": "posted", "version": 2, "postedAt": "2026-11-04T07:40:06.149433+00:00", "postedBy": "12345678-aaaa-4aaa-8aaa-123456789012", "sourceId": "", "companyId": "COMP_COUNTER", "createdAt": "2026-11-04T07:40:06.125158+00:00", "createdBy": "12345678-aaaa-4aaa-8aaa-123456789012", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "FY_SECOND", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "977a41c99e7865483e6cdc605672a586", "reversalAllocations": null}, "replayed": false}
44
+(1 row)
45
+
46
+RESET
47
+DO
48
+ROLLBACK
49
+NOTICE: FINORA_STAGE1_COUNTER_PASS years=2 first_legacy=40 next=41 second_legacy=11 next=12 rollback_consumed=0
docs/wp1/evidence/integrated-14/green-wp1_phase1a_stage1_sale_purchase_negatives.sql.log
new
+45
@@ -0,0 +1,45 @@
1
+BEGIN
2
+INSERT 0 3
3
+ set_config
4
+--------------------------------------
5
+ e7b15c89-7b48-480a-b42a-3ab323dddd7f
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ e048c41c-8db2-45ed-a6b3-2b2e50de374f
11
+(1 row)
12
+
13
+INSERT 0 2
14
+INSERT 0 2
15
+INSERT 0 4
16
+INSERT 0 2
17
+UPDATE 1
18
+INSERT 0 1
19
+INSERT 0 1
20
+INSERT 0 1
21
+INSERT 0 1
22
+INSERT 0 1
23
+INSERT 0 1
24
+INSERT 0 3
25
+INSERT 0 1
26
+DO
27
+SET
28
+ set_config
29
+--------------------------------------
30
+ aaaa1111-1111-4111-8111-111111111111
31
+(1 row)
32
+
33
+ finora_phase1a_publish_role_assignments
34
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
35
+ {"version": 1, "approved": true, "assignments": {"cash_default": "ACC_STAGE_1", "payable_control": "ACC_AP", "revenue_default": "ACC_STAGE_2", "purchase_default": "ACC_PUR", "receivable_control": "ACC_AR"}}
36
+(1 row)
37
+
38
+ set_config
39
+--------------------------------------
40
+ cccc3333-3333-4333-8333-333333333333
41
+(1 row)
42
+
43
+DO
44
+ROLLBACK
45
+NOTICE: FINORA_SALE_PURCHASE_NEGATIVES_AND_REVERSED_IDEMPOTENCY_PASS
docs/wp1/evidence/integrated-14/green-wp1_phase1a_stage1_seeded_1000.sql.log
new
+38
@@ -0,0 +1,38 @@
1
+BEGIN
2
+INSERT 0 2
3
+ set_config
4
+--------------------------------------
5
+ ef7daf22-f2f6-4ec0-868d-9ad2d5492221
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ 0444233d-1f31-4349-9341-7333ce37f169
11
+(1 row)
12
+
13
+INSERT 0 2
14
+INSERT 0 2
15
+INSERT 0 4
16
+INSERT 0 2
17
+SET
18
+DO
19
+RESET
20
+SET CONSTRAINTS
21
+DO
22
+ROLLBACK
23
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=100 full=24 partial=12
24
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=200 full=48 partial=23
25
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=300 full=72 partial=34
26
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=400 full=96 partial=46
27
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=500 full=119 partial=57
28
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=600 full=143 partial=68
29
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=700 full=167 partial=80
30
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=800 full=191 partial=92
31
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=900 full=214 partial=103
32
+NOTICE: FINORA_SEEDED_PROGRESS seed=20261016 events=1000 full=238 partial=114
33
+NOTICE: FINORA_SEEDED_GENERATION_PASS seed=20261016 events=1000 full=238 partial=114
34
+NOTICE: FINORA_SEEDED_VERIFY_COUNTS_PASS originals=1000
35
+NOTICE: FINORA_SEEDED_VERIFY_VOUCHERS_BALANCED
36
+NOTICE: FINORA_SEEDED_VERIFY_TWO_ORGS_BALANCED
37
+NOTICE: FINORA_SEEDED_VERIFY_NO_ORG_LEAK
38
+NOTICE: FINORA_SEEDED_PASS seed=20261016 original=1000 two_orgs=true lines=2..8 full_partial_reversals=true
docs/wp1/evidence/integrated-14/green-wp1_phase1a_stage1_sql_behavior.sql.log
new
+54
@@ -0,0 +1,54 @@
1
+BEGIN
2
+INSERT 0 3
3
+ set_config
4
+--------------------------------------
5
+ 1f3283e1-d3b6-4efd-b533-996a0d2ee647
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ 14185021-2364-440f-8310-eec39bb0517f
11
+(1 row)
12
+
13
+INSERT 0 2
14
+INSERT 0 2
15
+INSERT 0 4
16
+INSERT 0 2
17
+UPDATE 1
18
+INSERT 0 1
19
+INSERT 0 1
20
+INSERT 0 1
21
+INSERT 0 1
22
+INSERT 0 1
23
+INSERT 0 1
24
+SET
25
+ set_config
26
+--------------------------------------
27
+ aaaa1111-1111-4111-8111-111111111111
28
+(1 row)
29
+
30
+ finora_phase1a_publish_role_assignments
31
+--------------------------------------------------------------------------------------------------------------------
32
+ {"version": 1, "approved": true, "assignments": {"cash_default": "ACC_STAGE_1", "revenue_default": "ACC_STAGE_2"}}
33
+(1 row)
34
+
35
+DO
36
+ set_config
37
+--------------------------------------
38
+ bbbb2222-2222-4222-8222-222222222222
39
+(1 row)
40
+
41
+DO
42
+ set_config
43
+--------------------------------------
44
+ cccc3333-3333-4333-8333-333333333333
45
+(1 row)
46
+
47
+DO
48
+RESET
49
+DO
50
+ROLLBACK
51
+NOTICE: FINORA_STAGE1_SMOKE_A_PASS create, doubleclick, retry-conflict, post, reverse, view, tenant A->B
52
+NOTICE: FINORA_STAGE1_SMOKE_B_PASS tenant B->A and legacy/CAS
53
+NOTICE: FINORA_STAGE1_ROLE_PASS commerce source allowed, manual create/edit/delete/post/reverse denied
54
+NOTICE: FINORA_STAGE1_BOTH_DIRECTIONS_PASS direct,2arg,3arg,v2,journal
docs/wp1/evidence/integrated-14/green-wp1_posted_identity_move.sql.log
new
+28
@@ -0,0 +1,28 @@
1
+BEGIN
2
+INSERT 0 1
3
+ set_config
4
+--------------------------------------
5
+ ddd9bccb-5649-4c5b-98ad-29d2a8387640
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ b1000000-0000-4000-8000-000000000001
11
+(1 row)
12
+
13
+INSERT 0 4
14
+DO
15
+SET
16
+DO
17
+RESET
18
+INSERT 0 1
19
+ set_config
20
+--------------------------------------
21
+ c997b61f-e5f9-4128-b965-d0aef364e46f
22
+(1 row)
23
+
24
+INSERT 0 1
25
+DO
26
+ROLLBACK
27
+NOTICE: WP1_DIRECT_GUARDS_PASS: D1, independent RPC-balanced D2, dimension insert, spoofed GUC
28
+NOTICE: WP1_POSTED_ORG_MOVE_PASS: old ENFORCE dominates new AUDIT, original untouched
docs/wp1/evidence/integrated-14/green-wp1_posting_negatives.sql.log
new
+32
@@ -0,0 +1,32 @@
1
+BEGIN
2
+INSERT 0 1
3
+ set_config
4
+--------------------------------------
5
+ ba64516b-d686-4737-9148-1bcde37ee91d
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ b2000000-0000-4000-8000-000000000001
11
+(1 row)
12
+
13
+INSERT 0 5
14
+INSERT 0 1
15
+SET
16
+DO
17
+ROLLBACK
18
+NOTICE: WP1_NEGATIVE_PASS missing_amount: FINORA_INVALID_RIAL_AMOUNT
19
+NOTICE: WP1_NEGATIVE_PASS null_amount: FINORA_INVALID_RIAL_AMOUNT
20
+NOTICE: WP1_NEGATIVE_PASS negative: FINORA_INVALID_RIAL_AMOUNT
21
+NOTICE: WP1_NEGATIVE_PASS fraction: FINORA_INVALID_RIAL_AMOUNT
22
+NOTICE: WP1_NEGATIVE_PASS zero: FINORA_INVALID_DEBIT_CREDIT_LINE
23
+NOTICE: WP1_NEGATIVE_PASS two_sides: FINORA_INVALID_DEBIT_CREDIT_LINE
24
+NOTICE: WP1_NEGATIVE_PASS single: FINORA_INVALID_LINE_COUNT
25
+NOTICE: WP1_NEGATIVE_PASS unbalanced: FINORA_UNBALANCED_POSTED_JOURNAL count=2 debit=1000 credit=300
26
+NOTICE: WP1_NEGATIVE_PASS closed: FINORA_FISCAL_YEAR_LOCKED_OR_MISSING
27
+NOTICE: WP1_NEGATIVE_PASS out_of_range: FINORA_FISCAL_DATE_INVALID
28
+NOTICE: WP1_NEGATIVE_PASS wrong_company: FINORA_LINE_SCOPE_MISMATCH
29
+NOTICE: WP1_NEGATIVE_PASS wrong_year: FINORA_LINE_SCOPE_MISMATCH
30
+NOTICE: WP1_NEGATIVE_PASS currency: FINORA_CURRENCY_UNSUPPORTED
31
+NOTICE: WP1_NEGATIVE_PASS inactive_account: FINORA_ACCOUNT_OUT_OF_SCOPE
32
+NOTICE: WP1_POSTING_NEGATIVES_PASS: 14 cases
docs/wp1/evidence/integrated-14/green-wp1_reversal_dimensions.sql.log
new
+34
@@ -0,0 +1,34 @@
1
+BEGIN
2
+INSERT 0 2
3
+ set_config
4
+--------------------------------------
5
+ d8e859a3-9a94-4223-b4b5-000f750dacde
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ e1d5c5d4-2f01-40a8-87ec-3dc9f285a568
11
+(1 row)
12
+
13
+ set_config
14
+--------------------------------------
15
+ b6000000-0000-4000-8000-000000000001
16
+(1 row)
17
+
18
+UPDATE 1
19
+INSERT 0 12
20
+INSERT 0 1
21
+INSERT 0 1
22
+CREATE FUNCTION
23
+SET
24
+DO
25
+DO
26
+RESET
27
+ALTER TABLE
28
+INSERT 0 2
29
+ALTER TABLE
30
+SET
31
+DO
32
+ROLLBACK
33
+NOTICE: WP1_REVERSAL_DIMENSIONS_PASS: full, partial, remainder, replay, changed retry, over-allocation, tenant scope, immutable originals
34
+NOTICE: WP1_LEGACY_DIMENSION_SCOPE_PASS: wrong-company and wrong-voucher fail closed with unchanged rows
docs/wp1/evidence/integrated-14/green-wp1_scope_move_and_null.sql.log
new
+35
@@ -0,0 +1,35 @@
1
+BEGIN
2
+INSERT 0 2
3
+ set_config
4
+--------------------------------------
5
+ fc991fa4-05e4-4809-afca-8243c7cbf72d
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ 7becb12f-62dd-4fd7-9342-bca0c7384c65
11
+(1 row)
12
+
13
+ set_config
14
+--------------------------------------
15
+ b4000000-0000-4000-8000-000000000001
16
+(1 row)
17
+
18
+INSERT 0 4
19
+INSERT 0 1
20
+SET
21
+DO
22
+RESET
23
+DO
24
+UPDATE 1
25
+SET
26
+DO
27
+RESET
28
+INSERT 0 1
29
+UPDATE 1
30
+SET CONSTRAINTS
31
+DO
32
+ROLLBACK
33
+NOTICE: WP1_ENFORCE_TO_AUDIT_IDENTITY_MOVE_DENIED
34
+NOTICE: WP1_MISSING_AND_NULL_AMOUNTS_REJECTED_IN_SHADOW
35
+NOTICE: WP1_AUDIT_TO_OFF_RELOCATION_ALLOWED_AND_LOGGED
docs/wp1/evidence/integrated-14/green-wp1_shadow_and_constraint_contract.sql.log
new
+21
@@ -0,0 +1,21 @@
1
+BEGIN
2
+INSERT 0 1
3
+ set_config
4
+--------------------------------------
5
+ 2007bca3-ca33-48b0-80c5-6651a27b8c02
6
+(1 row)
7
+
8
+ set_config
9
+--------------------------------------
10
+ b3000000-0000-4000-8000-000000000001
11
+(1 row)
12
+
13
+DO
14
+SET
15
+DO
16
+INSERT 0 1
17
+SET CONSTRAINTS
18
+RESET
19
+DO
20
+ROLLBACK
21
+NOTICE: WP1_SHADOW_PASS: default audit, persisted violation evidence, non-admin setter denied, deferred ledger-only constraints
docs/wp1/evidence/integrated-14/run.log
new
+17
@@ -0,0 +1,17 @@
1
+PASS wp1_direct_write_regressions.sql
2
+PASS wp1_manual_update_guards.sql
3
+PASS wp1_phase1a_cas_rls_behavior.sql
4
+PASS wp1_phase1a_security_grants.sql
5
+PASS wp1_phase1a_stage1_account_role_controls.sql
6
+PASS wp1_phase1a_stage1_all_definer_security.sql
7
+PASS wp1_phase1a_stage1_counter_two_fiscal.sql
8
+PASS wp1_phase1a_stage1_sale_purchase_negatives.sql
9
+PASS wp1_phase1a_stage1_seeded_1000.sql
10
+PASS wp1_phase1a_stage1_sql_behavior.sql
11
+PASS wp1_posted_identity_move.sql
12
+PASS wp1_posting_negatives.sql
13
+PASS wp1_reversal_dimensions.sql
14
+PASS wp1_scope_move_and_null.sql
15
+PASS wp1_shadow_and_constraint_contract.sql
16
+PASS two-session concurrency
17
+WP1 green selected checks complete; source-derived disposable DB, not production parity or JWT gateway acceptance. Evidence /workspace/wp1-integrated14-full
docs/wp1/evidence/manual-update-guards/baseline-red.log
+4
-4
@@ -2,7 +2,7 @@ BEGIN
2
INSERT 0 1
3
set_config
4
--------------------------------------
5
- 4e536456-0452-41b2-90e0-03f1a484f8a4
5
+ 9e2a0ffa-5a53-4092-a9ff-333b40018180
6
(1 row)
7
8
set_config
@@ -13,9 +13,9 @@ INSERT 0 1
13
INSERT 0 4
14
finora_journal_create_draft
15
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16
- {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:49.279377+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
- {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:49.290195+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
- {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:49.296049+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
16
+ {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:05.217275+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
+ {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:05.226684+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
+ {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:05.232206+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
19
(3 rows)
20
21
INSERT 0 1
docs/wp1/evidence/manual-update-guards/down-red.log
+4
-4
@@ -2,7 +2,7 @@ BEGIN
2
INSERT 0 1
3
set_config
4
--------------------------------------
5
- 33a3f408-6a08-44a6-ade9-bbb1310d65d7
5
+ 869e23f7-c863-48f0-b410-0f747d18c4c8
6
(1 row)
7
8
set_config
@@ -13,9 +13,9 @@ INSERT 0 1
13
INSERT 0 4
14
finora_journal_create_draft
15
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16
- {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:52.28598+00:00", "createdBy": "e9100000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
- {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:52.297475+00:00", "createdBy": "e9100000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
- {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:52.303576+00:00", "createdBy": "e9100000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
16
+ {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:07.98045+00:00", "createdBy": "e9100000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
+ {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:07.992194+00:00", "createdBy": "e9100000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
+ {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:07.997716+00:00", "createdBy": "e9100000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
19
(3 rows)
20
21
INSERT 0 1
docs/wp1/evidence/manual-update-guards/green-retained.log
+5
-5
@@ -2,7 +2,7 @@ BEGIN
2
INSERT 0 1
3
set_config
4
--------------------------------------
5
- 449ebe99-8b9b-40b3-897a-3a1a10188627
5
+ a1185609-f9f3-4abc-afe5-1430b26ea019
6
(1 row)
7
8
set_config
@@ -13,9 +13,9 @@ INSERT 0 1
13
INSERT 0 4
14
finora_journal_create_draft
15
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16
- {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:50.644815+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
- {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:50.658022+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
- {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:50.664567+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
16
+ {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:06.544273+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
+ {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:06.560025+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
+ {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:06.568435+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
19
(3 rows)
20
21
INSERT 0 1
@@ -26,7 +26,7 @@ UPDATE 1
26
SET
27
finora_journal_create_draft
28
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29
- {"voucher": {"id": "MG_AUDIT", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:51.824026+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "2a45bf8a7f945a968da7ddc92271a8de", "reversalAllocations": null}, "replayed": false}
29
+ {"voucher": {"id": "MG_AUDIT", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:07.500288+00:00", "createdBy": "e9000000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "2a45bf8a7f945a968da7ddc92271a8de", "reversalAllocations": null}, "replayed": false}
30
(1 row)
31
32
UPDATE 1
docs/wp1/evidence/manual-update-guards/green-up2.log
+7
-7
@@ -2,7 +2,7 @@ BEGIN
2
INSERT 0 1
3
set_config
4
--------------------------------------
5
- a853a092-cd1e-4703-8c23-986eef49b1a0
5
+ 76ca84fe-5207-480a-bd2e-23873f9da4a8
6
(1 row)
7
8
set_config
@@ -13,9 +13,9 @@ INSERT 0 1
13
INSERT 0 4
14
finora_journal_create_draft
15
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
16
- {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:53.806078+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
- {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:53.822284+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
- {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:53.827797+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
16
+ {"voucher": {"id": "MG_manual", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:09.794546+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "manual", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "803b3215d3481bb4def700fe3cf7c9cd", "reversalAllocations": null}, "replayed": false}
17
+ {"voucher": {"id": "MG_opening", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:09.805051+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "bd6a7a7fff1bad71f7e036cd0cff37be", "reversalAllocations": null}, "replayed": false}
18
+ {"voucher": {"id": "MG_closing", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:09.810137+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "closing", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "1882e7e38353bf6d3744de8e3ad5b8bf", "reversalAllocations": null}, "replayed": false}
19
(3 rows)
20
21
INSERT 0 1
@@ -24,9 +24,9 @@ DO
24
RESET
25
UPDATE 1
26
SET
27
- finora_journal_create_draft
28
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29
- {"voucher": {"id": "MG_AUDIT", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:33:54.855609+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "2a45bf8a7f945a968da7ddc92271a8de", "reversalAllocations": null}, "replayed": false}
27
+ finora_journal_create_draft
28
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29
+ {"voucher": {"id": "MG_AUDIT", "date": "1405/07/24", "status": "draft", "version": 1, "sourceId": "", "companyId": "MG_C", "createdAt": "2026-11-04T07:40:11.01976+00:00", "createdBy": "e9200000-0000-4000-8000-000000000001", "reference": "", "sourceType": "manual", "description": "", "voucherType": "opening", "fiscalYearId": "MG_Y", "sourceVersion": "1", "reversalReason": "", "requestFingerprint": "2a45bf8a7f945a968da7ddc92271a8de", "reversalAllocations": null}, "replayed": false}
30
(1 row)
31
32
UPDATE 1
docs/wp1/evidence/manual-update-guards/result.json
+6
-5
@@ -30,15 +30,16 @@
30
"20261016103500_phase1a_purchase_fixed_contract.sql",
31
"20261016104000_stage22_manual_guard_owner_mode.sql",
32
"20261016104500_stage3_posted_source_immutable.sql",
33
- "20261102141933_wp1_ledger_scope_authority_hardening.sql"
33
+ "20261102141933_wp1_ledger_scope_authority_hardening.sql",
34
+ "20261104020908_wp1_reversal_dimensions.sql"
35
],
36
"retained": {
37
"posted": 1,
38
"lines": 8,
38
- "records": "638c6043c5634262493fd5db4c288d59",
39
- "audit": "067eb991e216ca48e15d93a52d2732ef",
40
- "counters": "0a861860db0bdc1447c23be07f7a0c90",
41
- "modes": "6536c237201610f8fbd8bcce324986a7"
39
+ "records": "79b98f915b80e987bf21564bfc50b824",
40
+ "audit": "d5226378e29078ed98bbeee9698a6156",
41
+ "counters": "6fa4b4f8faa489cdfce43e9a0dd135a6",
42
+ "modes": "70c6b6dd8ea188c940e05fc88fcc75ed"
43
},
44
"hashes": {
45
"supabase/migrations/20261104072719_wp1_manual_update_guards.sql": "be1e275fd1584cc08403423091784fc1b33eb561e5aefede0eaf4cc54afdca6d",
docs/wp1/evidence/manual-update-guards/snapshot.log
+1
-1
@@ -1,2 +1,2 @@
1
Output format is unaligned.
2
-{"posted" : 1, "lines" : 8, "records" : "638c6043c5634262493fd5db4c288d59", "audit" : "067eb991e216ca48e15d93a52d2732ef", "counters" : "0a861860db0bdc1447c23be07f7a0c90", "modes" : "6536c237201610f8fbd8bcce324986a7"}
2
+{"posted" : 1, "lines" : 8, "records" : "79b98f915b80e987bf21564bfc50b824", "audit" : "d5226378e29078ed98bbeee9698a6156", "counters" : "6fa4b4f8faa489cdfce43e9a0dd135a6", "modes" : "70c6b6dd8ea188c940e05fc88fcc75ed"}
docs/wp1/evidence/prerequisite-rollback/result.json
+5
-4
@@ -3,16 +3,17 @@
3
"prerequisites": 11,
4
"corrections": [
5
"20261102141933_wp1_ledger_scope_authority_hardening.sql",
6
- "20261104020908_wp1_reversal_dimensions.sql"
6
+ "20261104020908_wp1_reversal_dimensions.sql",
7
+ "20261104072719_wp1_manual_update_guards.sql"
8
],
9
"baselineFunctionCount": 71,
10
"retained": {
11
"posted_count": 4,
12
"line_count": 10,
13
"audit_count": 10,
13
- "records": "855c8392fcfcf47b4170115d7f862c71",
14
- "audit": "869cf583cd4f66e13a1329f1fa19ee80",
15
- "counters": "3e16837b78f30f2b80c2112b66dac861"
14
+ "records": "fa78a715db8cbc61b946c54d4b502a29",
15
+ "audit": "9fa2e93cb6f7e10c186d2fd609d4da9f",
16
+ "counters": "4af072181fa0d07a34e648eb37a6d162"
17
},
18
"scope": "conservative rollback preserves inert structures/indexes; NOT pristine schema or production parity"
19
}