@wowok/agent-mcp 3.2.7 → 3.3.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.
- package/README.md +2 -2
- package/dist/chain-semantics/field-capability.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/fund-flow.js +1 -1
- package/dist/chain-semantics/guard-verbs.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/composition/audit.js +1 -1
- package/dist/composition/compile.d.ts +10 -1
- package/dist/composition/compile.js +1 -1
- package/dist/composition/inflight.d.ts +10 -0
- package/dist/composition/inflight.js +1 -1
- package/dist/extensions/business-modules.d.ts +1 -1
- package/dist/extensions/business-modules.js +1 -1
- package/dist/extensions/capability-manifest.js +1 -1
- package/dist/extensions/industry-audit.spec.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/graph/onchain/edge-schema.js +1 -1
- package/dist/graph/onchain/facts.spec.js +1 -1
- package/dist/graph/onchain/field-manifest.js +1 -1
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/index.js +1 -1
- package/dist/harness/operation-id.d.ts +1 -0
- package/dist/harness/operation-id.js +1 -0
- package/dist/harness/recover.js +1 -1
- package/dist/index.js +1 -1
- package/dist/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/keeper/KeeperScan.d.ts +2 -1
- package/dist/keeper/KeeperScan.js +1 -1
- package/dist/keeper/keeper.spec.js +1 -1
- package/dist/keeper/types.d.ts +3 -0
- package/dist/keeper/types.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.d.ts +34 -0
- package/dist/knowledge/allocator-rail-verifier.js +1 -0
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/arbitration-venue-order.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +19 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/alloc_audit.json +1 -1
- package/dist/knowledge/baselines/rules/arb.json +1 -1
- package/dist/knowledge/baselines/rules/guard.json +106 -1
- package/dist/knowledge/baselines/rules/machine.json +9 -6
- package/dist/knowledge/baselines/rules/plan.json +40 -17
- package/dist/knowledge/baselines/semantic-facts.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +1 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/contract-invariants.js +1 -1
- package/dist/knowledge/discount-threshold.d.ts +11 -0
- package/dist/knowledge/discount-threshold.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-anchor-reach.d.ts +1 -1
- package/dist/knowledge/guard-anchor-reach.js +1 -1
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.d.ts +1 -0
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-submission-brief.d.ts +6 -0
- package/dist/knowledge/guard-submission-brief.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +2 -2
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-puzzle.d.ts +1 -1
- package/dist/knowledge/machine-puzzle.js +1 -1
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/machine-topology.d.ts +8 -0
- package/dist/knowledge/machine-topology.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/permission-ledger.js +1 -1
- package/dist/knowledge/protocol-facts.d.ts +16 -0
- package/dist/knowledge/protocol-facts.js +1 -0
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/reward-ledger.d.ts +2 -1
- package/dist/knowledge/reward-ledger.js +1 -1
- package/dist/knowledge/reward-templates.js +1 -1
- package/dist/knowledge/safety-rules.d.ts +0 -2
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +7 -0
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +13 -1
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +2 -0
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tool-constraints.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +7 -3
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/normalize.d.ts +1 -1
- package/dist/monitor/normalize.js +1 -1
- package/dist/monitor/types.d.ts +1 -1
- package/dist/monitor/types.js +1 -1
- package/dist/participation/radar-core.d.ts +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/game-theory.d.ts +1 -0
- package/dist/playbooks/service-build/game-theory.js +1 -1
- package/dist/playbooks/service-build/intent-analyzer.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +8 -0
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +28 -1
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.d.ts +2 -0
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/playbooks/service-build/service-quote.spec.js +1 -1
- package/dist/relationship/registry.js +1 -1
- package/dist/review/index.js +1 -1
- package/dist/role/profiles.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/safety/preview.d.ts +1 -0
- package/dist/safety/preview.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +19 -1
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.d.ts +1 -1
- package/dist/schema/call/arbitration.d.ts +8 -8
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +52 -5
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +3 -0
- package/dist/schema/call/contact.d.ts +5 -5
- package/dist/schema/call/demand.d.ts +5 -5
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/guard.d.ts +3 -3
- package/dist/schema/call/guard.js +1 -1
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +13 -5
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.d.ts +5 -5
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/permission.d.ts +5 -5
- package/dist/schema/call/personal.d.ts +4 -4
- package/dist/schema/call/progress.d.ts +5 -5
- package/dist/schema/call/progress.js +1 -1
- package/dist/schema/call/proof.js +1 -1
- package/dist/schema/call/receipt.d.ts +8 -0
- package/dist/schema/call/receipt.js +1 -1
- package/dist/schema/call/repository.d.ts +9 -9
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.d.ts +25 -5
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +10 -5
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +5 -5
- package/dist/schema/common/index.d.ts +6 -6
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/goal/index.d.ts +17 -1
- package/dist/schema/goal/planning.d.ts +28 -2
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +3 -0
- package/dist/schema/industry-pack/index.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +9 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/local/index.d.ts +31 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +57 -43
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/bi.d.ts +22 -6
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +164 -102
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-query/index.d.ts +2 -0
- package/dist/schema/schema-query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/utils/permission-machine-check.d.ts +2 -0
- package/dist/schema/utils/permission-machine-check.js +1 -1
- package/dist/schema/workflow/index.d.ts +1 -1
- package/dist/schema-query-impl/index.d.ts +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +3 -0
- package/dist/schemas/account_operation.schema.json +4 -4
- package/dist/schemas/benchmark_migration_operation.output.json +42 -0
- package/dist/schemas/benchmark_migration_operation.schema.json +40 -3
- package/dist/schemas/bridge_operation.output.json +3 -0
- package/dist/schemas/goal_operation.schema.json +52 -2
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/industry_pack_operation.output.json +8 -0
- package/dist/schemas/industry_pack_operation.schema.json +9 -0
- package/dist/schemas/intent_radar.output.json +8 -2
- package/dist/schemas/intent_radar.schema.json +4 -1
- package/dist/schemas/local_cache_operation.output.json +3 -0
- package/dist/schemas/local_history_operation.output.json +3 -0
- package/dist/schemas/local_info_operation.output.json +3 -0
- package/dist/schemas/local_mark_operation.output.json +3 -0
- package/dist/schemas/messenger_operation.schema.json +4 -4
- package/dist/schemas/monitor_events.schema.json +3 -1
- package/dist/schemas/onchain_events.output.json +275 -11
- package/dist/schemas/onchain_events.schema.json +25 -1
- package/dist/schemas/onchain_operations.output.json +47 -5
- package/dist/schemas/onchain_operations.schema.json +664 -179
- package/dist/schemas/onchain_operations_allocation.schema.json +7 -7
- package/dist/schemas/onchain_operations_arbitration.schema.json +21 -15
- package/dist/schemas/onchain_operations_contact.schema.json +15 -10
- package/dist/schemas/onchain_operations_demand.schema.json +15 -10
- package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -5
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +346 -8
- package/dist/schemas/onchain_operations_machine.schema.json +24 -11
- package/dist/schemas/onchain_operations_order.schema.json +17 -12
- package/dist/schemas/onchain_operations_permission.schema.json +10 -5
- package/dist/schemas/onchain_operations_personal.schema.json +2 -2
- package/dist/schemas/onchain_operations_progress.schema.json +17 -12
- package/dist/schemas/onchain_operations_proof.schema.json +6 -6
- package/dist/schemas/onchain_operations_repository.schema.json +19 -14
- package/dist/schemas/onchain_operations_reward.schema.json +96 -15
- package/dist/schemas/onchain_operations_service.schema.json +33 -21
- package/dist/schemas/onchain_operations_treasury.schema.json +15 -10
- package/dist/schemas/onchain_table_data.output.json +7 -7
- package/dist/schemas/query_toolkit.output.json +268 -44
- package/dist/schemas/query_toolkit.schema.json +1 -1
- package/dist/schemas/schema_query.schema.json +7 -2
- package/dist/schemas/workflow_operation.schema.json +5 -5
- package/dist/schemas/wowok_buildin_info.output.json +140 -3
- package/dist/schemas/wowok_buildin_info.schema.json +2 -2
- package/dist/tools/handlers/benchmark-migration.d.ts +66 -1
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.d.ts +0 -1
- package/dist/tools/handlers/dispatch-expectations.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/intent-radar.js +1 -1
- package/dist/tools/handlers/keeper.d.ts +1 -1
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +12 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.d.ts +1 -0
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/review-chain.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/registry/agent.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/files.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/rules-hook.js +1 -1
- package/dist/tools/upgrade-check.d.ts +23 -0
- package/dist/tools/upgrade-check.js +1 -1
- package/dist/tools/wip-deploy-assist.d.ts +6 -0
- package/dist/tools/wip-deploy-assist.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"comment": "Guard rule pack (R-C/R-X) — declarative form of the retired in-code Guard risk rules (the guard condition-tree lint pack:
|
|
2
|
+
"comment": "Guard rule pack (R-C/R-X) — declarative form of the retired in-code Guard risk rules (the guard condition-tree lint pack: 39 rules over the serialized root, table classification and the scene ledger). Facts are produced by the kernel extractor (guard-risk.ts, bound to the GUARDQUERY invariant catalog, the witness chain table, the certain-outcome folder and the per-scene reentrancy specs); rules only reference fact names. Levels/wording can be retuned per rule and rules can be disabled (enabled=false, trace left) via the judgment document — factory rules can never be deleted or invented here.",
|
|
3
3
|
"facts": {
|
|
4
4
|
"has_signer_check": "KERNEL — the serialized root contains a context(Signer) check.",
|
|
5
5
|
"has_clock_check": "KERNEL — the serialized root contains a context(Clock) node.",
|
|
@@ -39,6 +39,12 @@
|
|
|
39
39
|
"rc2_04_has_conversion": "KERNEL — the root already uses a type-conversion node (convert_number_address / convert_address_number / convert_u256 / convert_string).",
|
|
40
40
|
"rc2_04_conversion_note": "KERNEL — final description tail for the conversion-present vs conversion-missing branches.",
|
|
41
41
|
"rc2_04_conversion_evidence": "KERNEL — final evidence for the conversion-present vs conversion-missing branches.",
|
|
42
|
+
"rc2_05_mismatch_count": "KERNEL — query prefixes that contradict their convert_witness target type (the witness matrix is directional; zrmn-261012 R-WITNESS-01).",
|
|
43
|
+
"rc2_05_evidence_lines": "KERNEL — the prefix-mismatch list rendered as ' - <detail>' lines, newline joined.",
|
|
44
|
+
"rc2_06_issue_count": "KERNEL — progress.* queries on a source without convert_witness that cannot be proven to be a Progress (no PROGRESS→ORDER reverse edge).",
|
|
45
|
+
"rc2_06_has_hard_mismatch": "KERNEL — at least one such source is explicitly annotated as a non-Progress (hard violation; unannotated sources grade soft).",
|
|
46
|
+
"rc2_06_evidence_lines": "KERNEL — the reverse-edge issue list rendered as ' - <detail>' lines, newline joined.",
|
|
47
|
+
"rc2_07_keys_where_count": "KERNEL — number of 'keys where' predicate occurrences in the serialized root (parameter-carrying forms abort natively, upw-mn-261012 F-28; the parameters-free 1177 Range-gte shape is the certified working path).",
|
|
42
48
|
"has_submission": "KERNEL — the table has at least one b_submission=true entry.",
|
|
43
49
|
"scene_present": "KERNEL — a binding scene was supplied.",
|
|
44
50
|
"scene_id": "KERNEL — the binding scene id (e.g. service_order_allocators_guard).",
|
|
@@ -46,6 +52,7 @@
|
|
|
46
52
|
"scene_binding_field": "KERNEL — the binding scene binding field (buy_guard/order_allocators/...).",
|
|
47
53
|
"scene_mutable_after_publish": "KERNEL — whether the scene binding can be modified after the host object is published.",
|
|
48
54
|
"rc3_01_sharing_exempt": "KERNEL — allocators scene with Entity/GuardIdentifier-only sharing (Signer binding advice does not apply; R-C3-06 owns the semantics).",
|
|
55
|
+
"rc3_01_order_anchored": "KERNEL — allocators scene where EVERY submission slot is unread by the root: submitted values cannot influence the verdict, and the chain binds GuardIdentifier recipients to the paying order via payment_info.for_object (ptrn-mn-261013 F-03).",
|
|
49
56
|
"rc3_02_numeric_count": "KERNEL — submitted numeric table entries (U8..U256) in the voting_guard scene.",
|
|
50
57
|
"rc3_02_numeric_list": "KERNEL — submitted numeric entries rendered as '#id(TYPE)', comma joined.",
|
|
51
58
|
"rc3_03_submitted_addr_count": "KERNEL — submitted Address table entries (b_submission=true, value_type=Address).",
|
|
@@ -83,6 +90,8 @@
|
|
|
83
90
|
"rx1_12_vague_csv": "KERNEL — unnamed entries rendered 'identifier=N, name=\"…\"', '; ' joined.",
|
|
84
91
|
"rx1_13_detected": "KERNEL — a table Address constant's object_type equals the scene host object (circular reference pattern).",
|
|
85
92
|
"rx1_13_identifier": "KERNEL — identifier of the circular-reference table entry.",
|
|
93
|
+
"rx1_19_order_query_count": "KERNEL — order.* query occurrences in a buy-scene guard root (the Order does not exist at buy time, zrmn-261012 R-BUY-GUARD-CIRCULAR).",
|
|
94
|
+
"rx1_19_evidence_csv": "KERNEL — the matched order.* query JSON fragments, comma-space joined.",
|
|
86
95
|
"reentry_applicable": "KERNEL — the scene has a reentrancy spec (ALLOWED scenes stay silent).",
|
|
87
96
|
"reentry_state": "KERNEL — anti-reentrancy protection state: 'protected' / 'pseudo' / 'absent'.",
|
|
88
97
|
"reentry_scene_id": "KERNEL — reentrancy scene id from the spec table.",
|
|
@@ -143,6 +152,16 @@
|
|
|
143
152
|
"evidence": "write_guard scene with no context(Signer) leaf in the root",
|
|
144
153
|
"stakeholders": ["customer", "provider", "arbitrator"]
|
|
145
154
|
},
|
|
155
|
+
{
|
|
156
|
+
"when": { "all": [{ "field": "scene_id", "op": "eq", "value": "arbitration_voting_guard" }, { "field": "tree_folds_always_true", "op": "eq", "value": true }] },
|
|
157
|
+
"level": "low",
|
|
158
|
+
"title": "Open-vote tautology on voting_guard — the declared voter universe, not a placeholder",
|
|
159
|
+
"description": "On the Arbitration voting slot an always-true guard is the SANCTIONED open-voting form: every Passport holder passes and votes at the row's FixedValue weight (tpl_voting_guard_open_vote). It matches the tautology signature R-X1-17 hunts, but here the alternative is the real hazard: an EMPTY voting_guard does not mean 'everyone may vote' — plain votes hard-require the vote permission (358), admin-only by default, and a dispute dead-locks when that admin is unresponsive (R-ARB-VOTE-LOCK blocks the service publish; crs9-F-36, mainnet-verified 2026-10-15).",
|
|
160
|
+
"scenario": "A merchant designs a public arbitration venue and binds the always-true voting guard; the tautology check must not scare them into leaving voting_guard empty",
|
|
161
|
+
"mitigation": "None needed — this is the declared intent. Confirm the weight row is FixedValue (flat one-voter-one-vote) or an intentional tier, and remember every vote call must carry the voting_guard payload once the field is set (a plain vote aborts with E_VOTING_GUARD_USED, abort 2). Weighted panels should use tpl_voting_guard_numeric_weight instead.",
|
|
162
|
+
"evidence": "Tautology: ${tree_folds_always_true_reason} (voting_guard scene — open-vote semantics)",
|
|
163
|
+
"stakeholders": ["customer", "provider", "arbitrator"]
|
|
164
|
+
},
|
|
146
165
|
{
|
|
147
166
|
"when": { "all": [{ "field": "tree_folds_always_true", "op": "eq", "value": true }, { "field": "write_guard_scene", "op": "eq", "value": false }] },
|
|
148
167
|
"level": "high",
|
|
@@ -182,6 +201,23 @@
|
|
|
182
201
|
}
|
|
183
202
|
]
|
|
184
203
|
},
|
|
204
|
+
{
|
|
205
|
+
"rule_id": "R-X1-19",
|
|
206
|
+
"dimension": "logic_gap",
|
|
207
|
+
"trigger": "A buy-scene guard queries order.* — the Order does not exist at buy time (zrmn-261012 R-BUY-GUARD-CIRCULAR)",
|
|
208
|
+
"cases": [
|
|
209
|
+
{
|
|
210
|
+
"when": { "field": "rx1_19_order_query_count", "op": "gt", "value": 0 },
|
|
211
|
+
"level": "critical",
|
|
212
|
+
"title": "Buy guard queries order.* (${rx1_19_evidence_csv}) — the Order does not exist yet, creation aborts",
|
|
213
|
+
"description": "The buy guard evaluates BEFORE the Order object exists (it gates the transaction that creates it), so every order.* query inside it is circular and cannot resolve. The ziroom mainnet run (zrmn-261012) shipped exactly this shape: a buy guard querying order.item has / order.amount — creation failed at name resolution.",
|
|
214
|
+
"scenario": "Circular buy gate: guard creation or first purchase aborts because the queried Order is the one being created",
|
|
215
|
+
"mitigation": "1) Buy-time state lives on the SERVICE, not the Order: query service.* fields (e.g. service.paused) or use table constants;\n2) Post-purchase invariants (amount, item) belong on forward/allocator guards, which run after the Order exists;\n3) ${rx1_19_evidence_csv}",
|
|
216
|
+
"evidence": "order.* queries in buy-scene guard: ${rx1_19_evidence_csv}",
|
|
217
|
+
"stakeholders": ["provider"]
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
},
|
|
185
221
|
{
|
|
186
222
|
"rule_id": "R-C1-01",
|
|
187
223
|
"dimension": "data_source_trust",
|
|
@@ -319,6 +355,66 @@
|
|
|
319
355
|
}
|
|
320
356
|
]
|
|
321
357
|
},
|
|
358
|
+
{
|
|
359
|
+
"rule_id": "R-C2-05",
|
|
360
|
+
"dimension": "data_source_trust",
|
|
361
|
+
"trigger": "Guard uses convert_witness but the query path prefix does not live on the witness target type (zrmn-261012 R-WITNESS-01: 17 mainnet guards rejected)",
|
|
362
|
+
"cases": [
|
|
363
|
+
{
|
|
364
|
+
"when": { "field": "rc2_05_mismatch_count", "op": "gt", "value": 0 },
|
|
365
|
+
"level": "critical",
|
|
366
|
+
"title": "Query path contradicts the witness target type — the chain rejects this guard",
|
|
367
|
+
"description": "convert_witness resolves the object reference to the edge's TARGET type, and the query path prefix must exist on that type. The on-chain witness matrix (common.move) is directional and has NO reverse edges.\n${rc2_05_evidence_lines}\nThis shape aborts at guard creation (native verifier type check) or silently gates on nothing — both are deterministic failures.",
|
|
368
|
+
"scenario": "Witness misuse: convert to Progress then query order.* — type mismatch rejects the guard",
|
|
369
|
+
"mitigation": "1) Make the query prefix match the witness target: 100 OrderProgress→progress.*, 101 OrderMachine→machine.*, 102 OrderService→service.*, 103 ProgressMachine→machine.*, 104 ArbOrder→order.*, 105 ArbArbitration→arb.*, 106-108 Arb→progress./service./machine.*, 109 OrderAllocation→allocation.*;\n2) If you meant to read Order fields, DROP the convert_witness (query order.* directly on the submitted Order);\n3) Run analyze_guard_semantics before creation",
|
|
370
|
+
"evidence": "${rc2_05_evidence_lines}",
|
|
371
|
+
"stakeholders": ["provider"]
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"rule_id": "R-C2-06",
|
|
377
|
+
"dimension": "data_source_trust",
|
|
378
|
+
"trigger": "Guard queries progress.* without convert_witness on an object that is not a Progress (no PROGRESS→ORDER reverse edge)",
|
|
379
|
+
"cases": [
|
|
380
|
+
{
|
|
381
|
+
"when": { "all": [{ "field": "rc2_06_issue_count", "op": "gt", "value": 0 }, { "field": "rc2_06_has_hard_mismatch", "op": "eq", "value": true }] },
|
|
382
|
+
"level": "critical",
|
|
383
|
+
"title": "progress.* queried on a non-Progress object without conversion — unresolvable on-chain",
|
|
384
|
+
"description": "The chain has NO PROGRESS→ORDER reverse edge: the only legal way to read progress fields from an Order submission is convert_witness 100 (OrderProgress).\n${rc2_06_evidence_lines}",
|
|
385
|
+
"scenario": "Reverse-edge misuse: order submitted, progress.current queried without conversion — query returns empty or aborts",
|
|
386
|
+
"mitigation": "1) Add convert_witness 100 (or the string name 'OrderProgress') to the query's object ref;\n2) Keep the query path as progress.* after conversion;\n3) Alternatively submit the Progress object itself and annotate object_type=Progress",
|
|
387
|
+
"evidence": "${rc2_06_evidence_lines}",
|
|
388
|
+
"stakeholders": ["provider"]
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"when": { "all": [{ "field": "rc2_06_issue_count", "op": "gt", "value": 0 }, { "field": "rc2_06_has_hard_mismatch", "op": "eq", "value": false }] },
|
|
392
|
+
"level": "high",
|
|
393
|
+
"title": "progress.* queried on an annotated submission without object_type — verify the source type",
|
|
394
|
+
"description": "A query reads progress.* from a submission without convert_witness, and the table entry lacks an object_type annotation, so the source type cannot be validated statically.\n${rc2_06_evidence_lines}\nIf the submitted value is the ORDER address, the query is unresolvable (no PROGRESS→ORDER reverse edge).",
|
|
395
|
+
"scenario": "Unverifiable source type: progress query on an unannotated submission may target the Order",
|
|
396
|
+
"mitigation": "1) Annotate the table entry's object_type (Progress/Order/Arb);\n2) If the submission is the Order, add convert_witness 100 (OrderProgress);\n3) Verify with analyze_guard_semantics before creation",
|
|
397
|
+
"evidence": "${rc2_06_evidence_lines}",
|
|
398
|
+
"stakeholders": ["provider"]
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"rule_id": "R-C2-07",
|
|
404
|
+
"dimension": "data_source_trust",
|
|
405
|
+
"trigger": "Guard uses a repository.data 'keys where' predicate (upw-mn-261012 F-28: native verifier abort on ALL networks)",
|
|
406
|
+
"cases": [
|
|
407
|
+
{
|
|
408
|
+
"when": { "field": "rc2_07_keys_where_count", "op": "gt", "value": 0 },
|
|
409
|
+
"level": "high",
|
|
410
|
+
"title": "repository.data 'keys where' needs the parameters-free 1177 shape — parameter-carrying forms abort natively",
|
|
411
|
+
"description": "A parameter-carrying 'keys where' query node aborts with MovePrimitiveRuntimeError inside the native guard verifier (upw-mn-261012 F-28, live A/B verified). The CERTIFIED working shape is query 1177 (keys-where, Range-gte) with a parameters-free query node — the Range-gte predicate rides in the BCS conditions blob (batch-14 verified; this is the on-chain rating-floor path of LAYERED RATING-RANGE RULING). ${rc2_07_keys_where_count} occurrence(s) found.",
|
|
412
|
+
"scenario": "Native abort: guard creation or verification fails with MovePrimitiveRuntimeError when the keys-where node carries parameters",
|
|
413
|
+
"mitigation": "1) Use the certified 1177 shape: parameters-free query node; express the threshold (e.g. rating >= 4) as Range-gte inside the BCS conditions blob;\n2) keep candidate ids anchored to first-party objects (the order id itself — not validator-submitted id lists);\n3) See guard-design-patterns pattern.repository_data_check and LAYERED RATING-RANGE RULING in builtin-templates for the proven shape",
|
|
414
|
+
"stakeholders": ["provider", "customer"]
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
},
|
|
322
418
|
{
|
|
323
419
|
"rule_id": "R-C3-01",
|
|
324
420
|
"dimension": "submission_forgery",
|
|
@@ -333,6 +429,15 @@
|
|
|
333
429
|
"mitigation": "1) If the submitted data should belong to the operator (e.g. the operator's address), it is still recommended to add context(Signer) binding;2) If the submitted data is a public credential (e.g. Merkle Root string), the current risk is acceptable;3) Use retained_submission to retain submitted data for later audit",
|
|
334
430
|
"stakeholders": ["customer", "provider"]
|
|
335
431
|
},
|
|
432
|
+
{
|
|
433
|
+
"when": { "all": [{ "field": "has_submission", "op": "eq", "value": true }, { "field": "rc3_01_order_anchored", "op": "eq", "value": true }, { "field": "rc3_01_sharing_exempt", "op": "eq", "value": false }, { "field": "has_signer_check", "op": "eq", "value": false }] },
|
|
434
|
+
"level": "info",
|
|
435
|
+
"title": "Order-anchored recipient slots — Signer binding is structurally inapplicable",
|
|
436
|
+
"description": "Every submission slot is unread by the condition tree, so submitted values cannot influence the verdict. In the order_allocators scene the only consumption is the chain-side GuardIdentifier recipient read, which payment_info.for_object hard-binds to the paying order: order-created allocations always bind, and submitted != for_object aborts (ERECIPIENT_NOT_FOR_OBJECT). Adding a Signer binding here would BREAK keeper/service-triggered rails — a merchant-triggered refund cannot satisfy Signer==recipient. Verified live on mainnet: a merchant-triggered refund still paid the buyer (ptrn-mn-261013 F-03).",
|
|
437
|
+
"scenario": "Order-anchored payout rails (refund / recovery / settlement allocators resolved through a GuardIdentifier recipient).",
|
|
438
|
+
"mitigation": "No change needed. Residual: only standalone (non-order) Allocation runs with an unbound payment_info let the passport builder choose the recipient — that surface is the allocation owner's policy decision, not a guard defect. If a submitted slot is later READ by the condition tree, the normal R-C3-01 binding rules resume.",
|
|
439
|
+
"stakeholders": ["provider", "customer"]
|
|
440
|
+
},
|
|
336
441
|
{
|
|
337
442
|
"when": { "all": [{ "field": "has_submission", "op": "eq", "value": true }, { "field": "scene_binding_field", "op": "neq", "value": "voting_guard" }, { "field": "rc3_01_sharing_exempt", "op": "eq", "value": false }, { "field": "has_signer_check", "op": "eq", "value": false }] },
|
|
338
443
|
"level": "high",
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"min_perm_index": "KERNEL CONSTANT — first user-defined permission index (USER_DEFINED_PERM_INDEX_START).",
|
|
36
36
|
"mainnet_without_testnet": "Network is mainnet and the testnet test has not passed.",
|
|
37
37
|
"missing_guards_display": "Referenced Guard addresses missing from the published set, ', '-joined — empty when all are published.",
|
|
38
|
+
"first_trap_node_name": "First-offender — name of the first entry-reachable node with no forward path to any terminal (trap analysis: cycles are allowed on-chain, the flagged failure is a loop/dead chain without a cycle-breaking exit; absent when none).",
|
|
39
|
+
"trap_nodes_display": "All trapped nodes (entry-reachable, no path to a terminal), ', '-joined — empty when the graph is trap-free.",
|
|
38
40
|
"always_true": "Extractor sentinel — unconditionally true; marks catalog stubs (via eq false) and documentation."
|
|
39
41
|
},
|
|
40
42
|
"rules": [
|
|
@@ -128,14 +130,15 @@
|
|
|
128
130
|
{
|
|
129
131
|
"rule_id": "R-M1-06",
|
|
130
132
|
"dimension": "structural",
|
|
131
|
-
"trigger": "
|
|
133
|
+
"trigger": "Trap analysis — an entry-reachable node with no forward path to any terminal. Cycles themselves are ALLOWED on-chain (2026-10-16 ruling: the consensus layer stays minimal and a loop only advances when someone pays for it); the flagged failure is a loop (or dead chain) the entry can enter but that offers no cycle-breaking exit.",
|
|
132
134
|
"cases": [
|
|
133
135
|
{
|
|
134
|
-
"when": { "field": "
|
|
135
|
-
"level": "
|
|
136
|
-
"title": "
|
|
137
|
-
"description": "
|
|
138
|
-
"mitigation": "
|
|
136
|
+
"when": { "field": "first_trap_node_name", "op": "present" },
|
|
137
|
+
"level": "high",
|
|
138
|
+
"title": "Trap: entry-reachable nodes with no exit path",
|
|
139
|
+
"description": "These nodes are reachable from the entry, but no sequence of forwards can ever reach a terminal node — typically a loop missing a cycle-breaking exit. Orders entering them loop forever (re-running the loop's forwards and their fund rails every lap) or strand. Advisory finding: the chain does not reject this graph; the risk is surfaced here so the merchant fixes it before buyers see it.",
|
|
140
|
+
"mitigation": "Add an exit Pair from inside the loop to a terminal (fulfilment / refund / cancel node), or make the loop conditional so at least one live exit exists on the path.",
|
|
141
|
+
"evidence": "Trapped nodes (entry-reachable, no path to a terminal): [${trap_nodes_display}]."
|
|
139
142
|
}
|
|
140
143
|
]
|
|
141
144
|
},
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"has_repository": "Plan creates a repository object",
|
|
7
7
|
"allocator_row_count": "Total allocator rows across service create param and order_allocators configure steps",
|
|
8
8
|
"refund_row_count": "Allocator rows on the refund track",
|
|
9
|
-
"terminal_count": "
|
|
10
|
-
"terminal_nodes_display": "Comma-joined terminal node names",
|
|
11
|
-
"first_uncovered_terminal": "First terminal node no allocator guard accepts via progress.current equality (FUND-EXIT-01)",
|
|
9
|
+
"terminal_count": "Fund-bearing machine terminal nodes (never a non-entry prev_node); v32 optional pure-side-action leaves are exempt — order completion never routes through them and they never gate money (upw F-06, 6939_upwork-261016)",
|
|
10
|
+
"terminal_nodes_display": "Comma-joined fund-bearing terminal node names",
|
|
11
|
+
"first_uncovered_terminal": "First fund-bearing terminal node no allocator guard accepts via progress.current equality (FUND-EXIT-01; optional leaves exempt)",
|
|
12
12
|
"first_refund_guard_missing_claimed_by": "First refund-track guard step id whose queries never read order.claimed_by (DUAL-RAIL-01, A-3)",
|
|
13
13
|
"first_path_dependent_anchor": "First guard step id using a path-dependent time query (TIME-ANCHOR-01, E-10)",
|
|
14
14
|
"path_sensitive": "The anchored node is reachable by more than one path, so the anchor can shift",
|
|
@@ -19,7 +19,11 @@
|
|
|
19
19
|
"first_alloc_slot_missing": "First allocator {GuardIdentifier:N} leg whose bound guard table lacks slot N as a declared Address submission row (TASKBIND-02, N-K21: alloc abort with funds stranded)",
|
|
20
20
|
"pending_allocator_guard_count": "Unresolved guard designs bound to allocator rows (compile-time judgment surface; >0 downgrades FUND-EXIT-01 from critical to medium)",
|
|
21
21
|
"first_pending_fund_guard": "First unresolved guard design bound to an allocator row or machine edge (UNRESOLVED-GUARD-01) — publishing now ships that path UNGUARDED",
|
|
22
|
+
"pending_fund_guard_count": "Total unresolved guard designs bound to fund paths (allocator rows or machine edges)",
|
|
23
|
+
"pending_fund_guard_keys_display": "Comma-joined keys of ALL unresolved fund-path guard designs",
|
|
22
24
|
"first_pending_buy_guard": "First unresolved guard design bound to the service buy path (UNRESOLVED-GUARD-01 warning tier)",
|
|
25
|
+
"pending_buy_guard_count": "Total unresolved guard designs bound to the service buy path",
|
|
26
|
+
"pending_buy_guard_keys_display": "Comma-joined keys of ALL unresolved buy-path guard designs",
|
|
23
27
|
"has_return_rail": "The machine declares a return rail node (name matches /return/i) — the structural refund promise (PROMISE-ARB, L-01')",
|
|
24
28
|
"return_rail_node": "First return-rail node name",
|
|
25
29
|
"has_arbitration_binding": "The plan wires an arbitration venue into the Service (configure method 'arbitrations' with a non-empty object list, or the service create carries non-empty arbitrations)",
|
|
@@ -27,7 +31,11 @@
|
|
|
27
31
|
"fund_topup_amount": "Sum of parseable (integer smallest-unit) top-up balances; absent when unparseable",
|
|
28
32
|
"fund_ceiling_breach": "The top-up is below the award ceiling (MAX_INDEMNITY_MULTIPLE x highest SKU price) — judged ONLY when both sides parse (PLAN-K2)",
|
|
29
33
|
"fund_ceiling_basis": "Human-readable basis used for the ceiling judgment",
|
|
30
|
-
"fund_ceiling_unverifiable": "A fund top-up exists but the ceiling could not be judged here (price or amount unparseable) — the publish-patch KL-K2 rule re-checks at the 3x largest-order basis (PLAN-K2 fallback, stated explicitly)"
|
|
34
|
+
"fund_ceiling_unverifiable": "A fund top-up exists but the ceiling could not be judged here (price or amount unparseable) — the publish-patch KL-K2 rule re-checks at the 3x largest-order basis (PLAN-K2 fallback, stated explicitly)",
|
|
35
|
+
"repo_policy_keys_display": "Comma-joined policy names declared by the plan's repository create steps (present only when at least one policy exists — the REPO-GATE-KEY-01 judgment gate)",
|
|
36
|
+
"repo_gate_key_unbacked_count": "Composite where-query scans over a plan-local repository whose static key no declared policy uses (REPO-GATE-KEY-01, ZR-32)",
|
|
37
|
+
"first_repo_gate_key_unbacked": "First unbacked gate key, rendered as 'key' in guard 'step-id'",
|
|
38
|
+
"repo_gate_key_unbacked_display": "Comma-joined list of ALL unbacked gate keys"
|
|
31
39
|
},
|
|
32
40
|
"rules": [
|
|
33
41
|
{
|
|
@@ -76,17 +84,17 @@
|
|
|
76
84
|
{
|
|
77
85
|
"when": { "field": "first_pending_fund_guard", "op": "present" },
|
|
78
86
|
"level": "critical",
|
|
79
|
-
"title": "
|
|
80
|
-
"description": "
|
|
81
|
-
"mitigation": "Resolve
|
|
87
|
+
"title": "${pending_fund_guard_count} unresolved guard design(s) bound to fund paths, of ${pending_guard_total} pending in total (first: '${first_pending_fund_guard}')",
|
|
88
|
+
"description": "All unresolved fund-path guard keys: ${pending_fund_guard_keys_display}. Every allocator row or machine edge referencing one of these guard_keys will carry NO guard at publish: the settlement/refund/forward it was designed to gate executes unconditionally. This is a publish-freeze blocker — the freeze gate refuses to go live with fund-path guards pending.",
|
|
89
|
+
"mitigation": "Resolve EACH listed guard design into a structured guard (guardResolutions with kind 'template' or 'inline'), or remove the binding. Machine-host guards must declare the order-identifier slot {identifier: 254, b_submission: true, value_type: 'Address'} in their table (TASKBIND-01).",
|
|
82
90
|
"stakeholders": ["merchant", "customer"]
|
|
83
91
|
},
|
|
84
92
|
{
|
|
85
93
|
"when": { "field": "first_pending_buy_guard", "op": "present" },
|
|
86
94
|
"level": "medium",
|
|
87
|
-
"title": "
|
|
88
|
-
"description": "The service buy path was designed to screen purchasers, but the guard was never resolved; the service publishes without a buy_guard, so anyone can order.",
|
|
89
|
-
"mitigation": "Resolve
|
|
95
|
+
"title": "${pending_buy_guard_count} unresolved buy-guard design(s), of ${pending_guard_total} pending in total (first: '${first_pending_buy_guard}')",
|
|
96
|
+
"description": "All unresolved buy-path guard keys: ${pending_buy_guard_keys_display}. The service buy path was designed to screen purchasers, but the guard was never resolved; the service publishes without a buy_guard, so anyone can order.",
|
|
97
|
+
"mitigation": "Resolve EACH listed buy-guard design into a structured guard, or accept an unscreened buy path deliberately.",
|
|
90
98
|
"stakeholders": ["merchant"]
|
|
91
99
|
}
|
|
92
100
|
]
|
|
@@ -109,22 +117,22 @@
|
|
|
109
117
|
{
|
|
110
118
|
"rule_id": "PLAN-K2",
|
|
111
119
|
"dimension": "fund_flow",
|
|
112
|
-
"trigger": "
|
|
120
|
+
"trigger": "Compensation-fund sizing guidance (KL-K2 family, re-scoped by b6-11): an award is hard-capped at 3x the order amount at ruling time, so a fund below a planned case's ceiling turns a WON award into an unpayable one (the claim aborts and is NOT consumed). Per-order coverage is ENFORCED at buy time (each order is checked against 3x ITS OWN amount); the plan layer advises sizing on the typical single order instead of the priciest SKU — no cross-SKU subsidy.",
|
|
113
121
|
"cases": [
|
|
114
122
|
{
|
|
115
123
|
"when": { "field": "fund_ceiling_breach", "op": "truthy" },
|
|
116
|
-
"level": "
|
|
124
|
+
"level": "medium",
|
|
117
125
|
"title": "Compensation fund tops up below the award ceiling (${fund_ceiling_basis})",
|
|
118
|
-
"description": "The plan tops the fund up to ${fund_topup_amount} (smallest units), but a ruling at the ceiling would abort the buyer's claim (E_COMPENSATION_NOT_MATCH) and the abort does NOT consume the claim — the buyer holds an unpayable win until a manual top-up, and the shop holds the reputational damage.",
|
|
119
|
-
"mitigation": "Raise the compensation_fund input
|
|
126
|
+
"description": "The plan tops the fund up to ${fund_topup_amount} (smallest units), but a ruling at the ceiling would abort the buyer's claim (E_COMPENSATION_NOT_MATCH) and the abort does NOT consume the claim — the buyer holds an unpayable win until a manual top-up, and the shop holds the reputational damage. Disclosure, not a blocker: under-covered ORDERS are refused at buy time (per-order gate), so no buyer enters a knowingly unprotected order.",
|
|
127
|
+
"mitigation": "Raise the compensation_fund input toward the ceiling (${fund_ceiling_basis}). Sizing is per-order now: 3x the typical single order keeps any single ruling payable; above that only buys tolerance for CONCURRENT claims against the one per-Service pool.",
|
|
120
128
|
"stakeholders": ["merchant", "customer"]
|
|
121
129
|
},
|
|
122
130
|
{
|
|
123
131
|
"when": { "field": "fund_ceiling_unverifiable", "op": "truthy" },
|
|
124
132
|
"level": "medium",
|
|
125
133
|
"title": "Compensation-fund adequacy cannot be judged from the plan",
|
|
126
|
-
"description": "The plan carries a fund top-up, but the catalog price or the top-up amount is not machine-parseable here (display forms need token decimals the plan layer does not have), so the
|
|
127
|
-
"mitigation": "Provide numeric smallest-unit sales prices and a numeric fund amount so the plan layer can
|
|
134
|
+
"description": "The plan carries a fund top-up, but the catalog price or the top-up amount is not machine-parseable here (display forms need token decimals the plan layer does not have), so the plan-level judgment is DEFERRED, not skipped: the publish audit re-states the coverage as a disclosure warning, and the buy-time per-order gate enforces 3x each actual order.",
|
|
135
|
+
"mitigation": "Provide numeric smallest-unit sales prices and a numeric fund amount so the plan layer can advise on the ceiling before materialization; the buy-time gate judges every real order regardless.",
|
|
128
136
|
"stakeholders": ["merchant"]
|
|
129
137
|
}
|
|
130
138
|
]
|
|
@@ -139,7 +147,7 @@
|
|
|
139
147
|
"level": "high",
|
|
140
148
|
"title": "Refund guard '${first_refund_guard_missing_claimed_by}' does not check claimed_by",
|
|
141
149
|
"description": "Chain semantics keep the allocation rail and the compensation rail independent (A-3, deliberate). A refund guard that does not assert claimed_by is none allows double payment: arbitration indemnity AND escrow refund.",
|
|
142
|
-
"mitigation": "Add
|
|
150
|
+
"mitigation": "Add the order.claimed_by some == false query to the refund guard. This is a structural fund-safety invariant, not a documentation choice — a double-compensation policy note does not seal the rail and is NOT an accepted alternative. Pair the refund guard with the polarity-twin merchant-recovery allocator (guard asserts order.claimed_by some == true, pays Rate 10000 to the merchant Entity) so the escrow principal of an awarded order still exits: exactly one of the two legs can ever pass.",
|
|
143
151
|
"stakeholders": ["merchant"]
|
|
144
152
|
}
|
|
145
153
|
]
|
|
@@ -234,6 +242,21 @@
|
|
|
234
242
|
"stakeholders": ["merchant"]
|
|
235
243
|
}
|
|
236
244
|
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"rule_id": "REPO-GATE-KEY-01",
|
|
248
|
+
"dimension": "composition",
|
|
249
|
+
"trigger": "A guard's composite where-query scans a PLAN-LOCAL repository under a static policy key that no repository policy declares (ZR-32, ziroom-mn-261013: the review gate queried a key the write side never wrote — the count stayed 0 forever and the benefit was unreachable; policies freeze at repository creation, so the divergence is unrepairable post-publish). Runtime key rows and external repository addresses are unknowable at plan time and are judged by the chain-side round-trip (analyze_guard_semantics compare_with) instead.",
|
|
250
|
+
"cases": [
|
|
251
|
+
{
|
|
252
|
+
"when": { "field": "repo_gate_key_unbacked_count", "op": "gt", "value": 0 },
|
|
253
|
+
"level": "high",
|
|
254
|
+
"title": "Repository gate key ${first_repo_gate_key_unbacked} is written by no policy",
|
|
255
|
+
"description": "Unbacked scans: ${repo_gate_key_unbacked_display}. The plan declares these repository policies: ${repo_policy_keys_display}. A where-scan over an undeclared key reads an empty table forever — count/sum stay 0 and find/keys return empty — so the gated path can never pass. Policies freeze at repository creation and guards freeze at creation: the divergence cannot be repaired after publish.",
|
|
256
|
+
"mitigation": "Reconcile the two sides before publish: change the guard's static key row to a declared policy name (${repo_policy_keys_display}), or rename the repository policy to the queried key. After fixing, re-verify the resolved guard with analyze_guard_semantics compare_with after creation.",
|
|
257
|
+
"stakeholders": ["merchant", "customer"]
|
|
258
|
+
}
|
|
259
|
+
]
|
|
237
260
|
}
|
|
238
261
|
]
|
|
239
262
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SEMANTIC_FACTS=[{'fact_id':'FACT-ALLOC-01','subject':'Allocator\x20guard-matching\x20and\x20firing\x20semantics','authoritative':'A\x20distribution\x20call\x20submits\x20ONE\x20guard\x20address;\x20every\x20allocator\x20whose\x20bound\x20guard\x20equals\x20the\x20submitted\x20address\x20fires,\x20in\x20vector\x20order,\x20each\x20against\x20the\x20balance\x20left\x20by\x20the\x20previous\x20(allocation.move:366-368\x20—\x20the\x20loop\x20has\x20no\x20early\x20exit).\x20'+'Allocators\x20with\x20DIFFERENT\x20guards\x20are\x20alternative\x20paths\x20selected\x20by\x20the\x20caller\x27s\x20guard\x20choice,\x20not\x20by\x20list\x20position.\x20Mutual\x20exclusion\x20must\x20be\x20expressed\x20inside\x20the\x20guard\x20conditions.','falsehoods':['first-match-wins','first\x20Allocator\x20whose\x20Guard\x20returns\x20true','first\x20allocator\x20whose\x20guard\x20passes\x20wins','the\x20first\x20Allocator\x20whose\x20Guard\x20returns\x20true\x20wins','first-match\x20allocator\x20semantics','only\x20the\x20first\x20one','only\x20the\x20first\x20one\x20matches','duplicate\x20addresses\x20only\x20match\x20the\x20first','the\x20first\x20one\x20wins','the\x20first\x20allocator\x20whose\x20guard'],'harm':'Templates\x20built\x20on\x20\x27first-match\x27\x20semantics\x20silently\x20stack\x20distributions\x20or\x20leave\x20refund\x20paths\x20unreachable,\x20because\x20the\x20contract\x20fires\x20ALL\x20allocators\x20bound\x20to\x20the\x20submitted\x20guard.'},{'fact_id':'FACT-ALLOC-02','subject':'Surplus\x20semantics\x20—\x20drains\x20the\x20entire\x20remaining\x20pool','authoritative':'Surplus\x20mode\x20distributes\x20the\x20ENTIRE\x20remaining\x20balance\x20of\x20the\x20order\x27s\x20allocation\x20pool,\x20not\x20just\x20the\x20amount\x20earmarked\x20for\x20a\x20specific\x20track.\x20If\x20a\x20refund-path\x20allocator\x20uses\x20Surplus\x20while\x20the\x20settlement\x20path\x20has\x20unpaid\x20fixed-amount\x20legs,\x20the\x20Surplus\x20takes\x20everything,\x20including\x20the\x20settlement\x20money.','falsehoods':['Surplus\x20takes\x20only\x20what\x20is\x20left','Surplus\x20returns\x20the\x20remainder\x20after\x20other\x20tracks','Surplus\x20is\x20safe\x20because\x20it\x20only\x20takes\x20leftovers'],'harm':'A\x20refund/deposit\x20allocator\x20using\x20Surplus\x20will\x20over-refund\x20the\x20buyer\x20and\x20starve\x20the\x20merchant\x20when\x20the\x20settlement\x20track\x20has\x20not\x20yet\x20fired\x20(ziroom\x20T5:\x20585/525\x20WOW\x20fully\x20refunded,\x20merchant\x20received\x200).'},{'fact_id':'FACT-ALLOC-03','subject':'Allocator\x20fix\x20semantics\x20—\x20computed\x20Amount-leg\x20total,\x20PAID,\x20never\x20a\x20holdback','authoritative':'fix\x20is\x20not\x20a\x20settable\x20parameter:\x20the\x20allocator-registration\x20call\x20computes\x20it\x20internally\x20as\x20the\x20sum\x20of\x20the\x20allocator\x27s\x20Amount-mode\x20legs\x20(allocation.move:399\x20fix:\x20total_amount),\x20and\x20alloc()\x20PAYS\x20every\x20Amount\x20leg\x20(allocation.move:540\x20balance::split)\x20while\x20subtracting\x20fix\x20only\x20from\x20the\x20net-Rate\x20base\x20(allocation.move:485\x20total_rates\x20=\x20balance\x20-\x20fix).\x20A\x20pure-Rate\x20allocator\x20therefore\x20has\x20fix=0\x20and\x20drains\x20100%\x20of\x20the\x20pool;\x20adding\x20Amount\x20legs\x20raises\x20outflow,\x20it\x20never\x20withholds.\x20The\x20allocator-registration\x20call\x20surface\x20takes\x20only\x20(guard,\x20sharing,\x20max)\x20—\x20no\x20fix\x20argument\x20at\x20all\x20—\x20so\x20a\x20template-side\x20fix\x20value\x20is\x20silently\x20dropped\x20before\x20the\x20transaction\x20is\x20built.\x20The\x20chain\x20has\x20NO\x20holdback/reserve\x20primitive;\x20the\x20only\x20way\x20to\x20leave\x20funds\x20in\x20a\x20pool\x20is\x20to\x20not\x20distribute\x20them\x20(no\x20allocator\x20fires,\x20or\x20a\x20max-capped\x20Surplus\x20stops\x20at\x20the\x20cap).','falsehoods':['the\x20reserve\x20never\x20leaves','reserve\x20never\x20leaves\x20the\x20pool','the\x20reserve\x20stays\x20in\x20the\x20pool','reserve\x20physically\x20stays\x20in\x20the\x20pool','the\x20fix\x20retains\x20the\x20reserve','fix-retained\x20claim\x20reserve','leaves\x20the\x20reserve\x20in\x20the\x20pool','fix=reserve','only\x20on-chain\x20holdback'],'harm':'Templates\x20that\x20declare\x20fix=reserve\x20ship\x20a\x20payout\x20rail\x20that\x20drains\x20100%\x20of\x20the\x20escrow\x20at\x20the\x20first\x20release;\x20the\x20claim/refund\x20legs\x20behind\x20it\x20are\x20dead\x20by\x20construction\x20and\x20the\x20money\x20is\x20gone\x20(airbnb\x20mainnet\x20audit\x202026-10-07:\x20ABNB_STAY_SERVICE\x20allocators[0]\x20fix=\x220\x22,\x20full\x20drain\x20at\x20payout_24h).'},{'fact_id':'FACT-GUARD-01','subject':'GuardIdentifier\x20recipient\x20+\x20for_object\x20binding','authoritative':'ERECIPIENT_NOT_FOR_OBJECT\x20is\x20enforced\x20ONLY\x20when\x20the\x20recipient\x20kind\x20is\x20GuardIdentifier\x20AND\x20payment_info.for_object\x20is\x20Some(binding).\x20Pure\x20Entity\x20recipients\x20and\x20unbound\x20GuardIdentifier\x20legs\x20skip\x20this\x20check\x20entirely\x20—\x20the\x20tooling\x20layer\x20(scanner,\x20template\x20compiler)\x20must\x20flag\x20them\x20(allocation.move:434-443).','falsehoods':['the\x20contract\x20checks\x20all\x20recipients\x20against\x20for_object','GuardIdentifier\x20recipients\x20are\x20always\x20safe','the\x20contract\x20validates\x20every\x20recipient\x20binding'],'harm':'An\x20unbound\x20GuardIdentifier\x20or\x20pure\x20Entity\x20recipient\x20can\x20redirect\x20funds\x20to\x20the\x20deploying\x20account\x20or\x20an\x20arbitrary\x20address\x20without\x20any\x20on-chain\x20error.'},{'fact_id':'FACT-MACHINE-01','subject':'Machine\x20edge\x20\x27from\x27\x20semantics','authoritative':'A\x20machine\x20edge\x20declares\x20a\x20single\x20source\x20node\x20in\x20its\x20\x27from\x27\x20field.\x20Multiple\x20edges\x20from\x20the\x20same\x20source\x20node\x20are\x20allowed\x20and\x20represent\x20alternative\x20paths;\x20they\x20are\x20NOT\x20merged.\x20An\x20edge\x20without\x20\x27from\x27\x20is\x20invalid\x20in\x20the\x20new\x20topology\x20format\x20and\x20causes\x20compile-time\x20blockers.','falsehoods':['edges\x20without\x20from\x20are\x20auto-derived','missing\x20from\x20means\x20any\x20node','from\x20is\x20optional\x20for\x20backward\x20compatibility'],'harm':'Old\x20flat\x20machine_shape\x20without\x20from\x20fields\x20compiles\x20into\x20an\x20incomplete\x20topology,\x20leaving\x20nodes\x20unreachable\x20and\x20fund\x20paths\x20missing.'},{'fact_id':'FACT-ENTITY-01','subject':'Entity\x20recipient\x20fallback\x20to\x20deployer','authoritative':'When\x20an\x20Entity\x20recipient\x27s\x20name_or_address\x20is\x20empty,\x20omitted,\x20or\x20resolves\x20to\x20the\x20deploying\x20account,\x20the\x20share\x20is\x20paid\x20to\x20the\x20DEPLOYING\x20ACCOUNT\x20(allocation.move:434-443).\x20This\x20is\x20a\x20silent\x20fallback\x20—\x20no\x20error\x20is\x20raised.','falsehoods':['empty\x20Entity\x20names\x20are\x20rejected','the\x20contract\x20validates\x20Entity\x20recipients','an\x20unnamed\x20Entity\x20recipient\x20causes\x20an\x20abort'],'harm':'A\x20template\x20with\x20a\x20placeholder\x20Entity\x20recipient\x20silently\x20pays\x20the\x20share\x20to\x20whoever\x20deploys\x20the\x20service,\x20which\x20is\x20almost\x20never\x20the\x20intended\x20recipient.'}];export function scanContent(a,b){const c=[],d=b['toLowerCase']();for(const e of SEMANTIC_FACTS){for(const f of e['falsehoods']){const g=f['toLowerCase']();let h=0x0;while((h=d['indexOf'](g,h))!==-0x1){const i=d['slice'](Math['max'](0x0,h-0xc),h),j=/(?:^|[\s"'])not\s+$/['test'](i)||/never\s+$/['test'](i);!j&&c['push']({'fact_id':e['fact_id'],'phrasing':f}),h+=g['length'];}}}return c;}
|
|
1
|
+
export const SEMANTIC_FACTS=[{'fact_id':'FACT-ALLOC-01','subject':'Allocator\x20guard-matching\x20and\x20firing\x20semantics','authoritative':'A\x20distribution\x20call\x20submits\x20ONE\x20guard\x20address;\x20every\x20allocator\x20whose\x20bound\x20guard\x20equals\x20the\x20submitted\x20address\x20fires,\x20in\x20vector\x20order,\x20each\x20against\x20the\x20balance\x20left\x20by\x20the\x20previous\x20(allocation.move:366-368\x20—\x20the\x20loop\x20has\x20no\x20early\x20exit).\x20'+'ORDER\x20IS\x20PRIORITY\x20(SV-3,\x20az3-mn-261013):\x20within\x20one\x20guard,\x20multiple\x20FIX/RATE\x20entries\x20consume\x20the\x20pool\x20strictly\x20in\x20their\x20declared\x20row\x20order\x20(allocation.move:422-427)\x20—\x20a\x20row\x20that\x20under-rates\x20leaves\x20too\x20little\x20for\x20later\x20rows,\x20and\x20a\x20later\x20row\x20that\x20cannot\x20be\x20fully\x20filled\x20aborts\x20the\x20distribution\x20(EZERO,\x2014).\x20Author\x20multi-row\x20splits\x20POOL-DESCENDING\x20(largest\x20claimant\x20first)\x20and\x20verify\x20Σ(fix/rate\x20values)\x20<=\x20the\x20pool\x20the\x20guard\x20can\x20see\x20at\x20fire\x20time.\x20'+'Allocators\x20with\x20DIFFERENT\x20guards\x20are\x20alternative\x20paths\x20selected\x20by\x20the\x20caller\x27s\x20guard\x20choice,\x20not\x20by\x20list\x20position.\x20Mutual\x20exclusion\x20must\x20be\x20expressed\x20inside\x20the\x20guard\x20conditions.','falsehoods':['first-match-wins','first\x20Allocator\x20whose\x20Guard\x20returns\x20true','first\x20allocator\x20whose\x20guard\x20passes\x20wins','the\x20first\x20Allocator\x20whose\x20Guard\x20returns\x20true\x20wins','first-match\x20allocator\x20semantics','only\x20the\x20first\x20one','only\x20the\x20first\x20one\x20matches','duplicate\x20addresses\x20only\x20match\x20the\x20first','the\x20first\x20one\x20wins','the\x20first\x20allocator\x20whose\x20guard'],'harm':'Templates\x20built\x20on\x20\x27first-match\x27\x20semantics\x20silently\x20stack\x20distributions\x20or\x20leave\x20refund\x20paths\x20unreachable,\x20because\x20the\x20contract\x20fires\x20ALL\x20allocators\x20bound\x20to\x20the\x20submitted\x20guard.'},{'fact_id':'FACT-ALLOC-02','subject':'Surplus\x20semantics\x20—\x20drains\x20the\x20entire\x20remaining\x20pool','authoritative':'Surplus\x20mode\x20distributes\x20the\x20ENTIRE\x20remaining\x20balance\x20of\x20the\x20order\x27s\x20allocation\x20pool,\x20not\x20just\x20the\x20amount\x20earmarked\x20for\x20a\x20specific\x20track.\x20If\x20a\x20refund-path\x20allocator\x20uses\x20Surplus\x20while\x20the\x20settlement\x20path\x20has\x20unpaid\x20fixed-amount\x20legs,\x20the\x20Surplus\x20takes\x20everything,\x20including\x20the\x20settlement\x20money.','falsehoods':['Surplus\x20takes\x20only\x20what\x20is\x20left','Surplus\x20returns\x20the\x20remainder\x20after\x20other\x20tracks','Surplus\x20is\x20safe\x20because\x20it\x20only\x20takes\x20leftovers'],'harm':'A\x20refund/deposit\x20allocator\x20using\x20Surplus\x20will\x20over-refund\x20the\x20buyer\x20and\x20starve\x20the\x20merchant\x20when\x20the\x20settlement\x20track\x20has\x20not\x20yet\x20fired\x20(ziroom\x20T5:\x20585/525\x20WOW\x20fully\x20refunded,\x20merchant\x20received\x200).'},{'fact_id':'FACT-ALLOC-03','subject':'Allocator\x20fix\x20semantics\x20—\x20computed\x20Amount-leg\x20total,\x20PAID,\x20never\x20a\x20holdback','authoritative':'fix\x20is\x20not\x20a\x20settable\x20parameter:\x20the\x20allocator-registration\x20call\x20computes\x20it\x20internally\x20as\x20the\x20sum\x20of\x20the\x20allocator\x27s\x20Amount-mode\x20legs\x20(allocation.move:399\x20fix:\x20total_amount),\x20and\x20alloc()\x20PAYS\x20every\x20Amount\x20leg\x20(allocation.move:540\x20balance::split)\x20while\x20subtracting\x20fix\x20only\x20from\x20the\x20net-Rate\x20base\x20(allocation.move:485\x20total_rates\x20=\x20balance\x20-\x20fix).\x20A\x20pure-Rate\x20allocator\x20therefore\x20has\x20fix=0\x20and\x20drains\x20100%\x20of\x20the\x20pool;\x20adding\x20Amount\x20legs\x20raises\x20outflow,\x20it\x20never\x20withholds.\x20The\x20allocator-registration\x20call\x20surface\x20takes\x20only\x20(guard,\x20sharing,\x20max)\x20—\x20no\x20fix\x20argument\x20at\x20all\x20—\x20so\x20a\x20template-side\x20fix\x20value\x20is\x20silently\x20dropped\x20before\x20the\x20transaction\x20is\x20built.\x20The\x20chain\x20has\x20NO\x20holdback/reserve\x20primitive;\x20the\x20only\x20way\x20to\x20leave\x20funds\x20in\x20a\x20pool\x20is\x20to\x20not\x20distribute\x20them\x20(no\x20allocator\x20fires,\x20or\x20a\x20max-capped\x20Surplus\x20stops\x20at\x20the\x20cap).','falsehoods':['the\x20reserve\x20never\x20leaves','reserve\x20never\x20leaves\x20the\x20pool','the\x20reserve\x20stays\x20in\x20the\x20pool','reserve\x20physically\x20stays\x20in\x20the\x20pool','the\x20fix\x20retains\x20the\x20reserve','fix-retained\x20claim\x20reserve','leaves\x20the\x20reserve\x20in\x20the\x20pool','fix=reserve','only\x20on-chain\x20holdback'],'harm':'Templates\x20that\x20declare\x20fix=reserve\x20ship\x20a\x20payout\x20rail\x20that\x20drains\x20100%\x20of\x20the\x20escrow\x20at\x20the\x20first\x20release;\x20the\x20claim/refund\x20legs\x20behind\x20it\x20are\x20dead\x20by\x20construction\x20and\x20the\x20money\x20is\x20gone\x20(airbnb\x20mainnet\x20audit\x202026-10-07:\x20ABNB_STAY_SERVICE\x20allocators[0]\x20fix=\x220\x22,\x20full\x20drain\x20at\x20payout_24h).'},{'fact_id':'FACT-GUARD-01','subject':'GuardIdentifier\x20recipient\x20+\x20for_object\x20binding','authoritative':'ERECIPIENT_NOT_FOR_OBJECT\x20is\x20enforced\x20ONLY\x20when\x20the\x20recipient\x20kind\x20is\x20GuardIdentifier\x20AND\x20payment_info.for_object\x20is\x20Some(binding).\x20Pure\x20Entity\x20recipients\x20and\x20unbound\x20GuardIdentifier\x20legs\x20skip\x20this\x20check\x20entirely\x20—\x20the\x20tooling\x20layer\x20(scanner,\x20template\x20compiler)\x20must\x20flag\x20them\x20(allocation.move:434-443).','falsehoods':['the\x20contract\x20checks\x20all\x20recipients\x20against\x20for_object','GuardIdentifier\x20recipients\x20are\x20always\x20safe','the\x20contract\x20validates\x20every\x20recipient\x20binding'],'harm':'An\x20unbound\x20GuardIdentifier\x20or\x20pure\x20Entity\x20recipient\x20can\x20redirect\x20funds\x20to\x20the\x20deploying\x20account\x20or\x20an\x20arbitrary\x20address\x20without\x20any\x20on-chain\x20error.'},{'fact_id':'FACT-MACHINE-01','subject':'Machine\x20edge\x20\x27from\x27\x20semantics','authoritative':'A\x20machine\x20edge\x20declares\x20a\x20single\x20source\x20node\x20in\x20its\x20\x27from\x27\x20field.\x20Multiple\x20edges\x20from\x20the\x20same\x20source\x20node\x20are\x20allowed\x20and\x20represent\x20alternative\x20paths;\x20they\x20are\x20NOT\x20merged.\x20An\x20edge\x20without\x20\x27from\x27\x20is\x20invalid\x20in\x20the\x20new\x20topology\x20format\x20and\x20causes\x20compile-time\x20blockers.','falsehoods':['edges\x20without\x20from\x20are\x20auto-derived','missing\x20from\x20means\x20any\x20node','from\x20is\x20optional\x20for\x20backward\x20compatibility'],'harm':'Old\x20flat\x20machine_shape\x20without\x20from\x20fields\x20compiles\x20into\x20an\x20incomplete\x20topology,\x20leaving\x20nodes\x20unreachable\x20and\x20fund\x20paths\x20missing.'},{'fact_id':'FACT-ENTITY-01','subject':'Entity\x20recipient\x20fallback\x20to\x20deployer','authoritative':'When\x20an\x20Entity\x20recipient\x27s\x20name_or_address\x20is\x20empty,\x20omitted,\x20or\x20resolves\x20to\x20the\x20deploying\x20account,\x20the\x20share\x20is\x20paid\x20to\x20the\x20DEPLOYING\x20ACCOUNT\x20(allocation.move:434-443).\x20This\x20is\x20a\x20silent\x20fallback\x20—\x20no\x20error\x20is\x20raised.','falsehoods':['empty\x20Entity\x20names\x20are\x20rejected','the\x20contract\x20validates\x20Entity\x20recipients','an\x20unnamed\x20Entity\x20recipient\x20causes\x20an\x20abort'],'harm':'A\x20template\x20with\x20a\x20placeholder\x20Entity\x20recipient\x20silently\x20pays\x20the\x20share\x20to\x20whoever\x20deploys\x20the\x20service,\x20which\x20is\x20almost\x20never\x20the\x20intended\x20recipient.'},{'fact_id':'FACT-REWARD-01','subject':'Reward\x20replay\x20scope\x20(SV-2)\x20—\x20entry-stamped\x20+\x20order-scoped\x20where\x20is\x20the\x20primary\x20once-per-buyer-per-order\x20form','authoritative':'SV-2\x20(azx7-mn-261014\x20live\x20T8):\x20on\x20a\x20guard\x20whose\x20reward\x20claim\x20entry\x20carries\x20the\x20store_from_id\x20stamp,\x20the\x20ORDER-SCOPED\x20record\x20query\x20(where:{storeFromId:{identifier:0}})\x20is\x20live\x20—\x20once\x20per\x20buyer\x20per\x20order\x20(the\x20native\x20claim\x20key\x20is\x20recipient+guard+stamp).\x20Entry-stamped\x20+\x20empty\x20where\x20is\x20the\x20DELIBERATE\x20once-per-buyer-for-life\x20variant;\x20an\x20unstamped\x20entry\x20never\x20keys\x20its\x20claim\x20records,\x20which\x20is\x20the\x20only\x20context\x20where\x20the\x20old\x20\x27storeFromId\x20filter\x20no-ops\x27\x20verdict\x20ever\x20held.\x20knowledge/protocol-facts.ts\x20(SV2_REPLAY_GATE_CLAUSE)\x20is\x20the\x20single-source\x20teaching\x20text;\x20the\x20compile\x20REVIEW_REWARD_UNARMED\x20blocker\x20interpolates\x20its\x20prescription\x20from\x20there.','falsehoods':['the\x20EMPTY\x20where\x20is\x20MANDATORY','NEVER\x20the\x20storeFromId\x20query\x20filter','storeFromId-filtered\x20record\x20query\x20is\x20a\x20SILENT\x20NO-OP','empty-where\x20exists_where\x20gate\x20is\x20the\x20only\x20working\x20idiom','filter\x20is\x20a\x20silent\x20no-op\x20on\x20the\x20current\x20runtime','NEVER\x20bind\x20storeFromId,\x20that\x20filter\x20silently\x20evaluates'],'harm':'The\x20retracted\x20ofn-mn-261012\x20F-01\x20reading\x20(run-75747\x20F-31)\x20shipped\x20pools\x20gated\x20recipient-only-for-life\x20—\x20silently\x20killing\x20the\x20buyer\x27s\x20second\x20order\x20(upw-mn-261014\x20F-48)\x20—\x20while\x20the\x20auditor\x20that\x20should\x20have\x20caught\x20it\x20carried\x20the\x20same\x20stale\x20verdict.'}];export function scanContent(a,b){const c=[],d=b['toLowerCase']();for(const e of SEMANTIC_FACTS){for(const f of e['falsehoods']){const g=f['toLowerCase']();let h=0x0;while((h=d['indexOf'](g,h))!==-0x1){const i=d['slice'](Math['max'](0x0,h-0xc),h),j=/(?:^|[\s"'])not\s+$/['test'](i)||/never\s+$/['test'](i);!j&&c['push']({'fact_id':e['fact_id'],'phrasing':f}),h+=g['length'];}}}return c;}
|
|
@@ -38,7 +38,7 @@ export interface ArchetypeTemplate {
|
|
|
38
38
|
};
|
|
39
39
|
review_mode?: "none" | "review" | "review_reward";
|
|
40
40
|
}
|
|
41
|
-
export declare const BUILTIN_TEMPLATES_VERSION =
|
|
41
|
+
export declare const BUILTIN_TEMPLATES_VERSION = 77;
|
|
42
42
|
export declare const BUILTIN_TEMPLATES: ArchetypeTemplate[];
|
|
43
43
|
export declare const TEMPLATE_KEYWORDS: Record<string, string[]>;
|
|
44
44
|
export declare function getBuiltinTemplate(id: string): ArchetypeTemplate | undefined;
|