Repository navigation
Forward key even when there is only one key - #37
Merged
Merged
Conversation
bergie
added a commit
that referenced
this pull request
Oct 1, 2012
Forward key even when there is only one key
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 1, commit 7. A schema revision that no longer accepts a prior revision's examples fails publish: the prior examples ride the previously generated noflo.json, so the check stays offline and self-contained. Full JSON Schema 2020-12 validation via ajv, with references resolved from the local closure only (never the network) and the extension keywords riding the lenient path. ajv is a regular dependency of this package because the gate must run wherever the generator runs; that is acceptable only because @noflo/manifest is publish tooling, always a devDependency of publishing libraries, and must never become a runtime dependency — runtime code consumes noflo.json as data, never as a package.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 1, commit 8 — the phase-1 seam: runtimes advertise references but cannot serve bodies. The nodejs catalog digests pin-stable inline schemas (no $id rewriting and no cross-document $ref pinning can change their bytes) and derives the in-band guard from the projection; string markers advertise their id; explicit guards validate against the closed vocabulary and fail loudly at load, like the other structural port options. Inline objects with references stay harvest-silent — those are covered by the manifest data path. componentDetail is now async.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 1 (§10): ports gain the schema declaration rule (ns/name id or inline JSON Schema object; datatype stays the floor) and the publishing section gains the schemas/ directory requirement with the publish gate's obligations — closure resolvability, reserved namespaces, cycles, closed interfaces, and revision acceptance. The values/default port-option rewrite stays phase 2 and is not touched here.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 2, commit 9. 0x28 requests bodies by raw 32-byte digest with an optional closure-bundling flag; 0x29 answers as flat [raw_digest, entry] tuples — inline document, RNS resource hash, or nil, with all-nil as the legitimate no-table answer (MsgPack map keys cannot carry raw bytes losslessly, so the protocol's positional idiom carries the keys); 0x2a writes a body with the digest riding every write, content-addressed and idempotent. The protocol-stated inline cap (4096 canonical bytes) is enforced by the codecs — over it, the resource form is mandatory. AsyncAPI channels with codec-generated wire examples in the same change set; the examples carry base64-rendered digests under a frame-binary verify role, since JSON examples cannot re-encode raw bins.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 2, commit 10. The grow-only content-addressed schema table has two provenance sections: package-loaded at startup from installed packages' noflo.json schemas tables (data consumed as JSON, never as a package dependency — every body verified against the manifest's digest pin at load) and project-authored via 0x2a (live programming, inline bodies digest-verified before they enter the store; resource-backed entries verifiable at fetch). 0x28 answers with closure bundling capped at the protocol-stated maximum and all-nil when the table holds nothing; 0x2a is content-addressed, idempotent, and fire-and-forget like 0x25. assembleRuntime wires the protocol when a table is provided; without one, reads answer all-nil and writes are unsupported — persistence is runtime policy, not protocol.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 2, commit 11. The default catalogs ship from @noflo/fbp-protocol as digest-addressed CC0 artifacts: the ui positional canvas catalog (ui.x/ui.y for nodes, exports, and IIPs; ui.route/ui.routePoints for edges — the Appendix A intents and WD #35 semantics re-declared), the runtime config catalog (runtime.highWaterMark, edges only — the field SPEC §5 already names), and the std datatype catalog mapping the 13 core datatypes to schemas or the opaque marker. The ui and runtime catalogs validate against the shipped meta-catalog format and pin it at its shipped digest; tests verify shipped-byte identity and digest stability.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 2 (§3.4). The behavioral removal and its rewrite support land together: InPort loses the values-list throw, the default data delegate, and hasDefault/validateData; Network loses the port-default socket machinery (addDefaults/sendDefaults) — a 1.x default was re-readable on every activation, an IIP is consumed by its first read, so components migrate to graph IIPs, control-port configuration, or internal state initialized at start (the migration guide's ports section states the gap and the rewrite: values becomes inline enum schemas with the guard derived at publish). as-component maps defaulted function parameters to optional ports whose process fallback is the function's own default parameter. The manifest harvest drops the retired fields; the protocol's PortInfo note moves to past tense. Keeping values/default anywhere would have meant carrying half-formed mechanisms the clean-2.x ledger kills.
bergie
added a commit
that referenced
this pull request
Oct 14, 2026
Work document #37 phase 2, commit 13. ComponentDetail gains an optional metadata field referencing the component's config catalog — the object-level schema of what getComponent(metadata) reads — in the same id+digest form as port schema references. It rides the canonical signature and therefore sig_hash, converts to raw digest bins on the wire like the port fields, and is validated by the codec. AsyncAPI ComponentDetail updated in the same change set.
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 14, 2026
Work document #37 phase 2, commit 15. Packets entering the runtime over the wire — IIP inserts through the graph protocol and 0x47 packet sends — are checked against the target port's in-band guard with comparisons alone: no schema body is ever loaded, no validator module exists in the runtime. Violations are diagnostic-only, delivered to a host-side sink (telemetry 0x04 ERROR flowtrace events or LXMF [errors], per local policy); the op is applied regardless — convergence integrity outranks schema enforcement. assembleRuntime wires the resolver from the catalog's snapshot when one is provided; without it, guards go unchecked. Guards participate in sig_hash.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2, commit 16. SchemaCache fetches bodies over 0x28/0x29 and verifies every body against its digest before it enters the cache — integrity before interpretation, the property that makes untrusted runtimes safe. Nil and resource-backed entries are skipped at this boundary. Closure completeness is client-checked against the local cache alone: a fetched root is unusable while any referenced digest is missing, and the caller iterates with further requests targeting only the missing digests. Already-held digests make no wire round trip.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2, commit 17. When a flowtrace recorder is present, the default guard-violation sink records each violation as a 0x04 ERROR flowtrace event — the runtime records them, per local policy; the op is applied regardless. Verified end-to-end through assembleRuntime: an out-of-guard IIP insert is applied and lands in the trace as an ERROR chunk.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2, commit 18 — the manifest-first rung of the WD #24 ladder applied to schema bodies. schemaTableFromNodeModules walks the project's own noflo.json plus its installed dependencies, digest-verifying every body against its manifest pin before it enters the grow-only store; packages without schemas tables contribute nothing, and an empty table answers all-nil. createHost wires the table by default, with schemaTables: false opting out. Manifests are consumed as data, never as package dependencies.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2, commit 19. RuntimeClient gains the SchemaCache (shared requestReply plumbing) and syncSchemaBodies(): every port schema digest and component config-catalog digest in the synced catalog is requested when not held, with closure bundling and mandatory digest verification. The UiEventSurface runs it after the registry sync and adds schemaBodies to the components event. A runtime without a schema table answers all-nil and the store stays empty — the degradation ladder, not an error.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2, commit 20. The schemas command syncs the catalog, fetches the schema bodies its details reference over 0x28/0x29 (digest-verified, closure-bundled), and lists them with their reference ids; --json dumps the bodies. A runtime without a schema table answers all-nil and the listing stays empty.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2, commit 21. The CLI is an authoring surface, so before a value ships it is checked against the target port's in-band guard from the synced signature — comparison-only, no schema body, no validator dependency. Violations warn to stderr and the value goes out regardless: advisory only, matching the runtime's own diagnostic-only semantics. Tier B hard validation at injection is deferred to the noflo-ui editor; a full validator is a large dependency for small benefit here.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 1 verification (§11), closing the deferred identity items 1 and 2. The spec now pins both normative RFC 8785 Appendix B documents verbatim — the key-sorting example (UTF-16 code unit order, including the C1 control and the surrogate-pair-before-astral case) and the number/string/literals document — the vectors every conforming JCS implementation in any language must emit. The golden digest fixture pins a realistic schema to a canonical form derived by hand from the JCS rules and a SHA-256 computed by the system's OpenSSL, independent of the WebCrypto call — two independent hash implementations over an independently derived canonical form. The MsgPack 1-vs-1.0 divergence class is covered: a hand-crafted float64 frame decoded through the real MsgPack decoder digests identically to the int encoding. A second-language implementation stays out of scope — that arrives with the MicroFlo modernization, which will need to verify against these same vectors.
bergie
added a commit
that referenced
this pull request
Oct 15, 2026
Work document #37 phase 2 lockstep: 0x28/0x29/0x2a sections — digest requests with closure bundling, the all-nil answer, digest verification and client-checked closure completeness, the content-addressed idempotent write with bodies-first ordering, and the Tier A diagnostic semantics.
bergie
added a commit
that referenced
this pull request
Oct 16, 2026
The work document #25 amendment to the manifest format documentation: the schemas table (id, digest, path, implements closure, examples for the revision-acceptance backstop), the anonymousSchemas and foreignSchemas sections, the port schema/guard fields, and the publish gate's obligations. Committed on master after the #1083 merge, as the work document #37 amendment was the one documentation gap its review left.
bergie
added a commit
that referenced
this pull request
Oct 18, 2026
…alf of the knob story The runtime's schema table (work document #37 phase 2) loads installed packages' noflo.json schemas tables at startup and serves the bodies by digest through the Two-Step Cache (0x29, with mandatory client-side digest verification and closure completeness) — so shipping the artifact and pinning it in the manifest is what makes the noflo.* vocabulary visible to protocol clients: fbp-client and noflo-ui fetch the catalog and the per-component composed config schemas, verify digests transitively, and know the vocabulary without assuming. - schemas/port-behavior.json: the noflo-namespace catalog — the three knobs with their schemas, class config, kind node; the outport-side scoped flip documented as not overridable - noflo.json: the package manifest's schemas table, pinning the artifact's digest (computed via the fbp-protocol digestSchema over the canonical form) - The package files field ships noflo.json and schemas/ - PortMetadata's schema touchpoint updated: the artifact ships, the manifest pins it, the runtime's table serves it - The runtime spec pins the client story end to end: loading the @noflo/noflo package manifest into a SchemaTable, the digest pins holding, and the served body byte-identical to the shipped artifact The deployment wiring (which installed packages a given runtime scans) stays the deployer's policy per the work document #24 ladder; the per-component composed config schemas (the allOf composition, work document #37) flow from the publish-time manifests as components opt in
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
Work document noflo#37 phase 1, commit 1: the identity substrate for schema artifacts. ns/name ids, SHA-256 digests over RFC 8785 (JCS) canonical form with $id normalization, authoring-sugar and published URN reference forms, ref collection and pinning, and cross-document cycle detection. Hand-rolled JCS, no new dependencies; digests are async via WebCrypto like the existing sig_hash.
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
Work document noflo#37 phase 1, commit 2. Guards are the bounded projection of a port schema's cheaply-checkable assertions, transported in-band in the signature so a Tier A runtime checks packets with comparisons alone and never loads a schema body. The projection under-approximates, never over-restricts: array-form types, over-bound enums, exclusive bounds, and unresolvable allOf members are omitted rather than guessed. checkGuard() is the runtime diagnostic; violations are never structurally rejected.
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
Work document noflo#37 phase 1, commit 3. Ports carry an optional schema reference (compact id plus digest) and an optional guard in the 0x24 detail response. JS structures carry hex digests; the codecs convert to the raw 32-byte MsgPack bins the wire carries. Both fields ride the canonical signature, so sig_hash changes when a referenced schema digest changes — the Two-Step Cache re-fetch trigger. The nodejs catalog passes pinned references and guards through from port options; AsyncAPI Port schema updated in the same change set.
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
Work document noflo#37 phase 1, commit 4. Two immutable, digest-addressed meta-schema artifacts: the extension vocabulary declaring NoFlo's added keywords (discriminator, root-level implements) through JSON Schema 2020-12's $vocabulary mechanism as an optional vocabulary, and the metadata catalog document format (schema/class/kinds). The documents ship as JSON in schemas/ with dependency-free JS mirrors in src; the test suite verifies the two stay identical and the digests stable.
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
Work document noflo#37 phase 1, commit 5. generateManifest builds the package's schema set: own schemas/ documents are pinned into absolute URN form (published bytes = digested bytes, idempotent), inline port schemas hoist into content-addressed entries, implements closures are computed over root-level allOf refs with closed-interface rejection, and guards are derived from schemas (explicit ones linted against the projection). The publish gate enforces closure resolvability, reserved namespaces, ref cycles, meta-schema identity, and dependency digest matches. Ports declare schema/guard markers in component source; @noflo/noflo BasePort now validates the 2.x schema vocabulary (URL and MIME schemas retired per WD noflo#37 §3.5).
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
Work document noflo#37 phase 1, commit 6. The 0x24 port field set gains the optional schema reference (compact id plus raw digest) and the in-band guard vocabulary, with the diagnostic-only validation semantics and the sig_hash participation stated. The Port schema URIs omission entry is superseded: URL-based resolution and MIME schemas are dead, replaced by the ns/name digest-pinned artifact design.
AsherBond
pushed a commit
to AsherBond/noflo
that referenced
this pull request
Oct 19, 2026
The noflo.* node-metadata keys apply port-behavior overrides to a component instance after instantiation and before wiring, completing the noflo#594 lineage: a graph can now reuse an ecosystem component while tweaking the knobs its graph needs. - noflo.control: string[] — the instance's complete gate-inport set, replacing the declaration: listed names become gates (standing, non-consumingly-read configuration whose arrivals re-fire pending work per scope), unlisted former gates become direct firing edges (replace semantics makes promotion and demotion both expressible) - noflo.scoped: object — port-name to boolean, with the buffer structures re-prepared on flip (the helper runs pre-wiring, so there is no buffered state to migrate) - noflo.forwardBrackets: object — per-inport rule replacement, including the framing-termination empty rule; forwarded brackets attach to the ports the component's actual sends go through, so an override reroutes the framing when the component sends to the overridden target Applied by the Network after the port-name stamping, before subscribeNode. Overrides are per-instance (the loader instantiates one component per node, so other instances keep their declarations), validated loudly (unknown noflo.* keys — the namespace is core-owned — nonexistent ports, non-string names, and mistyped values are build errors named with the node id), and the zero-regression posture holds: a node without noflo.* metadata is untouched. The schema touchpoint: the keys are declared by the noflo/port-behavior metadata schema — the noflo-namespace catalog entry shipped with the publish-time machinery (work documents noflo#37/noflo#25) — and this module is the runtime consumer, validating the subset a running network can check. No catalog artifact ships in this slice; the publish gate (wd noflo#25) is where the namespace reservation and the opt-in composition enforcement land. Spec: the knob matrix from the work document — promote data to gate, demote gate to data, scoped flips in both directions with per-scope pairing, forwarding replaced and terminated per instance, the zero-regression posture pinned by a second instance of the same component, the validation error class, and the network-level wiring with the node-id error surface
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.
Even when there's only one key registered, the key should still be forwarded as a group because when the key was dynamically generated, the receiving component would have no idea what that key is.