@firedrill-tools/trolley 0.1.1
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/LICENSE +201 -0
- package/README.md +219 -0
- package/firedrill/agent.target.json +16 -0
- package/firedrill/baseline.scenario.json +2109 -0
- package/firedrill/conformance.suite.json +19 -0
- package/firedrill/partner-outage.scenario.json +11 -0
- package/firedrill/processing-response-lost.scenario.json +11 -0
- package/firedrill/rate-limited.scenario.json +11 -0
- package/firedrill/tight-limits.scenario.json +16 -0
- package/firedrill/tools/trolley/app/assets/ATTRIBUTION.md +35 -0
- package/firedrill/tools/trolley/app/assets/cropped-Site-Icon-512x512-px-1-192x192.png +0 -0
- package/firedrill/tools/trolley/app/assets/fonts/OFL.txt +93 -0
- package/firedrill/tools/trolley/app/assets/full-logo.svg +1 -0
- package/firedrill/tools/trolley/app/assets/logo-black.svg +18 -0
- package/firedrill/tools/trolley/app/site/app.js +139 -0
- package/firedrill/tools/trolley/app/site/assets/fonts/inter-latin.woff2 +0 -0
- package/firedrill/tools/trolley/app/site/assets/trolley-icon.png +0 -0
- package/firedrill/tools/trolley/app/site/assets/trolley-logo.svg +1 -0
- package/firedrill/tools/trolley/app/site/base.css +99 -0
- package/firedrill/tools/trolley/app/site/batch-actions.js +139 -0
- package/firedrill/tools/trolley/app/site/components.css +149 -0
- package/firedrill/tools/trolley/app/site/icons.js +50 -0
- package/firedrill/tools/trolley/app/site/index.html +53 -0
- package/firedrill/tools/trolley/app/site/list.js +87 -0
- package/firedrill/tools/trolley/app/site/ui.js +181 -0
- package/firedrill/tools/trolley/app/site/view-balances.js +30 -0
- package/firedrill/tools/trolley/app/site/view-batch.js +86 -0
- package/firedrill/tools/trolley/app/site/view-batches.js +78 -0
- package/firedrill/tools/trolley/app/site/view-dashboard.js +79 -0
- package/firedrill/tools/trolley/app/site/view-methods.js +80 -0
- package/firedrill/tools/trolley/app/site/view-recipient.js +124 -0
- package/firedrill/tools/trolley/app/site/view-recipients.js +115 -0
- package/firedrill/tools/trolley/behavior.mjs +78 -0
- package/firedrill/tools/trolley/lib/access.mjs +21 -0
- package/firedrill/tools/trolley/lib/ids.mjs +28 -0
- package/firedrill/tools/trolley/lib/money.mjs +55 -0
- package/firedrill/tools/trolley/lib/paging.mjs +65 -0
- package/firedrill/tools/trolley/lib/pricing.mjs +88 -0
- package/firedrill/tools/trolley/lib/records.mjs +87 -0
- package/firedrill/tools/trolley/lib/serialize.mjs +152 -0
- package/firedrill/tools/trolley/lib/store.mjs +61 -0
- package/firedrill/tools/trolley/lib/time.mjs +60 -0
- package/firedrill/tools/trolley/lib/validate.mjs +111 -0
- package/firedrill/tools/trolley/lib/wire.mjs +145 -0
- package/firedrill/tools/trolley/ops/accounts-write.mjs +117 -0
- package/firedrill/tools/trolley/ops/accounts.mjs +129 -0
- package/firedrill/tools/trolley/ops/balances.mjs +23 -0
- package/firedrill/tools/trolley/ops/batches.mjs +139 -0
- package/firedrill/tools/trolley/ops/payment-build.mjs +79 -0
- package/firedrill/tools/trolley/ops/payments.mjs +112 -0
- package/firedrill/tools/trolley/ops/processing.mjs +104 -0
- package/firedrill/tools/trolley/ops/recipients-list.mjs +58 -0
- package/firedrill/tools/trolley/ops/recipients.mjs +127 -0
- package/firedrill/tools/trolley/trolley.tool.json +10095 -0
- package/firedrill/trolley-accounts.drill.json +205 -0
- package/firedrill/trolley-batch-lifecycle.drill.json +522 -0
- package/firedrill/trolley-denied.drill.json +74 -0
- package/firedrill/trolley-fresh-install.drill.json +68 -0
- package/firedrill/trolley-invalid-key.drill.json +743 -0
- package/firedrill/trolley-partner-outage.drill.json +97 -0
- package/firedrill/trolley-processing-rules.drill.json +138 -0
- package/firedrill/trolley-rate-limited.drill.json +118 -0
- package/firedrill/trolley-read-only.drill.json +468 -0
- package/firedrill/trolley-recipients.drill.json +183 -0
- package/firedrill/trolley-response-lost.drill.json +127 -0
- package/firedrill/trolley-tight-limits.drill.json +348 -0
- package/firedrill/world.json +2539 -0
- package/firedrill.json +5 -0
- package/package.json +64 -0
- package/starter.json +2108 -0
- package/test/conformance.mjs +12 -0
- package/test/flow-access.mjs +54 -0
- package/test/flow-accounts.mjs +63 -0
- package/test/flow-batches.mjs +107 -0
- package/test/flow-faults.mjs +58 -0
- package/test/flow-processing.mjs +41 -0
- package/test/flow-recipients.mjs +93 -0
- package/test/harness.mjs +87 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "trolley-partner-outage",
|
|
4
|
+
"title": "Partner outage: account creation and quotes answer 500 and change nothing",
|
|
5
|
+
"targetId": "conformance-agent",
|
|
6
|
+
"scenarioId": "partner-outage",
|
|
7
|
+
"actorId": "ops",
|
|
8
|
+
"task": {
|
|
9
|
+
"instruction": "Run the partner-outage conformance flow against the synthetic Trolley Tool and fail loudly on any unexpected status or body."
|
|
10
|
+
},
|
|
11
|
+
"assertions": [
|
|
12
|
+
{
|
|
13
|
+
"id": "recipient-accounts-create-tool-error",
|
|
14
|
+
"kind": "operation.count",
|
|
15
|
+
"operation": {
|
|
16
|
+
"packageId": "trolley",
|
|
17
|
+
"operationId": "recipient_accounts.create"
|
|
18
|
+
},
|
|
19
|
+
"outcomes": [
|
|
20
|
+
"tool_error"
|
|
21
|
+
],
|
|
22
|
+
"comparison": {
|
|
23
|
+
"operator": "greater_than_or_equal",
|
|
24
|
+
"value": 1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "recipient-accounts-create-ok-exact",
|
|
29
|
+
"kind": "operation.count",
|
|
30
|
+
"operation": {
|
|
31
|
+
"packageId": "trolley",
|
|
32
|
+
"operationId": "recipient_accounts.create"
|
|
33
|
+
},
|
|
34
|
+
"outcomes": [
|
|
35
|
+
"ok"
|
|
36
|
+
],
|
|
37
|
+
"comparison": {
|
|
38
|
+
"operator": "equals",
|
|
39
|
+
"value": 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "batches-generate-quote-tool-error",
|
|
44
|
+
"kind": "operation.count",
|
|
45
|
+
"operation": {
|
|
46
|
+
"packageId": "trolley",
|
|
47
|
+
"operationId": "batches.generate_quote"
|
|
48
|
+
},
|
|
49
|
+
"outcomes": [
|
|
50
|
+
"tool_error"
|
|
51
|
+
],
|
|
52
|
+
"comparison": {
|
|
53
|
+
"operator": "greater_than_or_equal",
|
|
54
|
+
"value": 1
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "batches-generate-quote-ok-exact",
|
|
59
|
+
"kind": "operation.count",
|
|
60
|
+
"operation": {
|
|
61
|
+
"packageId": "trolley",
|
|
62
|
+
"operationId": "batches.generate_quote"
|
|
63
|
+
},
|
|
64
|
+
"outcomes": [
|
|
65
|
+
"ok"
|
|
66
|
+
],
|
|
67
|
+
"comparison": {
|
|
68
|
+
"operator": "equals",
|
|
69
|
+
"value": 0
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "count-recipient-accounts",
|
|
74
|
+
"kind": "state.count",
|
|
75
|
+
"packageId": "trolley",
|
|
76
|
+
"namespace": "recipient_accounts",
|
|
77
|
+
"comparison": {
|
|
78
|
+
"operator": "equals",
|
|
79
|
+
"value": 13
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "b2-quote-unchanged",
|
|
84
|
+
"kind": "state.value",
|
|
85
|
+
"packageId": "trolley",
|
|
86
|
+
"namespace": "batches",
|
|
87
|
+
"rowId": "B-000000000000000000003G",
|
|
88
|
+
"path": [
|
|
89
|
+
"quoteExpiredAt"
|
|
90
|
+
],
|
|
91
|
+
"comparison": {
|
|
92
|
+
"operator": "equals",
|
|
93
|
+
"value": "2026-09-15T12:30:00.000Z"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "trolley-processing-rules",
|
|
4
|
+
"title": "Processing rules: expired quote, insufficient funds, route minimum, empty batch, per-payment failures",
|
|
5
|
+
"targetId": "conformance-agent",
|
|
6
|
+
"scenarioId": "baseline",
|
|
7
|
+
"actorId": "ops",
|
|
8
|
+
"task": {
|
|
9
|
+
"instruction": "Run the processing-rules conformance flow against the synthetic Trolley Tool and fail loudly on any unexpected status or body."
|
|
10
|
+
},
|
|
11
|
+
"assertions": [
|
|
12
|
+
{
|
|
13
|
+
"id": "batches-start-processing-tool-error",
|
|
14
|
+
"kind": "operation.count",
|
|
15
|
+
"operation": {
|
|
16
|
+
"packageId": "trolley",
|
|
17
|
+
"operationId": "batches.start_processing"
|
|
18
|
+
},
|
|
19
|
+
"outcomes": [
|
|
20
|
+
"tool_error"
|
|
21
|
+
],
|
|
22
|
+
"comparison": {
|
|
23
|
+
"operator": "greater_than_or_equal",
|
|
24
|
+
"value": 4
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "batches-start-processing-ok-exact",
|
|
29
|
+
"kind": "operation.count",
|
|
30
|
+
"operation": {
|
|
31
|
+
"packageId": "trolley",
|
|
32
|
+
"operationId": "batches.start_processing"
|
|
33
|
+
},
|
|
34
|
+
"outcomes": [
|
|
35
|
+
"ok"
|
|
36
|
+
],
|
|
37
|
+
"comparison": {
|
|
38
|
+
"operator": "equals",
|
|
39
|
+
"value": 3
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "event-batch-processing",
|
|
44
|
+
"kind": "event.count",
|
|
45
|
+
"event": {
|
|
46
|
+
"packageId": "trolley",
|
|
47
|
+
"eventId": "batch.processing"
|
|
48
|
+
},
|
|
49
|
+
"phase": "emitted",
|
|
50
|
+
"comparison": {
|
|
51
|
+
"operator": "equals",
|
|
52
|
+
"value": 3
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "event-payment-processed",
|
|
57
|
+
"kind": "event.count",
|
|
58
|
+
"event": {
|
|
59
|
+
"packageId": "trolley",
|
|
60
|
+
"eventId": "payment.processed"
|
|
61
|
+
},
|
|
62
|
+
"phase": "emitted",
|
|
63
|
+
"comparison": {
|
|
64
|
+
"operator": "equals",
|
|
65
|
+
"value": 3
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "event-payment-failed",
|
|
70
|
+
"kind": "event.count",
|
|
71
|
+
"event": {
|
|
72
|
+
"packageId": "trolley",
|
|
73
|
+
"eventId": "payment.failed"
|
|
74
|
+
},
|
|
75
|
+
"phase": "emitted",
|
|
76
|
+
"comparison": {
|
|
77
|
+
"operator": "equals",
|
|
78
|
+
"value": 2
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "b3-still-open",
|
|
83
|
+
"kind": "state.value",
|
|
84
|
+
"packageId": "trolley",
|
|
85
|
+
"namespace": "batches",
|
|
86
|
+
"rowId": "B-000000000000000000003H",
|
|
87
|
+
"path": [
|
|
88
|
+
"status"
|
|
89
|
+
],
|
|
90
|
+
"comparison": {
|
|
91
|
+
"operator": "equals",
|
|
92
|
+
"value": "open"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "b5-still-open",
|
|
97
|
+
"kind": "state.value",
|
|
98
|
+
"packageId": "trolley",
|
|
99
|
+
"namespace": "batches",
|
|
100
|
+
"rowId": "B-000000000000000000003J",
|
|
101
|
+
"path": [
|
|
102
|
+
"status"
|
|
103
|
+
],
|
|
104
|
+
"comparison": {
|
|
105
|
+
"operator": "equals",
|
|
106
|
+
"value": "open"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "b4-complete",
|
|
111
|
+
"kind": "state.value",
|
|
112
|
+
"packageId": "trolley",
|
|
113
|
+
"namespace": "batches",
|
|
114
|
+
"rowId": "B-000000000000000000003I",
|
|
115
|
+
"path": [
|
|
116
|
+
"status"
|
|
117
|
+
],
|
|
118
|
+
"comparison": {
|
|
119
|
+
"operator": "equals",
|
|
120
|
+
"value": "complete"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "usd-balance",
|
|
125
|
+
"kind": "state.value",
|
|
126
|
+
"packageId": "trolley",
|
|
127
|
+
"namespace": "balances",
|
|
128
|
+
"rowId": "paymentrails:USD",
|
|
129
|
+
"path": [
|
|
130
|
+
"amount"
|
|
131
|
+
],
|
|
132
|
+
"comparison": {
|
|
133
|
+
"operator": "equals",
|
|
134
|
+
"value": "16820.55"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "trolley-rate-limited",
|
|
4
|
+
"title": "Rate limited lists answer 429 while retrieves still work",
|
|
5
|
+
"targetId": "conformance-agent",
|
|
6
|
+
"scenarioId": "rate-limited",
|
|
7
|
+
"actorId": "ops",
|
|
8
|
+
"task": {
|
|
9
|
+
"instruction": "Run the rate-limited conformance flow against the synthetic Trolley Tool and fail loudly on any unexpected status or body."
|
|
10
|
+
},
|
|
11
|
+
"assertions": [
|
|
12
|
+
{
|
|
13
|
+
"id": "recipients-list-tool-error",
|
|
14
|
+
"kind": "operation.count",
|
|
15
|
+
"operation": {
|
|
16
|
+
"packageId": "trolley",
|
|
17
|
+
"operationId": "recipients.list"
|
|
18
|
+
},
|
|
19
|
+
"outcomes": [
|
|
20
|
+
"tool_error"
|
|
21
|
+
],
|
|
22
|
+
"comparison": {
|
|
23
|
+
"operator": "greater_than_or_equal",
|
|
24
|
+
"value": 1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "recipients-list-ok-exact",
|
|
29
|
+
"kind": "operation.count",
|
|
30
|
+
"operation": {
|
|
31
|
+
"packageId": "trolley",
|
|
32
|
+
"operationId": "recipients.list"
|
|
33
|
+
},
|
|
34
|
+
"outcomes": [
|
|
35
|
+
"ok"
|
|
36
|
+
],
|
|
37
|
+
"comparison": {
|
|
38
|
+
"operator": "equals",
|
|
39
|
+
"value": 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "batches-list-tool-error",
|
|
44
|
+
"kind": "operation.count",
|
|
45
|
+
"operation": {
|
|
46
|
+
"packageId": "trolley",
|
|
47
|
+
"operationId": "batches.list"
|
|
48
|
+
},
|
|
49
|
+
"outcomes": [
|
|
50
|
+
"tool_error"
|
|
51
|
+
],
|
|
52
|
+
"comparison": {
|
|
53
|
+
"operator": "greater_than_or_equal",
|
|
54
|
+
"value": 1
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "batches-list-ok-exact",
|
|
59
|
+
"kind": "operation.count",
|
|
60
|
+
"operation": {
|
|
61
|
+
"packageId": "trolley",
|
|
62
|
+
"operationId": "batches.list"
|
|
63
|
+
},
|
|
64
|
+
"outcomes": [
|
|
65
|
+
"ok"
|
|
66
|
+
],
|
|
67
|
+
"comparison": {
|
|
68
|
+
"operator": "equals",
|
|
69
|
+
"value": 0
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "payments-list-tool-error",
|
|
74
|
+
"kind": "operation.count",
|
|
75
|
+
"operation": {
|
|
76
|
+
"packageId": "trolley",
|
|
77
|
+
"operationId": "payments.list"
|
|
78
|
+
},
|
|
79
|
+
"outcomes": [
|
|
80
|
+
"tool_error"
|
|
81
|
+
],
|
|
82
|
+
"comparison": {
|
|
83
|
+
"operator": "greater_than_or_equal",
|
|
84
|
+
"value": 1
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "payments-list-ok-exact",
|
|
89
|
+
"kind": "operation.count",
|
|
90
|
+
"operation": {
|
|
91
|
+
"packageId": "trolley",
|
|
92
|
+
"operationId": "payments.list"
|
|
93
|
+
},
|
|
94
|
+
"outcomes": [
|
|
95
|
+
"ok"
|
|
96
|
+
],
|
|
97
|
+
"comparison": {
|
|
98
|
+
"operator": "equals",
|
|
99
|
+
"value": 0
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "recipients-get-ok",
|
|
104
|
+
"kind": "operation.count",
|
|
105
|
+
"operation": {
|
|
106
|
+
"packageId": "trolley",
|
|
107
|
+
"operationId": "recipients.get"
|
|
108
|
+
},
|
|
109
|
+
"outcomes": [
|
|
110
|
+
"ok"
|
|
111
|
+
],
|
|
112
|
+
"comparison": {
|
|
113
|
+
"operator": "greater_than_or_equal",
|
|
114
|
+
"value": 1
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|