Skip to content

fix: workflow, execution and community-package spec drift (n8n 2.46.4) - #41

Merged
SomeoneWithOptions merged 2 commits into
mainfrom
fix/spec-drift-2.46.4-core
Nov 4, 2026
Merged

SomeoneWithOptions merged 2 commits into
mainfrom
fix/spec-drift-2.46.4-core

Conversation

@SomeoneWithOptions

Copy link
Copy Markdown
Owner

What / why

Fixes schema drift between n8n Public API 2.45.7 and stable 2.46.4 for existing commands. No new operations and no manifest change. Independent of #40 (manifest/coverage); promotion and n8n-package import drift are handled in separate PRs.

Changes

  • Workflow settings (POST /workflows, PUT /workflows/{id}, all workflow responses)
    • settings.redactCallerExecutions: settings stay raw JSON, so it already round-trips. Tests now cover it on get, create and update.
    • settings.engineType: the 2.46.4 spec says any value written is ignored, and pre-2.46 instances reject it (settings has additionalProperties: false). ForCreate/ForUpdate now drop it whatever its value (null included) and report settings.engineType on stderr, the same way "DEFAULT" settings are handled. This keeps a 2.46 read writable everywhere, e.g. workflow copy onto an older instance. No settings flags were added, following fix: core resource spec drift (evaluation, workflow, credential, data-table, project, variable, folder) #33.
    • Help for workflow create and workflow update updated.
    • Tests: TestWorkflowSettingsFromN8n246, TestWorkflowDocumentEngineTypeAnyValue (client); TestWorkflowWriteN8n246Settings (CLI: get keeps both settings; create/update send redactCallerExecutions, drop engineType and report only it).
  • Node timestamps: nodes[].createdAt/updatedAt are no longer in 2.46 responses. Nodes are raw JSON, so their absence decodes fine. The strip filter stays because the 2.46.4 write schema still marks them readOnly and older instances still send them. The test confirms nothing is reported when they're absent.
  • POST /executions/{id}/retry: data, workflowData and customData (and annotation) are now optional. They already decode as omitempty raw fields. Text output prints Data included: false and a stderr note (the caller can't read the workflow's executions; follow up with n8n execution get NEW_ID). JSON output just omits the fields. Help and the Execution doc comment updated.
    • Tests: TestRetryExecutionWithoutRunData (client); TestExecutionStopAndRetry/retry_{text_with_run_data,text_without_run_data,json_without_run_data} (CLI).
  • POST /community-packages: new optional policyRestrictions is modelled (CommunityPackagePolicyRestrictions, CommunityPackageBlockedNodeType) and kept in JSON. It is omitted when absent and {"nodeTypes":[]} is kept when empty. Text output lists each blocked node type, or Blocked node types: none. When something is blocked, stderr points to n8n node-policy instance get / project get. Install help updated.
    • Tests: TestInstallCommunityPackagePolicyRestrictions, TestInstallCommunityPackagePolicyRestrictionsPresence (client); TestCommunityPackageInstallPolicyRestrictions{Text,None,JSON}, TestCommunityPackageInstallWithoutPolicyRestrictions (CLI).
  • Text-only changes:
    • PATCH /community-packages/{name}: the response was only inlined (same fields, no policyRestrictions), so nothing changes.
    • POST /credentials and PATCH /credentials/{id}: data now documents that fields accept n8n expressions (strings starting with =). The CLI does no local validation that conflicts with this. One sentence added to the credential create/update help.
  • make docs regenerated 6 pages.

Verification

  • make check passes locally with openapi.upstream.yml moved aside (fmt-check, vet, lint, test, test-race, cross, tidy-check, vuln all green)
  • With the 2.46.4 openapi.upstream.yml present, only TestManifestMatchesSpec/upstream fails. That is expected until chore(coverage): sync manifest to n8n 2.46.4 #40 merges and out of scope here. Note that make check stops at test, so the later targets in that run were covered by the run without the spec.
  • make docs run if CLI help changed
  • No secrets/keys/tokens in diff or logs
  • No v* tag or release commit in this PR

Notes for reviewer

  • Dropping engineType adds one more Not sent (...) stderr line on the get → edit → update loop against 2.46+. That's the same behaviour as the "DEFAULT" settings, and sending it would do nothing on 2.46 and break on older instances.
  • internal/coverage/manifest.json is untouched (chore(coverage): sync manifest to n8n 2.46.4 #40).

🤖 Generated with Claude Code

SomeoneWithOptions and others added 2 commits November 3, 2026 21:07
- workflow: settings.engineType (server-owned; n8n 2.46 ignores it on
  write, older instances reject it as an unknown setting) is dropped from
  create/update bodies and reported as settings.engineType;
  settings.redactCallerExecutions round-trips unchanged. Node timestamps
  are still stripped for older instances and the write schema.
- execution retry: data, workflowData and customData may be absent; text
  output says so on stderr, JSON omits them.
- community-package install: model policyRestrictions, keep it in JSON and
  list blocked node types in text output with a node-policy hint on stderr.
- credential create/update help: data fields accept n8n expressions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SomeoneWithOptions
SomeoneWithOptions merged commit 6d2a98d into main Nov 4, 2026
5 checks passed
@SomeoneWithOptions
SomeoneWithOptions deleted the fix/spec-drift-2.46.4-core branch November 4, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant