Commit 2c1ec73
fix: strip settings.engineType so workflow updates survive n8n >= 2.36.0 (v2.76.1) (#1044)
* fix: strip settings.engineType so workflow updates survive n8n >= 2.36.0 (v2.76.1)
n8n 2.36.0 added engineType to the workflow entity's persisted settings
without adding it to the Public API write schema, which is
additionalProperties: false. Our updates read-modify-write, so GET handed
us the property and the echoed PUT failed with "settings must NOT have
additional properties" (#1043). engineType is now marked derived and
stripped from every create and update, like binaryMode before it;
n8n keeps stored settings for omitted keys, so the value is preserved.
check-settings-drift gains the axis that was blind to this class: it
diffs IWorkflowSettings from the installed n8n-workflow package against
the OpenAPI schema, fails on an unhandled entity-only property, and
fails again when n8n later publishes a stripped property to the schema.
The entity parser fails loudly on extends/declaration merging, and the
classification gate is a pure function with direct tests plus an offline
CI assertion that every entity property is known to the table.
Verified end-to-end against n8n 2.36.7: a workflow with
settings.engineType = "v2" injected updates successfully through the
fixed server, and the setting survives the write unchanged.
Fixes #1043
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXDW1LGvRXaQydK21X89sj
* fix: harden the entity axis of check-settings-drift (review round 2)
Codex and Copilot findings on the new drift axis, all adopted:
- Verify the fetched schema's n8n release actually ships the installed
n8n-workflow (exact pin in its package.json) and warn on a mismatch -
the nodes-base pin names a sibling release, not the meta-package.
- An entity-only property is handled only when marked BOTH derived and
entityOnly, and the remediation message says so - derived alone would
leave the published-upstream detector disarmed.
- The entity parser strips block comments (a declaration-shaped line or
stray brace inside one no longer derails it) and throws when content
shares the opening-brace line instead of skipping it silently.
- Without an entity set, a derived property from a later n8n than the
target is classified ahead-of-the-pin, not "entity-only, expected".
- An unhandled entity-only property is no longer double-reported as
expected by the info line.
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXDW1LGvRXaQydK21X89sj
* fix: resolve the true n8n release and parse entity types with the TS AST (review round 3)
- The schema is now fetched from the n8n release whose published pins
match the installed packages, found by scanning the newest releases'
package.json pins (nodes-base@2.36.4 ships in n8n@2.36.7, while
n8n@2.36.4 pins nodes-base@2.36.3 - the same-number mapping read a
neighbouring release's schema). Falls back to the old mapping with a
pin warning when the registry is unreachable or nothing matches.
- The entity parser is the real TypeScript parser instead of a
hand-rolled lexer: line comments, string literal types, inline braces
and split declarations no longer silently truncate the property set,
and any member it cannot enumerate (index signature, method, computed
name) fails closed.
- Restore the 2.76.0 changelog header that the 2.76.1 entry accidentally
swallowed, and bump package.runtime.json to 2.76.1 (both Copilot).
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXDW1LGvRXaQydK21X89sj
* fix: fail closed on partial parses and widen the skew warning (review round 4)
- Reject any syntactic diagnostic before walking the AST: createSourceFile
recovers from errors, so a truncated declarations file would otherwise
yield a partial property set that reads as "no entity-only properties".
The internal parseDiagnostics field disappearing also throws.
- Collect only top-level IWorkflowSettings declarations - a same-named
interface inside a namespace does not merge with the export.
- The residual-skew warning now covers both pins (the fallback release
can match n8n-workflow while shipping a different n8n-nodes-base) and
the pins-unfetchable case.
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXDW1LGvRXaQydK21X89sj
* fix: compare release pins against installed versions, not declared ones (review round 5)
The skew warning and release resolution read the installed
n8n-nodes-base version from node_modules instead of the package.json
pin, so a stale install cannot pair this run's entity types with a
schema neither belongs to; an unreadable install is itself reported.
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXDW1LGvRXaQydK21X89sj
* fix: read the installed n8n-workflow version via the package.json subpath (Copilot round 3)
Consistent with installedNodesBaseVersion; the resolved-entry path walk
stays as a fallback for a future exports map that blocks the subpath.
Conceived by Romuald Członkowski - www.aiadvisors.pl/en
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXDW1LGvRXaQydK21X89sj
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent f895e5e commit 2c1ec73
9 files changed
Lines changed: 689 additions & 19 deletions
File tree
- scripts
- src/constants
- tests/unit
- scripts
- services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
72 | 87 | | |
73 | 88 | | |
74 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
| |||
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
0 commit comments