@blucca/n8n-check 0.0.0-stage → 0.1.7
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/Dockerfile +10 -0
- package/LICENSE +21 -0
- package/README.md +323 -2
- package/bin/n8n-check.mjs +62 -0
- package/examples/agregado-enrichment/README.md +68 -0
- package/examples/agregado-enrichment/n8n-synthetic +11 -0
- package/examples/agregado-enrichment/observed-results.json +806 -0
- package/examples/agregado-enrichment/prepare.mjs +39 -0
- package/examples/identity-projection/README.md +39 -0
- package/examples/identity-projection/case.json +33 -0
- package/examples/identity-projection/observed-results.json +117 -0
- package/examples/identity-projection/workflow.json +71 -0
- package/examples/identity-projection/wrong-id.json +71 -0
- package/examples/morsof-invoice-history/README.md +77 -0
- package/examples/morsof-invoice-history/UPSTREAM-LICENSE +21 -0
- package/examples/morsof-invoice-history/n8n-datatable.cjs +28 -0
- package/examples/morsof-invoice-history/observed-results.json +113 -0
- package/examples/morsof-invoice-history/prepare.mjs +57 -0
- package/examples/morsof-invoice-history/replay.mjs +35 -0
- package/examples/morsof-invoice-history/run.sh +19 -0
- package/examples/object-body/broken.json +74 -0
- package/examples/object-body/case.json +81 -0
- package/examples/object-body/fixed.json +74 -0
- package/examples/object-body/observed-results.json +449 -0
- package/examples/object-body/retry-case.json +112 -0
- package/examples/object-body/retry.json +77 -0
- package/examples/propfind-body/README.md +75 -0
- package/examples/propfind-body/case.json +51 -0
- package/examples/propfind-body/no-body-control.json +96 -0
- package/examples/propfind-body/observed-results.json +307 -0
- package/examples/propfind-body/workflow.json +96 -0
- package/examples/raw-response/README.md +71 -0
- package/examples/raw-response/file-case.json +54 -0
- package/examples/raw-response/json-body.json +58 -0
- package/examples/raw-response/json-case.json +52 -0
- package/examples/raw-response/observed-results.json +383 -0
- package/examples/raw-response/raw-file.json +88 -0
- package/examples/raw-response/raw-json.json +58 -0
- package/examples/raw-response/raw-text.json +58 -0
- package/examples/raw-response/text-case.json +50 -0
- package/examples/retry-isolation/README.md +71 -0
- package/examples/retry-isolation/direct-case.json +112 -0
- package/examples/retry-isolation/direct.json +101 -0
- package/examples/retry-isolation/editor-template.json +168 -0
- package/examples/retry-isolation/http-batching-case.json +112 -0
- package/examples/retry-isolation/http-batching.json +107 -0
- package/examples/retry-isolation/loop-case.json +117 -0
- package/examples/retry-isolation/loop.json +133 -0
- package/examples/retry-isolation/observed-results.json +155 -0
- package/examples/silent-filter/README.md +57 -0
- package/examples/silent-filter/broken.json +96 -0
- package/examples/silent-filter/case.json +120 -0
- package/examples/silent-filter/fixed.json +96 -0
- package/examples/silent-filter/observed-results.json +273 -0
- package/examples/stop-after/README.md +66 -0
- package/examples/stop-after/broken.json +134 -0
- package/examples/stop-after/case.json +34 -0
- package/examples/stop-after/fixed.json +134 -0
- package/examples/stop-after/observed-results.json +162 -0
- package/examples/vapi-tool-contract/README.md +67 -0
- package/examples/vapi-tool-contract/backend-503.case.json +113 -0
- package/examples/vapi-tool-contract/empty-orders.case.json +113 -0
- package/examples/vapi-tool-contract/observed-results.json +234 -0
- package/examples/vapi-tool-contract/success.case.json +118 -0
- package/examples/vapi-tool-contract/workflow.json +143 -0
- package/examples/vapi-tool-contract/wrong-id.json +143 -0
- package/examples/version-matrix/README.md +65 -0
- package/examples/version-matrix/observed-results.json +307 -0
- package/examples/version-matrix/upgrade-check.yml +32 -0
- package/package.json +41 -4
- package/src/action.mjs +108 -0
- package/src/case-draft.mjs +163 -0
- package/src/local-bundle.mjs +154 -0
- package/src/mock.mjs +72 -0
- package/src/report.mjs +73 -0
- package/src/runner.mjs +111 -0
- package/src/version.mjs +3 -0
- package/src/workflow.mjs +140 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Actual n8n CLI executions with synthetic HTTP contracts: item 42 returns 503 then 200; item 43 always returns 200. Counts record HTTP requests.",
|
|
3
|
+
"runtime": {
|
|
4
|
+
"n8nVersion": "2.41.7",
|
|
5
|
+
"nodeVersion": "v26.10.0",
|
|
6
|
+
"runnerVersion": "0.1.0",
|
|
7
|
+
"httpRequestNodeVersion": 4.2,
|
|
8
|
+
"loopOverItemsNodeVersion": 3
|
|
9
|
+
},
|
|
10
|
+
"network": {
|
|
11
|
+
"mode": "loopback-only",
|
|
12
|
+
"enforced": true,
|
|
13
|
+
"interfaces": [
|
|
14
|
+
"lo"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"cases": [
|
|
18
|
+
{
|
|
19
|
+
"workflow": "direct.json",
|
|
20
|
+
"case": "direct-case.json",
|
|
21
|
+
"workflowSha256": "e0b344c350ca93e0a91b0868a9cb658ec46e66ee9a4170791596c82defc21cf7",
|
|
22
|
+
"caseSha256": "09c18a6ea9bda6c92b7194e652fe3be0e34aceb70851fc27b259a5e4d40dcbe1",
|
|
23
|
+
"startedAt": "2026-10-06T08:37:06.352Z",
|
|
24
|
+
"status": "passed",
|
|
25
|
+
"exitCode": 0,
|
|
26
|
+
"checks": {
|
|
27
|
+
"passed": 8,
|
|
28
|
+
"total": 8
|
|
29
|
+
},
|
|
30
|
+
"requestCounts": {
|
|
31
|
+
"42": 2,
|
|
32
|
+
"43": 2
|
|
33
|
+
},
|
|
34
|
+
"requestSequence": [
|
|
35
|
+
{
|
|
36
|
+
"path": "/renders/42",
|
|
37
|
+
"status": 503
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "/renders/43",
|
|
41
|
+
"status": 200
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"path": "/renders/42",
|
|
45
|
+
"status": 200
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/renders/43",
|
|
49
|
+
"status": 200
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"allRequestBodiesMatch": true,
|
|
53
|
+
"doneOutput": [
|
|
54
|
+
{
|
|
55
|
+
"id": "render-42"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "render-43"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"workflow": "http-batching.json",
|
|
64
|
+
"case": "http-batching-case.json",
|
|
65
|
+
"workflowSha256": "0762d67780cd4c99f35e3456a4d10500220f95331cbad71b6445675df5f11add",
|
|
66
|
+
"caseSha256": "05650c60b43a47a83e87435793dc737e5be6cc0aedb93b501a0eda4b8ea40249",
|
|
67
|
+
"startedAt": "2026-10-06T08:37:05.168Z",
|
|
68
|
+
"status": "passed",
|
|
69
|
+
"exitCode": 0,
|
|
70
|
+
"checks": {
|
|
71
|
+
"passed": 8,
|
|
72
|
+
"total": 8
|
|
73
|
+
},
|
|
74
|
+
"requestCounts": {
|
|
75
|
+
"42": 2,
|
|
76
|
+
"43": 2
|
|
77
|
+
},
|
|
78
|
+
"requestSequence": [
|
|
79
|
+
{
|
|
80
|
+
"path": "/renders/42",
|
|
81
|
+
"status": 503
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"path": "/renders/43",
|
|
85
|
+
"status": 200
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"path": "/renders/42",
|
|
89
|
+
"status": 200
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"path": "/renders/43",
|
|
93
|
+
"status": 200
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"allRequestBodiesMatch": true,
|
|
97
|
+
"doneOutput": [
|
|
98
|
+
{
|
|
99
|
+
"id": "render-42"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "render-43"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"workflow": "loop.json",
|
|
108
|
+
"case": "loop-case.json",
|
|
109
|
+
"workflowSha256": "d5ef57918d131f6ebcd167cd9f654e0ee1dfed64673a1dcfd216b655b48ccac7",
|
|
110
|
+
"caseSha256": "d99aa830e78ae61c84272dc854c71fa74b1c692d9de068c9af05d0a7d037250f",
|
|
111
|
+
"startedAt": "2026-10-06T08:37:04.062Z",
|
|
112
|
+
"status": "passed",
|
|
113
|
+
"exitCode": 0,
|
|
114
|
+
"checks": {
|
|
115
|
+
"passed": 9,
|
|
116
|
+
"total": 9
|
|
117
|
+
},
|
|
118
|
+
"requestCounts": {
|
|
119
|
+
"42": 2,
|
|
120
|
+
"43": 1
|
|
121
|
+
},
|
|
122
|
+
"requestSequence": [
|
|
123
|
+
{
|
|
124
|
+
"path": "/renders/42",
|
|
125
|
+
"status": 503
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"path": "/renders/42",
|
|
129
|
+
"status": 200
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"path": "/renders/43",
|
|
133
|
+
"status": 200
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"allRequestBodiesMatch": true,
|
|
137
|
+
"doneOutput": [
|
|
138
|
+
{
|
|
139
|
+
"id": "render-42"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "render-43"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"loopDoneOutput": [
|
|
146
|
+
{
|
|
147
|
+
"id": "render-42"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "render-43"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Successful execution, missing business data
|
|
2
|
+
|
|
3
|
+
A leftover source filter removes eight relevant retrieval rows. The n8n CLI still exits 0. Exact output assertions turn the regression check red.
|
|
4
|
+
|
|
5
|
+
This is an original **synthetic reconstruction** of the failure class described in [the community's workflow-test proposal](https://community.n8n.io/t/306721). The fixture contains eight high-score rows from `current-index` plus one low-score distractor. The intended gate accepts scores ≥ 0.7.
|
|
6
|
+
|
|
7
|
+
The entire fix in `Confidence Gate`:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
-return $input.all().filter(item => item.json.score >= 0.7 && item.json.source === "legacy-index");
|
|
11
|
+
+return $input.all().filter(item => item.json.score >= 0.7);
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`case.json` asserts all eight rows at **Confidence Gate** and their exact IDs in **Build context**. The low-score ninth row exercises the filter's rejection behavior. HTTP mocks are an empty array: every node in this example runs locally.
|
|
15
|
+
|
|
16
|
+
## Run with a browser
|
|
17
|
+
|
|
18
|
+
1. [Fork n8n-check](https://github.com/blucca/n8n-check/fork).
|
|
19
|
+
2. In your fork, open **Actions** and enable workflows if prompted.
|
|
20
|
+
3. Open **Try a silent data-loss regression → Run workflow**.
|
|
21
|
+
4. Select `fixed`, then repeat with `broken`.
|
|
22
|
+
|
|
23
|
+
The `fixed` run should be green; `broken` should be red. Each run includes a job summary and a downloadable `silent-filter-results` artifact with JSON/JUnit. [The workflow file](../../.github/workflows/try-example.yml) uses the released v0.1.2 Action at its full commit SHA. Fork the current repository to include this newer example.
|
|
24
|
+
|
|
25
|
+
For your own workflow, replace the two paths in that YAML and adapt `input.node`, fixture items and output assertions. [Case-format reference](../../README.md#your-first-case).
|
|
26
|
+
|
|
27
|
+
## Run locally
|
|
28
|
+
|
|
29
|
+
From a checkout of this repository's current `main`, with Docker:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
docker build -t n8n-check .
|
|
33
|
+
docker run --rm --network none -v "$PWD:/work" n8n-check \
|
|
34
|
+
examples/silent-filter/broken.json examples/silent-filter/case.json \
|
|
35
|
+
--out /work/results/broken
|
|
36
|
+
# n8n execution succeeds; two output assertions fail; exit 1
|
|
37
|
+
|
|
38
|
+
docker run --rm --network none -v "$PWD:/work" n8n-check \
|
|
39
|
+
examples/silent-filter/fixed.json examples/silent-filter/case.json \
|
|
40
|
+
--out /work/results/fixed
|
|
41
|
+
# n8n execution succeeds; every assertion passes; exit 0
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
On Linux, add `--user "$(id -u):$(id -g)"` when your user ID differs from the image's default 1000. Both exports also import into the n8n editor: `Retrieved rows` includes the synthetic fixture, so **Execute workflow** demonstrates the same filter behavior there.
|
|
45
|
+
|
|
46
|
+
## Observed results
|
|
47
|
+
|
|
48
|
+
[Recorded JSON](observed-results.json) contains exact expectations, actual outputs, requests and runtime versions from our runs. The test boundary is the exported Code-node slice with fixture input, running in n8n 2.41.7. Production trigger delivery, database retrieval and model responses have their own acceptance contracts.
|
|
49
|
+
|
|
50
|
+
| Check | Broken | Fixed |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| n8n execution succeeds | Pass | Pass |
|
|
53
|
+
| Confidence Gate: eight exact items | Fail: `[]` | Pass |
|
|
54
|
+
| Build context: count + exact IDs | Fail: `[]` | Pass |
|
|
55
|
+
| Runner exit | 1 | 0 |
|
|
56
|
+
|
|
57
|
+
[Fixed-scope regression implementation](https://blucca.github.io/n8n-release-checks/) covers designing fixtures and checks for your workflow release.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Silent retrieval filter regression",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "start",
|
|
6
|
+
"name": "Start",
|
|
7
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
8
|
+
"typeVersion": 1,
|
|
9
|
+
"position": [
|
|
10
|
+
-400,
|
|
11
|
+
0
|
|
12
|
+
],
|
|
13
|
+
"parameters": {}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "retrieved",
|
|
17
|
+
"name": "Retrieved rows",
|
|
18
|
+
"type": "n8n-nodes-base.code",
|
|
19
|
+
"typeVersion": 2,
|
|
20
|
+
"position": [
|
|
21
|
+
-200,
|
|
22
|
+
0
|
|
23
|
+
],
|
|
24
|
+
"parameters": {
|
|
25
|
+
"mode": "runOnceForAllItems",
|
|
26
|
+
"jsCode": "return [{\"id\": \"policy-01\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-02\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-03\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-04\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-05\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-06\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-07\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-08\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"distractor-09\", \"score\": 0.2, \"source\": \"current-index\"}] .map(json => ({json}));"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "gate",
|
|
31
|
+
"name": "Confidence Gate",
|
|
32
|
+
"type": "n8n-nodes-base.code",
|
|
33
|
+
"typeVersion": 2,
|
|
34
|
+
"position": [
|
|
35
|
+
0,
|
|
36
|
+
0
|
|
37
|
+
],
|
|
38
|
+
"parameters": {
|
|
39
|
+
"mode": "runOnceForAllItems",
|
|
40
|
+
"jsCode": "return $input.all().filter(item => item.json.score >= 0.7 && item.json.source === \"legacy-index\");"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "context",
|
|
45
|
+
"name": "Build context",
|
|
46
|
+
"type": "n8n-nodes-base.code",
|
|
47
|
+
"typeVersion": 2,
|
|
48
|
+
"position": [
|
|
49
|
+
200,
|
|
50
|
+
0
|
|
51
|
+
],
|
|
52
|
+
"parameters": {
|
|
53
|
+
"mode": "runOnceForAllItems",
|
|
54
|
+
"jsCode": "const ids = $input.all().map(item => item.json.id);\nreturn [{ json: { count: ids.length, ids } }];"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"connections": {
|
|
59
|
+
"Start": {
|
|
60
|
+
"main": [
|
|
61
|
+
[
|
|
62
|
+
{
|
|
63
|
+
"node": "Retrieved rows",
|
|
64
|
+
"type": "main",
|
|
65
|
+
"index": 0
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"Retrieved rows": {
|
|
71
|
+
"main": [
|
|
72
|
+
[
|
|
73
|
+
{
|
|
74
|
+
"node": "Confidence Gate",
|
|
75
|
+
"type": "main",
|
|
76
|
+
"index": 0
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"Confidence Gate": {
|
|
82
|
+
"main": [
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"node": "Build context",
|
|
86
|
+
"type": "main",
|
|
87
|
+
"index": 0
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"settings": {
|
|
94
|
+
"executionOrder": "v1"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"name": "Keep the eight relevant retrieval rows",
|
|
4
|
+
"input": {
|
|
5
|
+
"node": "Retrieved rows",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"id": "policy-01",
|
|
9
|
+
"score": 0.9,
|
|
10
|
+
"source": "current-index"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "policy-02",
|
|
14
|
+
"score": 0.9,
|
|
15
|
+
"source": "current-index"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "policy-03",
|
|
19
|
+
"score": 0.9,
|
|
20
|
+
"source": "current-index"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "policy-04",
|
|
24
|
+
"score": 0.9,
|
|
25
|
+
"source": "current-index"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "policy-05",
|
|
29
|
+
"score": 0.9,
|
|
30
|
+
"source": "current-index"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "policy-06",
|
|
34
|
+
"score": 0.9,
|
|
35
|
+
"source": "current-index"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "policy-07",
|
|
39
|
+
"score": 0.9,
|
|
40
|
+
"source": "current-index"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "policy-08",
|
|
44
|
+
"score": 0.9,
|
|
45
|
+
"source": "current-index"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "distractor-09",
|
|
49
|
+
"score": 0.2,
|
|
50
|
+
"source": "current-index"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"mocks": [],
|
|
55
|
+
"assertions": [
|
|
56
|
+
{
|
|
57
|
+
"node": "Confidence Gate",
|
|
58
|
+
"equals": [
|
|
59
|
+
{
|
|
60
|
+
"id": "policy-01",
|
|
61
|
+
"score": 0.9,
|
|
62
|
+
"source": "current-index"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "policy-02",
|
|
66
|
+
"score": 0.9,
|
|
67
|
+
"source": "current-index"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "policy-03",
|
|
71
|
+
"score": 0.9,
|
|
72
|
+
"source": "current-index"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "policy-04",
|
|
76
|
+
"score": 0.9,
|
|
77
|
+
"source": "current-index"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "policy-05",
|
|
81
|
+
"score": 0.9,
|
|
82
|
+
"source": "current-index"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "policy-06",
|
|
86
|
+
"score": 0.9,
|
|
87
|
+
"source": "current-index"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "policy-07",
|
|
91
|
+
"score": 0.9,
|
|
92
|
+
"source": "current-index"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "policy-08",
|
|
96
|
+
"score": 0.9,
|
|
97
|
+
"source": "current-index"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"node": "Build context",
|
|
103
|
+
"equals": [
|
|
104
|
+
{
|
|
105
|
+
"count": 8,
|
|
106
|
+
"ids": [
|
|
107
|
+
"policy-01",
|
|
108
|
+
"policy-02",
|
|
109
|
+
"policy-03",
|
|
110
|
+
"policy-04",
|
|
111
|
+
"policy-05",
|
|
112
|
+
"policy-06",
|
|
113
|
+
"policy-07",
|
|
114
|
+
"policy-08"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Silent retrieval filter regression",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "start",
|
|
6
|
+
"name": "Start",
|
|
7
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
8
|
+
"typeVersion": 1,
|
|
9
|
+
"position": [
|
|
10
|
+
-400,
|
|
11
|
+
0
|
|
12
|
+
],
|
|
13
|
+
"parameters": {}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "retrieved",
|
|
17
|
+
"name": "Retrieved rows",
|
|
18
|
+
"type": "n8n-nodes-base.code",
|
|
19
|
+
"typeVersion": 2,
|
|
20
|
+
"position": [
|
|
21
|
+
-200,
|
|
22
|
+
0
|
|
23
|
+
],
|
|
24
|
+
"parameters": {
|
|
25
|
+
"mode": "runOnceForAllItems",
|
|
26
|
+
"jsCode": "return [{\"id\": \"policy-01\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-02\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-03\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-04\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-05\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-06\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-07\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"policy-08\", \"score\": 0.9, \"source\": \"current-index\"}, {\"id\": \"distractor-09\", \"score\": 0.2, \"source\": \"current-index\"}] .map(json => ({json}));"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "gate",
|
|
31
|
+
"name": "Confidence Gate",
|
|
32
|
+
"type": "n8n-nodes-base.code",
|
|
33
|
+
"typeVersion": 2,
|
|
34
|
+
"position": [
|
|
35
|
+
0,
|
|
36
|
+
0
|
|
37
|
+
],
|
|
38
|
+
"parameters": {
|
|
39
|
+
"mode": "runOnceForAllItems",
|
|
40
|
+
"jsCode": "return $input.all().filter(item => item.json.score >= 0.7);"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "context",
|
|
45
|
+
"name": "Build context",
|
|
46
|
+
"type": "n8n-nodes-base.code",
|
|
47
|
+
"typeVersion": 2,
|
|
48
|
+
"position": [
|
|
49
|
+
200,
|
|
50
|
+
0
|
|
51
|
+
],
|
|
52
|
+
"parameters": {
|
|
53
|
+
"mode": "runOnceForAllItems",
|
|
54
|
+
"jsCode": "const ids = $input.all().map(item => item.json.id);\nreturn [{ json: { count: ids.length, ids } }];"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"connections": {
|
|
59
|
+
"Start": {
|
|
60
|
+
"main": [
|
|
61
|
+
[
|
|
62
|
+
{
|
|
63
|
+
"node": "Retrieved rows",
|
|
64
|
+
"type": "main",
|
|
65
|
+
"index": 0
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"Retrieved rows": {
|
|
71
|
+
"main": [
|
|
72
|
+
[
|
|
73
|
+
{
|
|
74
|
+
"node": "Confidence Gate",
|
|
75
|
+
"type": "main",
|
|
76
|
+
"index": 0
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"Confidence Gate": {
|
|
82
|
+
"main": [
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"node": "Build context",
|
|
86
|
+
"type": "main",
|
|
87
|
+
"index": 0
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"settings": {
|
|
94
|
+
"executionOrder": "v1"
|
|
95
|
+
}
|
|
96
|
+
}
|