8000 Added missing `()` by kenhkan · Pull Request #36 · noflo/noflo · GitHub
[go: up one dir, main page]

Skip to content

Added missing () - #36

Merged
bergie merged 1 commit into
noflo:masterfrom
kenhkan:bugfixes
Jul 29, 2012
Merged

bergie merged 1 commit into
noflo:masterfrom
kenhkan:bugfixes

Conversation

@kenhkan
@kenhkan kenhkan commented Jul 28, 2012
Copy link
Copy Markdown
Contributor

No description provided.

bergie added a commit that referenced this pull request Jul 29, 2012
@bergie
bergie merged commit 3604097 into noflo:master Jul 29, 2012
bergie added a commit that referenced this pull request Oct 11, 2026
…matrix

The end-to-end multi-message and scope tests exposed the collector's
message-drop: the original assembly message was consumed on a waiting
activation, so later fields merged into nothing. CollectFields now
reads the message only on the complete path and caches the fields
control config across activations; single-value and bracketed-stream
inner outputs both map to their field (single packet unwraps, multi-
packet stream collects an array); Fork propagates the incoming IP's
scope to its clones. The ExtractField/ToField field config moves from
a one-shot control IIP to persistent node metadata.

Coverage matrix over the wrapped component: multiple sequential
messages stay paired with their own outputs, interleaved scopes stay
separated, bracketed inner streams collect as array fields, inner
errors accumulate into msg.errors while the message still relays.

Known issue (tests skipped with repro, work document #36): under
sequential multi-message load the collector's activation can read its
exported-inport message as undefined — a runtime buffer-lifecycle
finding for the Process API contract (work document #21), not a
wrapper bug.
bergie added a commit that referenced this pull request Oct 11, 2026
Behavior-matrix cases for the fan-out stress shape (work document #36:
directory of files forked out for per-file processing, merged back):

- Out-of-order async inner completion pairs correctly when in-flight
  messages carry scopes — the scope is the correlation key, propagated
  through every adapter hop by Process API activation scoping (verified
  with reversed completion order)
- Unscoped concurrent in-flight messages pair positionally per
  connection (FIFO), which mispairs under out-of-order completion —
  empirically demonstrated and recorded as the correlation contract:
  concurrent traffic must carry scopes; unscoped traffic is for
  in-order synchronous inner components
- CollectFields documents the contract; Fork propagates the incoming
  IP's scope to its clones
bergie added a commit that referenced this pull request Oct 11, 2026
The GitHub wiki carried the design-pattern documentation that the
code ingestion missed: rationale and mental model, the component
taxonomy (relay/source/sink/split/merge/hub), message-passing and
error-handling conventions, and concurrency handling (scoping,
references vs clones, fork/merge).

Modernized for 2.x while bringing it in: wiki links converted to
relative paths, in-tree README/example references, @noflo/assembly
package name, crypto.randomUUID for scope ids, plain Error objects
for the validation example (helpers.CustomError was 1.x), a note on
2.x control-port consumption semantics, and markdown image links.

New page: wrapping regular components — the asAssembly adapter
subgraph, mapping rules, the correlation contract (scopes for
concurrent in-flight messages), library decoration, source
representation, and v1 limitations (work document #36).
bergie added a commit that referenced this pull request Oct 12, 2026
… docs

- ExtractField, ToField, and CollectFields: the adapter components the
  asAssembly generated graphs reference; CollectFields collects inner
  outputs (bracketed streams as arrays, single packets as values) back
  into the originating message and accumulates inner errors per the
  work document #36 contract
- All component entrypoints carry leading module docs and
  @ts-self-types pointers, with generated declarations checked in; the
  types script emits via emitDeclarationOnly
- Merge and the ProcessInput typings regenerate cleanly
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 14, 2026
Ingestion per work document noflo#36 using the work document noflo#2 method:
git filter-repo --to-subdirectory-filter packages/assembly-utils,
merged with --allow-unrelated-histories to preserve the full history
and authorship of the original work.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 14, 2026
Work document noflo#36, steps 1-2: the assembly adapter components come
in-tree as @noflo/assembly-utils, and the runner/graph gain the
addressable-export index handling the adapter fixtures exposed.

- Ingestion per the work document noflo#2 filter-repo method, history and
  authorship preserved; aligned with monorepo conventions: ESM,
  @noflo/noflo and @noflo/assembly as peer dependencies, MIT kept
- Six components modernized to the Process API; ComparePath renames its
  handle hook to processMessage per the work document noflo#27 decision
- The fbp-spec YAML suites are kept as the test format, executed
  in-process through @noflo/fbp-spec-runner (one it() per case against
  executeTestCase, discovery based at the package root) — fbp-spec is
  the preferred component test format, recorded in the migration guide
- Fork/Merge/All fixture graphs are JSON fixtures so addressable
  exports carry declared port indexes

Two bugs the fixtures exposed, fixed at the source:

- fbp-spec-runner: exported addressable ports now honor the
  fixture-declared port index when the runner attaches its sockets —
  previously the index was dropped and exports bound in iteration
  order, making multi-connection fixtures order-dependent
- @noflo/graph: importFbpJson carries the port index of exported
  addressable ports into the model and exportFbpJson serializes it
  back — the round-trip previously dropped the index

ProcessInput JSDoc widens the addressable array form of
hasData/hasStream/attached so type-checked base-class libraries can
use scoped port access.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 14, 2026
Work document noflo#36 steps 3-4 in progress. asAssembly builds the adapter
subgraph (fork fanout → field extractors → inner component → field
wrappers → completeness-aware collector) from port metadata and mapping
overrides; control ports pass through onto the wrapped signature.
wrapAssembly decorates registries best-effort with a skip report.

Known issue: the end-to-end case hangs — the CollectFields collector
never fires despite the fanout message and field wrapper output
arriving on its connections; debugging the activation path.
bergie added a commit that referenced this pull request Oct 14, 2026
Work document #37 phase 2, commit 14. @noflo/assembly publishes the
assembly namespace catalog as a digest-addressed artifact pinned to the
shipped meta-catalog: the config-class assembly.field key. The
asAssembly generator now emits the namespaced key and the adapter
components read it through getComponent(metadata) — the declared form
of the configuration mechanism work document #36 exercised. The PoC
suite validates every metadata map in a generated adapter graph against
the catalog (full JSON Schema validation via ajv, test-only), verifies
the FBP JSON round-trip byte-stability, encodes the metadata through
0x14 insert ops unchanged, and re-instantiates the adapters
identically.
bergie added a commit that referenced this pull request Oct 16, 2026
…tion set before consuming

The collector consumed the originating message in an activation that then
waited for the inner component's outputs. Inside a network — where the
inner output arrives on a later bounded-edge delivery — that deadlocks:
new arrivals fire fresh process contexts, an IP consumed by a waiting
activation never comes back, and the collector's activation stays pending
forever with the inner output buffered, so the wrapped component never
closes and the network never ends. The standalone direct-socket specs
passed only because the burst completed before the collector's first
precondition check.

The collector now has-checks the message, the fields config, and every
mapped inner output stream (or the error stream) before any get, so the
message stays buffered until the collector can fire with both.

Found via a flowtrace of a wrapped component running inside a network
(work document #36 update #12).
bergie added a commit that referenced this pull request Oct 16, 2026
Merge and All share the assembly concurrency contract that was only
recorded on CollectFields: the barrier resolves per scope, so interleaved
scoped messages pair and assemble correctly, while unscoped concurrent
in-flight messages pair positionally per connection and cross. Their
docstrings now carry the contract alongside the barrier firing pattern
(has-check every connection before any get).

The new spec pins the scoped side empirically: Merge pairs interleaved
scoped messages per scope and All assembles interleaved scoped bracketed
streams per scope, with no pending activations and drained buffers.

Firing-pattern audit result (work document #36 update #13): every other
assembly-utils component is clean against the has/get-order discipline.
bergie added a commit that referenced this pull request Oct 18, 2026
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
The firing model follows the port's role. A control port is a gate —
a standing, non-consumingly-read value whose arrival re-fires the
process once per scope that holds data on the component's other ports,
with the control value readable in that firing and left buffered.
Regular firing ports fire directly per arrival; regular non-triggering
ports share the gate machinery (work document noflo#1 noflo#607, whose machinery
was previously reachable only through an explicit triggering:false
declaration no shipped component made).

Previously a control arrival fired one scopeless activation: the
arriving IP's context carried no scope, so the process could not see
scoped buffers and declined — standing configuration arriving after
scoped messages silently failed to re-fire the waiting processes. That
shape stranded burst messages behind late-arriving configuration in
wrapped-adapter pipelines (the noflo-jekyll burst investigation, work
documents noflo#35/noflo#36), and forced the workaround of declaring
configuration ports as firing ports.

The leak-persistence fixture moves to its honest data-triggered shape:
a control arrival no longer opens an activation at all, so the
read-then-decline leak via a control arrival is now impossible; the
data-triggered shape (read the standing control value inside a
data-fired activation, then decline) still leaks, still warns, and is
still deliberately not auto-closed
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
…envelope field

asAssembly's out-mapping accepts null: the mapped outport's inner
output replaces the message entirely — the transform-the-message shape
(a component that mutates and forwards the message, e.g.
packets/ScopeFromObject) — with the accumulated msg.errors carried
into the replacement and a non-object replace output accumulating an
error instead of replacing. Only one outport may map to null;
asAssembly validates loudly at wrap time. This is the out-side
completion of the whole-message mapping vocabulary (work document
noflo#36): inputs had in: null, outputs had field-name overwrite only.

CollectFields honors null entries in its fields config as the
collector-side of the same mapping.

ToAssembly accepts the assembly.field node metadata to name the field
the incoming value lands under (default data), the same convention the
generated adapter graphs use for ExtractField — the envelope creation
goes stock: a scan emitting bare path strings composes
ToAssembly(field: path) with a wrapped filesystem/ReadFile, and the
LoadDocument-style custom envelope relays retire.

Specs: the end-to-end replace through a wrapped adapter (the
transformed message with errors carried), the multi-null wrap-time
rejection, the non-object fallback; the CollectFields replace units;
the ToAssembly field units.
AsherBond pushed a commit to AsherBond/noflo that referenced this pull request Oct 19, 2026
…ent engine

Substantial engine work has landed since the document's open items were
written (the firing model noflo#47, the scoped liveness noflo#45, bounded edges
noflo#38, the deterministic closing noflo#45/noflo#46) — this verification pass checks
whether each is still open, against the current engine:

- The two skipped fanout-clone-drop tests un-skipped and run: BOTH
  SHAPES STILL HANG at their timeout — the sequential multi-message
  clone-drop is real and current. Re-skipped with the fresh evidence;
  the buffer-lifecycle fix remains the document's central open item
- The adapter bracket correlation: VERIFIED WORKING — the spec pins the
  end-to-end shape the jekyll pipeline sidestepped (concurrent scoped
  messages with bracketed inner streams pair per message, and the
  closedown completes on the boundary disconnect). The 'cleaner end
  state' gap from work document noflo#35 update noflo#6 is closed by the engine
  work; this spec is now the green pin, not a gap report
- The bare-class loader finding: verified still open — the registered
  bare class throws 'cannot be invoked without new' (the message names
  the class); the spec pins the current behavior for the fix to flip
- The wrapAssembly subgraph capability: verified still open — a graph
  definition skips with asAssembly's rejection (the observable reason
  the capability gap carries today)
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.

2 participants

0