8000 Process footgun fixes by bergie · Pull Request #1090 · noflo/noflo · GitHub
[go: up one dir, main page]

Skip to content

Process footgun fixes - #1090

Merged
bergie merged 3 commits into
masterfrom
process-footgun-fixes
Oct 16, 2026
Merged

bergie merged 3 commits into
masterfrom
process-footgun-fixes

Conversation

@bergie
@bergie bergie commented Oct 16, 2026
Copy link
Copy Markdown
Member

No description provided.

A misspelled or unregistered port name passed to input.get(), getData(),
or getStream() crashed with TypeError: Cannot read properties of
undefined (reading 'isAddressable') deep in the buffer machinery,
while the has() family already threw a descriptive error. The read
side now validates through the same gate, and both error paths name
the component, the requested port, and the available ports — so the
typo is diagnosable from the message alone.
Wrapping a component by name constructed it twice per invocation:
once in AsPromise.prepareNetwork for port introspection, then again
when the network loaded the same name through the loader — the first
instance, with any constructor-acquired state, was discarded.

Network.addNode now accepts pre-built component instances through the
new instances network option (keyed by node id), and asPromise passes
the introspected instance there. The component factory runs exactly
once per wrapped call, pinned by a spec counting constructions.
forwardBrackets rules referencing ports the component does not have
were silently deleted as dead config — a typo'd port name in the rule
map disabled bracket forwarding with no signal. Rules the component
declares itself (via options or by assignment before process()) now
throw at construction naming the missing port.

The built-in default rule keeps adapting silently to the ports the
component actually has — components without out/error ports are
correct usage, not a typo. The distinction is by identity: the
default object is exempt until the component declares its own rule
map. Verified against the migrated ecosystem: every declaring
component in noflo-core constructs cleanly.
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

0