@synapsor/runner 1.1.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +105 -1
  2. package/README.md +29 -7
  3. package/THREAT_MODEL.md +13 -4
  4. package/dist/cli.d.ts +5 -1
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/local-ui.d.ts.map +1 -1
  7. package/dist/runner.mjs +10406 -4932
  8. package/docs/README.md +19 -3
  9. package/docs/capability-authoring.md +20 -8
  10. package/docs/conformance.md +12 -0
  11. package/docs/current-scope.md +12 -4
  12. package/docs/doctor.md +21 -7
  13. package/docs/dsl-reference.md +91 -5
  14. package/docs/getting-started-own-database.md +26 -3
  15. package/docs/guarded-crud-writeback.md +218 -0
  16. package/docs/limitations.md +30 -9
  17. package/docs/oss-vs-cloud.md +1 -1
  18. package/docs/production.md +52 -20
  19. package/docs/release-notes.md +82 -2
  20. package/docs/release-policy.md +1 -1
  21. package/docs/result-envelope-v2.md +20 -6
  22. package/docs/result-envelope-v4.md +47 -0
  23. package/docs/reversible-change-sets.md +151 -0
  24. package/docs/rfcs/004-guarded-crud-receipt-authority.md +165 -0
  25. package/docs/rfcs/005-bounded-set-writeback.md +164 -0
  26. package/docs/rfcs/006-reviewed-reversible-change-sets.md +152 -0
  27. package/docs/runner-config-reference.md +83 -9
  28. package/docs/running-a-runner-fleet.md +2 -1
  29. package/docs/security-boundary.md +36 -9
  30. package/docs/writeback-executors.md +12 -11
  31. package/examples/runner-fleet/seed/mysql.sql +47 -0
  32. package/examples/runner-fleet/seed/postgres.sql +48 -0
  33. package/examples/support-plan-credit/README.md +31 -0
  34. package/examples/support-plan-credit/contract.synapsor.sql +26 -0
  35. package/examples/support-plan-credit/expected-output/tools-preview.txt +1 -0
  36. package/examples/support-plan-credit/seed/001_seed.sql +14 -1
  37. package/examples/support-plan-credit/synapsor.contract.json +101 -1
  38. package/examples/support-plan-credit/synapsor.runner.json +7 -1
  39. package/fixtures/protocol/MANIFEST.json +131 -1
  40. package/fixtures/protocol/change-set.bounded-update.v3.json +57 -0
  41. package/fixtures/protocol/change-set.delete.v2.json +31 -0
  42. package/fixtures/protocol/change-set.insert.v2.json +36 -0
  43. package/fixtures/protocol/change-set.update.v2.json +32 -0
  44. package/fixtures/protocol/compensation-change-set.update.v1.json +40 -0
  45. package/fixtures/protocol/execution-receipt.bounded-update-applied.v3.json +39 -0
  46. package/fixtures/protocol/execution-receipt.compensation-update-applied.v4.json +37 -0
  47. package/fixtures/protocol/execution-receipt.delete-applied.v2.json +25 -0
  48. package/fixtures/protocol/execution-receipt.insert-applied.v2.json +24 -0
  49. package/fixtures/protocol/execution-receipt.reconciliation-required.v2.json +25 -0
  50. package/fixtures/protocol/execution-receipt.update-applied.v2.json +25 -0
  51. package/fixtures/protocol/writeback-job.bounded-update.v3.json +43 -0
  52. package/fixtures/protocol/writeback-job.compensation-update.v4.json +34 -0
  53. package/fixtures/protocol/writeback-job.delete.v2.json +22 -0
  54. package/fixtures/protocol/writeback-job.insert.v2.json +28 -0
  55. package/fixtures/protocol/writeback-job.update.v2.json +24 -0
  56. package/package.json +1 -1
  57. package/schemas/change-set.v2.schema.json +245 -0
  58. package/schemas/change-set.v3.schema.json +112 -0
  59. package/schemas/compensation-change-set.v1.schema.json +32 -0
  60. package/schemas/execution-receipt.v2.schema.json +106 -0
  61. package/schemas/execution-receipt.v3.schema.json +40 -0
  62. package/schemas/execution-receipt.v4.schema.json +22 -0
  63. package/schemas/inverse-descriptor.v1.schema.json +46 -0
  64. package/schemas/synapsor.runner.schema.json +132 -2
  65. package/schemas/writeback-job.v2.schema.json +238 -0
  66. package/schemas/writeback-job.v3.schema.json +53 -0
  67. package/schemas/writeback-job.v4.schema.json +17 -0
@@ -1,45 +1,160 @@
1
1
  {
2
2
  "schema_version": "synapsor.protocol-manifest.v1",
3
3
  "protocol_set": "database-mcp-writeback",
4
- "version": "0.1.0-alpha",
4
+ "version": "1.4.0",
5
5
  "hash_algorithm": "sha256",
6
6
  "note": "This manifest is copied in Synapsor main protocol/MANIFEST.json and synapsor-runner fixtures/protocol/MANIFEST.json. Hashes are over the checked-in JSON artifact bytes.",
7
7
  "artifacts": [
8
+ {
9
+ "kind": "fixture",
10
+ "name": "change-set.bounded-update.v3.json",
11
+ "sha256": "9d60a96cd5f14b9cf36f635214398437676bd90fbb180b3befe1596f982a2f02"
12
+ },
13
+ {
14
+ "kind": "fixture",
15
+ "name": "change-set.delete.v2.json",
16
+ "sha256": "8edb7b999f3b5efc3c3a985d353672e3422a5eb186d25447bedbcefc63255a54"
17
+ },
18
+ {
19
+ "kind": "fixture",
20
+ "name": "change-set.insert.v2.json",
21
+ "sha256": "6afd4347cf911a1d169e8291cafc89213826a6975b5d6a3e7d5b22dab545a1e7"
22
+ },
8
23
  {
9
24
  "kind": "fixture",
10
25
  "name": "change-set.late-fee-waiver.v1.json",
11
26
  "sha256": "7112d0f28832e61b4ac5846d169666c0476ba92eb68c6790c10ac614ee3f2b33"
12
27
  },
28
+ {
29
+ "kind": "fixture",
30
+ "name": "change-set.update.v2.json",
31
+ "sha256": "65000de0fdf12504de7a63044efa65a8d2a405a1730a1faee43756a8783b02d3"
32
+ },
33
+ {
34
+ "kind": "fixture",
35
+ "name": "compensation-change-set.update.v1.json",
36
+ "sha256": "905742980c71ddbff9dbae07ecd0ae6a00a853a690e3f4f43b1faa7089195bda"
37
+ },
13
38
  {
14
39
  "kind": "fixture",
15
40
  "name": "execution-receipt.applied.v1.json",
16
41
  "sha256": "5af8be1b72b03d5a4c7af22748d9ade9f0febbf5e9503931054361ef998b5870"
17
42
  },
43
+ {
44
+ "kind": "fixture",
45
+ "name": "execution-receipt.bounded-update-applied.v3.json",
46
+ "sha256": "bb403094605cfd1edc9d30f7ecfacce2e6eafe39d36f6b63d0cbf6baa32491cd"
47
+ },
48
+ {
49
+ "kind": "fixture",
50
+ "name": "execution-receipt.compensation-update-applied.v4.json",
51
+ "sha256": "997670312f06cf66ad74adbd51041129ded1ea2fe849e3be2432b7684361af2a"
52
+ },
18
53
  {
19
54
  "kind": "fixture",
20
55
  "name": "execution-receipt.conflict.v1.json",
21
56
  "sha256": "64e8a5fd90cdeafa2dd92a2c67cad1307b9d09e585cc82b06b987bde382f7733"
22
57
  },
58
+ {
59
+ "kind": "fixture",
60
+ "name": "execution-receipt.delete-applied.v2.json",
61
+ "sha256": "e95764a32d5d5a89ceb738e472627fefb290a24185225a092c35e3250a7f9279"
62
+ },
63
+ {
64
+ "kind": "fixture",
65
+ "name": "execution-receipt.insert-applied.v2.json",
66
+ "sha256": "e6e69f26c1847aa612bccb130e44f213bd4e10afeea0a1c0f3c99b0152a39c82"
67
+ },
68
+ {
69
+ "kind": "fixture",
70
+ "name": "execution-receipt.reconciliation-required.v2.json",
71
+ "sha256": "cb64cd45c6a73c088b933498bcbb3d3dcbc684b37919633836f5328f598d4a05"
72
+ },
73
+ {
74
+ "kind": "fixture",
75
+ "name": "execution-receipt.update-applied.v2.json",
76
+ "sha256": "31be662ec370db24528f71c60423a9d4a6da8a7bc2922b4d222d92d650568743"
77
+ },
23
78
  {
24
79
  "kind": "fixture",
25
80
  "name": "runner-registration.v1.json",
26
81
  "sha256": "3eaf844cdc94a4274601cedfed7252d65dd837a345c8c3b0f17ab6bbdf7f75da"
27
82
  },
83
+ {
84
+ "kind": "fixture",
85
+ "name": "writeback-job.bounded-update.v3.json",
86
+ "sha256": "7c69131f08a74d2f33548738685c836aecfb7d0fee46d9f0284611ad09a4a84d"
87
+ },
88
+ {
89
+ "kind": "fixture",
90
+ "name": "writeback-job.compensation-update.v4.json",
91
+ "sha256": "ea2af749dc64dc4cf8bbdd1faf12e22545d851f3c9091faa9d2f632528bd95ff"
92
+ },
93
+ {
94
+ "kind": "fixture",
95
+ "name": "writeback-job.delete.v2.json",
96
+ "sha256": "4169885a125528a09e06b55184969edd96e2a179711c664d4a61622f0d0b3b19"
97
+ },
98
+ {
99
+ "kind": "fixture",
100
+ "name": "writeback-job.insert.v2.json",
101
+ "sha256": "adb73a1115db92903d15561ded54f0dd4905c6486465691d69e5345813564912"
102
+ },
28
103
  {
29
104
  "kind": "fixture",
30
105
  "name": "writeback-job.late-fee-waiver.v1.json",
31
106
  "sha256": "577e7987427031b55134c3d7296e644b1c8b7adec495758d4cff3665e954dbc8"
32
107
  },
108
+ {
109
+ "kind": "fixture",
110
+ "name": "writeback-job.update.v2.json",
111
+ "sha256": "c9517aac1c12ba43c163ff648b45dd507b41921bdb27fcd7ddef86b92e4777e9"
112
+ },
33
113
  {
34
114
  "kind": "schema",
35
115
  "name": "change-set.v1.schema.json",
36
116
  "sha256": "119ac84f7189e9433d4eaac4defb6ef7c459a14e55e1563aa7948b746d816af5"
37
117
  },
118
+ {
119
+ "kind": "schema",
120
+ "name": "change-set.v2.schema.json",
121
+ "sha256": "cd07204661d08eba31c0cd1f878b881a5b771702de4019f4cf410628384349f8"
122
+ },
123
+ {
124
+ "kind": "schema",
125
+ "name": "change-set.v3.schema.json",
126
+ "sha256": "c14a5c787c2a269dfee98911fbba40aaa53fa8d5a007d694366ba8b58e20f0b3"
127
+ },
128
+ {
129
+ "kind": "schema",
130
+ "name": "compensation-change-set.v1.schema.json",
131
+ "sha256": "24585f9c53bd89119bf7a7ea92a587d37fe7dccbf1517d6736b5ecdeff2b9ebc"
132
+ },
38
133
  {
39
134
  "kind": "schema",
40
135
  "name": "execution-receipt.v1.schema.json",
41
136
  "sha256": "69504ce51fa66440e42d57ef6cb36cc6d8543427d8d385c9ccff954ecae5ec83"
42
137
  },
138
+ {
139
+ "kind": "schema",
140
+ "name": "execution-receipt.v2.schema.json",
141
+ "sha256": "e1307760b127d2b8bf459596c49f349b99bfeb412d8faf44d83e55ded0475547"
142
+ },
143
+ {
144
+ "kind": "schema",
145
+ "name": "execution-receipt.v3.schema.json",
146
+ "sha256": "11f75532683151a38b2ca21baa45877d39b4aeb6712289961784bf4434853a00"
147
+ },
148
+ {
149
+ "kind": "schema",
150
+ "name": "execution-receipt.v4.schema.json",
151
+ "sha256": "1f75e88da8340a71fba5c8dd16f19bc38a89615134b36d235c74122e2adea499"
152
+ },
153
+ {
154
+ "kind": "schema",
155
+ "name": "inverse-descriptor.v1.schema.json",
156
+ "sha256": "ae3aa626896bdc114f5368fee4803994852bb5263a24c234f456e05f1d875fd0"
157
+ },
43
158
  {
44
159
  "kind": "schema",
45
160
  "name": "runner-registration.v1.schema.json",
@@ -49,6 +164,21 @@
49
164
  "kind": "schema",
50
165
  "name": "writeback-job.v1.schema.json",
51
166
  "sha256": "eab35194dd6b6caa7694aa8f14afbf265338d6ee8ed3d3db5d08ec83c4e7092e"
167
+ },
168
+ {
169
+ "kind": "schema",
170
+ "name": "writeback-job.v2.schema.json",
171
+ "sha256": "6f959deedffcb9193b7dffbb0e0beb681bb0b421b6c4460ca14733e3e18acd1f"
172
+ },
173
+ {
174
+ "kind": "schema",
175
+ "name": "writeback-job.v3.schema.json",
176
+ "sha256": "9ee7992ada437f5df9e1f551e0a16a00db0e98ab5dd745f78848b3e4cdb11cfa"
177
+ },
178
+ {
179
+ "kind": "schema",
180
+ "name": "writeback-job.v4.schema.json",
181
+ "sha256": "5031e2476ddaf96042c596e76626d8ce8bce2eb51f7167c92bef44d1676a0487"
52
182
  }
53
183
  ]
54
184
  }
@@ -0,0 +1,57 @@
1
+ {
2
+ "schema_version": "synapsor.change-set.v3",
3
+ "proposal_id": "wrp_set_1",
4
+ "proposal_version": 1,
5
+ "action": "billing.close_overdue_invoices",
6
+ "operation": "set_update",
7
+ "mode": "review_required",
8
+ "principal": { "id": "support_agent_17", "source": "trusted_session" },
9
+ "scope": { "tenant_id": "acme", "business_object": "invoice_set", "object_id": "set_125f9d6d" },
10
+ "source": {
11
+ "kind": "external_postgres",
12
+ "source_id": "src_pg_acme",
13
+ "schema": "public",
14
+ "table": "invoices",
15
+ "primary_key": { "column": "id" }
16
+ },
17
+ "before": { "row_count": 2 },
18
+ "patch": { "status": "closed" },
19
+ "after": { "row_count": 2 },
20
+ "guards": {
21
+ "tenant": { "column": "tenant_id", "value": "acme" },
22
+ "allowed_columns": ["status"],
23
+ "version_advance": { "column": "version", "strategy": "integer_increment" }
24
+ },
25
+ "frozen_set": {
26
+ "max_rows": 10,
27
+ "row_count": 2,
28
+ "aggregate_bounds": [
29
+ { "column": "balance_cents", "measure": "before", "maximum": 20000, "actual": 15000 }
30
+ ],
31
+ "members": [
32
+ {
33
+ "primary_key": { "column": "id", "value": "INV-1" },
34
+ "expected_version": { "column": "version", "value": 1 },
35
+ "before": { "id": "INV-1", "tenant_id": "acme", "status": "overdue", "balance_cents": 5000, "version": 1 },
36
+ "after": { "id": "INV-1", "tenant_id": "acme", "status": "closed", "balance_cents": 5000, "version": 2 },
37
+ "before_digest": "sha256:121a4e4a3b4a17b0512be105da24c3d862f58954a562fccf35ef0448eef4c1cc",
38
+ "after_digest": "sha256:e4a7190be97c2900e5c2b21c074034600071556d83c6db102b7a6e8151e2245d"
39
+ },
40
+ {
41
+ "primary_key": { "column": "id", "value": "INV-2" },
42
+ "expected_version": { "column": "version", "value": 2 },
43
+ "before": { "id": "INV-2", "tenant_id": "acme", "status": "overdue", "balance_cents": 10000, "version": 2 },
44
+ "after": { "id": "INV-2", "tenant_id": "acme", "status": "closed", "balance_cents": 10000, "version": 3 },
45
+ "before_digest": "sha256:ba8de5489184141d739c2242d441b23e32eaa7b410031612d0abd77dd1b00b94",
46
+ "after_digest": "sha256:3ac87d24b7b683bacdc3d2ef923b89e82fdf2c0c25265cea7750989c7ae06397"
47
+ }
48
+ ],
49
+ "set_digest": "sha256:125f9d6d6feca7f26371ce9bb29933d6904828bc6c98ec5a231efbe07af0212f"
50
+ },
51
+ "evidence": { "bundle_id": "ev_set_1", "query_fingerprint": "sha256:fixed-overdue-selection", "items": [] },
52
+ "approval": { "status": "pending", "mode": "human", "required_role": "billing_reviewer" },
53
+ "writeback": { "status": "not_applied", "mode": "trusted_worker_required", "executor": "sql_update" },
54
+ "source_database_mutated": false,
55
+ "integrity": { "proposal_hash": "sha256:proposal-set-1" },
56
+ "created_at": "2026-07-13T00:00:00Z"
57
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "schema_version": "synapsor.change-set.v2",
3
+ "proposal_id": "wrp_delete_2003",
4
+ "proposal_version": 1,
5
+ "action": "support.propose_pending_task_delete",
6
+ "operation": "single_row_delete",
7
+ "mode": "review_required",
8
+ "principal": { "id": "operator_demo", "source": "trusted_session" },
9
+ "scope": { "tenant_id": "tenant_demo", "business_object": "pending_task", "object_id": "task_2003" },
10
+ "source": {
11
+ "kind": "external_mysql",
12
+ "source_id": "src_support_demo",
13
+ "schema": "support",
14
+ "table": "pending_tasks",
15
+ "primary_key": { "column": "id", "value": "task_2003" }
16
+ },
17
+ "before": { "id": "task_2003", "tenant_id": "tenant_demo", "status": "pending", "version": 4 },
18
+ "patch": {},
19
+ "after": {},
20
+ "guards": {
21
+ "tenant": { "column": "tenant_id", "value": "tenant_demo" },
22
+ "allowed_columns": [],
23
+ "expected_version": { "column": "version", "value": 4 }
24
+ },
25
+ "evidence": { "bundle_id": "ev_delete_2003", "query_fingerprint": "sha256:delete-evidence", "items": [] },
26
+ "approval": { "status": "pending", "required_role": "support_reviewer" },
27
+ "writeback": { "status": "not_applied", "mode": "trusted_worker_required" },
28
+ "source_database_mutated": false,
29
+ "integrity": { "proposal_hash": "sha256:delete-proposal" },
30
+ "created_at": "2026-07-13T18:02:00Z"
31
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "schema_version": "synapsor.change-set.v2",
3
+ "proposal_id": "wrp_insert_2002",
4
+ "proposal_version": 1,
5
+ "action": "support.propose_account_credit",
6
+ "operation": "single_row_insert",
7
+ "mode": "review_required",
8
+ "principal": { "id": "operator_demo", "source": "trusted_session" },
9
+ "scope": { "tenant_id": "tenant_demo", "business_object": "account_credit", "object_id": "credit_wrp_insert_2002" },
10
+ "source": {
11
+ "kind": "external_postgres",
12
+ "source_id": "src_billing_demo",
13
+ "schema": "public",
14
+ "table": "account_credits",
15
+ "primary_key": { "column": "id" }
16
+ },
17
+ "before": {},
18
+ "patch": { "amount_cents": 2500, "reason": "service interruption" },
19
+ "after": { "id": "credit_wrp_insert_2002", "tenant_id": "tenant_demo", "request_id": "wrp_insert_2002", "amount_cents": 2500, "reason": "service interruption" },
20
+ "guards": {
21
+ "tenant": { "column": "tenant_id", "value": "tenant_demo" },
22
+ "allowed_columns": ["amount_cents", "reason"],
23
+ "deduplication": {
24
+ "components": [
25
+ { "column": "tenant_id", "value": "tenant_demo", "source": "trusted_tenant" },
26
+ { "column": "request_id", "value": "wrp_insert_2002", "source": "proposal_id" }
27
+ ]
28
+ }
29
+ },
30
+ "evidence": { "bundle_id": "ev_insert_2002", "query_fingerprint": "sha256:insert-evidence", "items": [] },
31
+ "approval": { "status": "pending", "required_role": "support_reviewer" },
32
+ "writeback": { "status": "not_applied", "mode": "trusted_worker_required" },
33
+ "source_database_mutated": false,
34
+ "integrity": { "proposal_hash": "sha256:insert-proposal" },
35
+ "created_at": "2026-07-13T18:01:00Z"
36
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schema_version": "synapsor.change-set.v2",
3
+ "proposal_id": "wrp_update_2001",
4
+ "proposal_version": 1,
5
+ "action": "billing.propose_plan_credit_update",
6
+ "operation": "single_row_update",
7
+ "mode": "review_required",
8
+ "principal": { "id": "operator_demo", "source": "trusted_session" },
9
+ "scope": { "tenant_id": "tenant_demo", "business_object": "account_credit", "object_id": "credit_2001" },
10
+ "source": {
11
+ "kind": "external_postgres",
12
+ "source_id": "src_billing_demo",
13
+ "schema": "public",
14
+ "table": "account_credits",
15
+ "primary_key": { "column": "id", "value": "credit_2001" }
16
+ },
17
+ "before": { "id": "credit_2001", "tenant_id": "tenant_demo", "amount_cents": 1000, "version": 7 },
18
+ "patch": { "amount_cents": 2500 },
19
+ "after": { "id": "credit_2001", "tenant_id": "tenant_demo", "amount_cents": 2500, "version": 8 },
20
+ "guards": {
21
+ "tenant": { "column": "tenant_id", "value": "tenant_demo" },
22
+ "allowed_columns": ["amount_cents"],
23
+ "expected_version": { "column": "version", "value": 7 },
24
+ "version_advance": { "column": "version", "strategy": "integer_increment" }
25
+ },
26
+ "evidence": { "bundle_id": "ev_update_2001", "query_fingerprint": "sha256:update-evidence", "items": [] },
27
+ "approval": { "status": "pending", "required_role": "billing_reviewer" },
28
+ "writeback": { "status": "not_applied", "mode": "trusted_worker_required" },
29
+ "source_database_mutated": false,
30
+ "integrity": { "proposal_hash": "sha256:update-proposal" },
31
+ "created_at": "2026-07-13T18:00:00Z"
32
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "schema_version": "synapsor.compensation-change-set.v1",
3
+ "proposal_id": "wrp_revert_1",
4
+ "proposal_version": 1,
5
+ "action": "billing.revert_plan_credit",
6
+ "mode": "review_required",
7
+ "principal": { "id": "operator_1", "source": "trusted_session" },
8
+ "scope": { "tenant_id": "acme", "business_object": "customers", "object_id": "CUS-1" },
9
+ "source": { "kind": "external_postgres", "source_id": "src_1", "schema": "public", "table": "customers", "primary_key": { "column": "id", "value": "CUS-1" } },
10
+ "before": { "plan_credit_cents": 2500, "version": 8 },
11
+ "patch": { "plan_credit_cents": 0 },
12
+ "after": { "plan_credit_cents": 0, "version": 9 },
13
+ "compensation": {
14
+ "forward_receipt_hash": "sha256:forward-receipt",
15
+ "descriptor": {
16
+ "schema_version": "synapsor.inverse-descriptor.v1",
17
+ "availability": "available",
18
+ "reason_codes": [],
19
+ "operation": "restore_update",
20
+ "cardinality": "single",
21
+ "forward_proposal_id": "wrp_forward_1",
22
+ "forward_writeback_job_id": "wbj_forward_1",
23
+ "target": { "source_id": "src_1", "schema": "public", "table": "customers", "primary_key_column": "id" },
24
+ "tenant_guard": { "column": "tenant_id", "value": "acme" },
25
+ "allowed_columns": ["plan_credit_cents"],
26
+ "members": [{ "primary_key": { "column": "id", "value": "CUS-1" }, "expected_state": { "plan_credit_cents": 2500, "version": 8 }, "restore_values": { "plan_credit_cents": 0 } }],
27
+ "max_rows": 1,
28
+ "aggregate_bounds": [],
29
+ "version_advance": { "column": "version", "strategy": "integer_increment" },
30
+ "lineage": { "root_proposal_id": "wrp_forward_1", "parent_proposal_id": "wrp_forward_1", "reverts_proposal_id": "wrp_forward_1", "depth": 1 }
31
+ }
32
+ },
33
+ "guards": { "tenant": { "column": "tenant_id", "value": "acme" }, "allowed_columns": ["plan_credit_cents"] },
34
+ "evidence": { "bundle_id": "ev_revert_1", "query_fingerprint": "sha256:revert-query", "items": [] },
35
+ "approval": { "status": "pending", "mode": "human", "required_role": "reviewer", "required_approvals": 1 },
36
+ "writeback": { "status": "not_applied", "mode": "trusted_worker_required", "executor": "sql_update" },
37
+ "source_database_mutated": false,
38
+ "integrity": { "proposal_hash": "sha256:revert-proposal" },
39
+ "created_at": "2026-07-13T00:00:00Z"
40
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "schema_version": "synapsor.execution-receipt.v3",
3
+ "writeback_job_id": "wbj_set_1",
4
+ "proposal_id": "wrp_set_1",
5
+ "proposal_hash": "sha256:proposal-set-1",
6
+ "approval_id": "sha256:proposal-set-1",
7
+ "runner_id": "runner_1",
8
+ "operation": "set_update",
9
+ "receipt_authority": "source_db",
10
+ "status": "applied",
11
+ "target": {
12
+ "source_id": "src_pg_acme",
13
+ "schema": "public",
14
+ "table": "invoices",
15
+ "identities": [
16
+ { "column": "id", "value": "INV-1" },
17
+ { "column": "id", "value": "INV-2" }
18
+ ],
19
+ "set_digest": "sha256:125f9d6d6feca7f26371ce9bb29933d6904828bc6c98ec5a231efbe07af0212f"
20
+ },
21
+ "rows_affected": 2,
22
+ "idempotency_key": "wrp_set_1:set_125f9d6d",
23
+ "member_effects": [
24
+ {
25
+ "primary_key": { "column": "id", "value": "INV-1" },
26
+ "before_digest": "sha256:121a4e4a3b4a17b0512be105da24c3d862f58954a562fccf35ef0448eef4c1cc",
27
+ "after_digest": "sha256:e4a7190be97c2900e5c2b21c074034600071556d83c6db102b7a6e8151e2245d"
28
+ },
29
+ {
30
+ "primary_key": { "column": "id", "value": "INV-2" },
31
+ "before_digest": "sha256:ba8de5489184141d739c2242d441b23e32eaa7b410031612d0abd77dd1b00b94",
32
+ "after_digest": "sha256:3ac87d24b7b683bacdc3d2ef923b89e82fdf2c0c25265cea7750989c7ae06397"
33
+ }
34
+ ],
35
+ "source_database_mutated": true,
36
+ "safe_outcome_code": "APPLIED",
37
+ "executed_at": "2026-07-13T00:00:01Z",
38
+ "receipt_hash": "sha256:receipt-set-1"
39
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "schema_version": "synapsor.execution-receipt.v4",
3
+ "writeback_job_id": "wbj_revert_1",
4
+ "proposal_id": "wrp_revert_1",
5
+ "proposal_hash": "sha256:revert-proposal",
6
+ "approval_id": "approval_revert_1",
7
+ "runner_id": "runner_1",
8
+ "operation": "restore_update",
9
+ "receipt_authority": "source_db",
10
+ "status": "applied",
11
+ "target": { "source_id": "src_1", "schema": "public", "table": "customers", "identities": [{ "column": "id", "value": "CUS-1" }] },
12
+ "rows_affected": 1,
13
+ "idempotency_key": "revert:wrp_forward_1:wrp_revert_1",
14
+ "forward_receipt_hash": "sha256:forward-receipt",
15
+ "member_effects": [{ "primary_key": { "column": "id", "value": "CUS-1" }, "before_digest": "sha256:forward-state", "after_digest": "sha256:restored-state" }],
16
+ "inverse": {
17
+ "schema_version": "synapsor.inverse-descriptor.v1",
18
+ "availability": "available",
19
+ "reason_codes": [],
20
+ "operation": "restore_update",
21
+ "cardinality": "single",
22
+ "forward_proposal_id": "wrp_revert_1",
23
+ "forward_writeback_job_id": "wbj_revert_1",
24
+ "target": { "source_id": "src_1", "schema": "public", "table": "customers", "primary_key_column": "id" },
25
+ "tenant_guard": { "column": "tenant_id", "value": "acme" },
26
+ "allowed_columns": ["plan_credit_cents"],
27
+ "members": [{ "primary_key": { "column": "id", "value": "CUS-1" }, "expected_state": { "plan_credit_cents": 0, "version": 9 }, "restore_values": { "plan_credit_cents": 2500 } }],
28
+ "max_rows": 1,
29
+ "aggregate_bounds": [],
30
+ "version_advance": { "column": "version", "strategy": "integer_increment" },
31
+ "lineage": { "root_proposal_id": "wrp_forward_1", "parent_proposal_id": "wrp_revert_1", "reverts_proposal_id": "wrp_revert_1", "depth": 2 }
32
+ },
33
+ "source_database_mutated": true,
34
+ "safe_outcome_code": "APPLIED",
35
+ "executed_at": "2026-07-13T00:01:00Z",
36
+ "receipt_hash": "sha256:revert-receipt"
37
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "schema_version": "synapsor.execution-receipt.v2",
3
+ "writeback_job_id": "wbj_delete_2003",
4
+ "proposal_id": "wrp_delete_2003",
5
+ "proposal_hash": "sha256:delete-proposal",
6
+ "approval_id": "approval_delete_2003",
7
+ "runner_id": "runner_demo",
8
+ "operation": "single_row_delete",
9
+ "receipt_authority": "runner_ledger",
10
+ "status": "applied",
11
+ "target": {
12
+ "source_id": "src_support_demo",
13
+ "schema": "support",
14
+ "table": "pending_tasks",
15
+ "identity": [{ "column": "id", "value": "task_2003" }, { "column": "tenant_id", "value": "tenant_demo" }]
16
+ },
17
+ "rows_affected": 1,
18
+ "idempotency_key": "idem_delete_2003",
19
+ "before_digest": "sha256:delete-before",
20
+ "tombstone_digest": "sha256:delete-tombstone",
21
+ "source_database_mutated": true,
22
+ "safe_outcome_code": "APPLIED",
23
+ "executed_at": "2026-07-13T18:12:00Z",
24
+ "receipt_hash": "sha256:delete-receipt"
25
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "schema_version": "synapsor.execution-receipt.v2",
3
+ "writeback_job_id": "wbj_insert_2002",
4
+ "proposal_id": "wrp_insert_2002",
5
+ "proposal_hash": "sha256:insert-proposal",
6
+ "approval_id": "approval_insert_2002",
7
+ "runner_id": "runner_demo",
8
+ "operation": "single_row_insert",
9
+ "receipt_authority": "source_db",
10
+ "status": "applied",
11
+ "target": {
12
+ "source_id": "src_billing_demo",
13
+ "schema": "public",
14
+ "table": "account_credits",
15
+ "identity": [{ "column": "tenant_id", "value": "tenant_demo" }, { "column": "request_id", "value": "wrp_insert_2002" }]
16
+ },
17
+ "rows_affected": 1,
18
+ "idempotency_key": "idem_insert_2002",
19
+ "after_digest": "sha256:insert-after",
20
+ "source_database_mutated": true,
21
+ "safe_outcome_code": "APPLIED",
22
+ "executed_at": "2026-07-13T18:11:00Z",
23
+ "receipt_hash": "sha256:insert-receipt"
24
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "schema_version": "synapsor.execution-receipt.v2",
3
+ "writeback_job_id": "wbj_update_2004",
4
+ "proposal_id": "wrp_update_2004",
5
+ "proposal_hash": "sha256:reconcile-proposal",
6
+ "approval_id": "approval_update_2004",
7
+ "runner_id": "runner_demo",
8
+ "operation": "single_row_update",
9
+ "receipt_authority": "runner_ledger",
10
+ "status": "reconciliation_required",
11
+ "target": {
12
+ "source_id": "src_billing_demo",
13
+ "schema": "public",
14
+ "table": "account_credits",
15
+ "identity": [{ "column": "id", "value": "credit_2004" }, { "column": "tenant_id", "value": "tenant_demo" }]
16
+ },
17
+ "rows_affected": 0,
18
+ "idempotency_key": "idem_update_2004",
19
+ "source_database_mutated": false,
20
+ "safe_outcome_code": "OUTCOME_UNKNOWN",
21
+ "safe_error_code": "RECONCILIATION_REQUIRED",
22
+ "executed_at": "2026-07-13T18:13:00Z",
23
+ "receipt_hash": "sha256:reconciliation-receipt",
24
+ "reconciliation": { "intent_id": "intent_update_2004", "reason": "source_commit_not_proven" }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "schema_version": "synapsor.execution-receipt.v2",
3
+ "writeback_job_id": "wbj_update_2001",
4
+ "proposal_id": "wrp_update_2001",
5
+ "proposal_hash": "sha256:update-proposal",
6
+ "approval_id": "approval_update_2001",
7
+ "runner_id": "runner_demo",
8
+ "operation": "single_row_update",
9
+ "receipt_authority": "runner_ledger",
10
+ "status": "applied",
11
+ "target": {
12
+ "source_id": "src_billing_demo",
13
+ "schema": "public",
14
+ "table": "account_credits",
15
+ "identity": [{ "column": "id", "value": "credit_2001" }, { "column": "tenant_id", "value": "tenant_demo" }]
16
+ },
17
+ "rows_affected": 1,
18
+ "idempotency_key": "idem_update_2001",
19
+ "before_digest": "sha256:update-before",
20
+ "after_digest": "sha256:update-after",
21
+ "source_database_mutated": true,
22
+ "safe_outcome_code": "APPLIED",
23
+ "executed_at": "2026-07-13T18:10:00Z",
24
+ "receipt_hash": "sha256:update-receipt"
25
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "schema_version": "synapsor.writeback-job.v3",
3
+ "writeback_job_id": "wbj_set_1",
4
+ "proposal_id": "wrp_set_1",
5
+ "proposal_version": 1,
6
+ "proposal_hash": "sha256:proposal-set-1",
7
+ "runner_scope": { "project_id": "acme-support", "source_id": "src_pg_acme" },
8
+ "engine": "postgres",
9
+ "operation": "set_update",
10
+ "target": { "schema": "public", "table": "invoices", "primary_key": { "column": "id" } },
11
+ "tenant_guard": { "column": "tenant_id", "value": "acme" },
12
+ "allowed_columns": ["status"],
13
+ "patch": { "status": "closed" },
14
+ "version_advance": { "column": "version", "strategy": "integer_increment" },
15
+ "frozen_set": {
16
+ "max_rows": 10,
17
+ "row_count": 2,
18
+ "aggregate_bounds": [
19
+ { "column": "balance_cents", "measure": "before", "maximum": 20000, "actual": 15000 }
20
+ ],
21
+ "members": [
22
+ {
23
+ "primary_key": { "column": "id", "value": "INV-1" },
24
+ "expected_version": { "column": "version", "value": 1 },
25
+ "before": { "id": "INV-1", "tenant_id": "acme", "status": "overdue", "balance_cents": 5000, "version": 1 },
26
+ "after": { "id": "INV-1", "tenant_id": "acme", "status": "closed", "balance_cents": 5000, "version": 2 },
27
+ "before_digest": "sha256:121a4e4a3b4a17b0512be105da24c3d862f58954a562fccf35ef0448eef4c1cc",
28
+ "after_digest": "sha256:e4a7190be97c2900e5c2b21c074034600071556d83c6db102b7a6e8151e2245d"
29
+ },
30
+ {
31
+ "primary_key": { "column": "id", "value": "INV-2" },
32
+ "expected_version": { "column": "version", "value": 2 },
33
+ "before": { "id": "INV-2", "tenant_id": "acme", "status": "overdue", "balance_cents": 10000, "version": 2 },
34
+ "after": { "id": "INV-2", "tenant_id": "acme", "status": "closed", "balance_cents": 10000, "version": 3 },
35
+ "before_digest": "sha256:ba8de5489184141d739c2242d441b23e32eaa7b410031612d0abd77dd1b00b94",
36
+ "after_digest": "sha256:3ac87d24b7b683bacdc3d2ef923b89e82fdf2c0c25265cea7750989c7ae06397"
37
+ }
38
+ ],
39
+ "set_digest": "sha256:125f9d6d6feca7f26371ce9bb29933d6904828bc6c98ec5a231efbe07af0212f"
40
+ },
41
+ "idempotency_key": "wrp_set_1:set_125f9d6d",
42
+ "lease": { "lease_id": "lease_set_1", "attempt": 1, "expires_at": "2026-07-13T00:05:00Z" }
43
+ }