Repository navigation
fix: workflow, execution and community-package spec drift (n8n 2.46.4) - #41
Merged
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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 hasadditionalProperties: false).ForCreate/ForUpdatenow drop it whatever its value (null included) and reportsettings.engineTypeon stderr, the same way"DEFAULT"settings are handled. This keeps a 2.46 read writable everywhere, e.g.workflow copyonto an older instance. No settings flags were added, following fix: core resource spec drift (evaluation, workflow, credential, data-table, project, variable, folder) #33.workflow createandworkflow updateupdated.TestWorkflowSettingsFromN8n246,TestWorkflowDocumentEngineTypeAnyValue(client);TestWorkflowWriteN8n246Settings(CLI: get keeps both settings; create/update sendredactCallerExecutions, dropengineTypeand report only it).nodes[].createdAt/updatedAtare 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 themreadOnlyand older instances still send them. The test confirms nothing is reported when they're absent.data,workflowDataandcustomData(andannotation) are now optional. They already decode asomitemptyraw fields. Text output printsData included: falseand a stderr note (the caller can't read the workflow's executions; follow up withn8n execution get NEW_ID). JSON output just omits the fields. Help and theExecutiondoc comment updated.TestRetryExecutionWithoutRunData(client);TestExecutionStopAndRetry/retry_{text_with_run_data,text_without_run_data,json_without_run_data}(CLI).policyRestrictionsis 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, orBlocked node types: none. When something is blocked, stderr points ton8n node-policy instance get/project get. Install help updated.TestInstallCommunityPackagePolicyRestrictions,TestInstallCommunityPackagePolicyRestrictionsPresence(client);TestCommunityPackageInstallPolicyRestrictions{Text,None,JSON},TestCommunityPackageInstallWithoutPolicyRestrictions(CLI).policyRestrictions), so nothing changes.datanow documents that fields accept n8n expressions (strings starting with=). The CLI does no local validation that conflicts with this. One sentence added to thecredential create/updatehelp.make docsregenerated 6 pages.Verification
make checkpasses locally withopenapi.upstream.ymlmoved aside (fmt-check, vet, lint, test, test-race, cross, tidy-check, vuln all green)openapi.upstream.ymlpresent, onlyTestManifestMatchesSpec/upstreamfails. That is expected until chore(coverage): sync manifest to n8n 2.46.4 #40 merges and out of scope here. Note thatmake checkstops attest, so the later targets in that run were covered by the run without the spec.make docsrun if CLI help changedv*tag or release commit in this PRNotes for reviewer
engineTypeadds one moreNot 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.jsonis untouched (chore(coverage): sync manifest to n8n 2.46.4 #40).🤖 Generated with Claude Code