Skip to content

fix: send the catalogue version when installing a module - #429

Merged
andypalmi merged 2 commits into
mainfrom
425-install-module-version
Oct 15, 2026
Merged

andypalmi merged 2 commits into
mainfrom
425-install-module-version

Conversation

@andypalmi

@andypalmi andypalmi commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #425

Description

The automation/install-module action posted { module } to POST /nodes with no version. Node-RED then emitted a nodes.install audit event with no version and the module was saved without one, so it was not reinstalled after a restart (see FlowFuse/flowfuse#8919).

isModuleEntitled already loads the instance's vetted FlowFuse catalogues. It now also returns the matching entry's version, and the install POST sends { module, version }, the same as the palette manager does.

  • @flowfuse-nodes/ and @flowfuse-certified-nodes/ packages: the entitlement check is unchanged, and the version comes from the catalogue entry.
  • @flowfuse/ packages: still no entitlement check. If a vetted catalogue lists the package its version is sent, otherwise the install goes ahead without one and relies on the FlowFuse fallback for a missing version. A catalogue that fails to load never blocks these installs.
  • Only a plain semver version is sent. Anything else, such as latest, is dropped.
  • Unvetted catalogues are still never fetched, and a caller-supplied version is still ignored.

Related Issue(s)

#425, FlowFuse/flowfuse#8919

Checklist

The install-module action posted only the package name, so the runtime
saved the module without a version and it was dropped on the next
restart. The version of the matching vetted catalogue entry is now sent
as well, when it is a plain semver. A @flowfuse/ package not listed in
a vetted catalogue still installs without a version.

Claude-Session: https://claude.ai/code/session_01HQVXtLUJtHr7hPXZ5DRwoL
@andypalmi
andypalmi requested a review from Steve-Mcl October 15, 2026 10:32
@andypalmi

andypalmi commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

@Steve-Mcl one decision for you.

For @flowfuse/* packages a failed catalogue lookup does not fail the install. It goes ahead without a version and relies on the FlowFuse fallback from FlowFuse/flowfuse#8927 for a missing version. These packages never consulted the catalogues before, so they could not fail on a catalogue error before either.

The private scopes (@flowfuse-nodes/, @flowfuse-certified-nodes/) still fail with CATALOGUE_UNAVAILABLE when a vetted catalogue cannot be loaded, because the catalogue is also their entitlement check.

Should a @flowfuse/* install that cannot resolve a version from the catalogues:

  1. go through without a version, as it does now (the install works, and the saved module gets the '*' fallback), or
  2. fail with CATALOGUE_UNAVAILABLE, so a version is always pinned?

No agent can send a version: the tool input only accepts module and validation in the tool fails otherwise. The version always comes from the catalogue entry.

@Steve-Mcl Steve-Mcl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andypalmi
andypalmi merged commit 1422069 into main Oct 15, 2026
9 checks passed
@andypalmi
andypalmi deleted the 425-install-module-version branch October 15, 2026 12:47
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.

Expert install-module should send an explicit version

2 participants