Repository navigation
fix(app-shell): the flow designer stops warning on a source node's own outputs on its out-edges; the Problems panel scan takes the connector registry (objectui#11085) - #11133
Conversation
… flow expression scan takes the connector registry The engine writes a node's outputs before traverseNext evaluates its out-edge guards, so an edge's scope is the scope at its source plus the source's own outputs. One rule, edgeSourceOutputRefs, is read by the Problems panel's edge scan (resolveEdgeScope) and the edge inspector's note (useEdgeScope). A fault edge keeps the scope at its source: the engine walks it only when the node failed, with nothing written back. flowExpressionProblems and buildFlowProblems take an optional connectors argument and thread it into resolveFlowScope / resolveEdgeScope, so a committed connector action's declared output keys are judged in scope when the host passes the registry. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
|
changeset-claim-re-read
|
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
…y for the expression scan FlowPreview reads the runtime connector registry the way the inspectors do, only when the draft holds a committed connector_action (useConnectorRegistry(hasCommittedConnectorAction(d))), and passes it to buildFlowProblems. A later node's reference to that action's declared output is then judged in scope on the Problems panel and the canvas badge, both fed by the one problems list. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
…r-output fix The host now passes the connector registry, so the changeset describes that user-visible outcome instead of only the new argument. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Inputs: card objectui#11085 (body, triage Gate verdicts on the head ( Completion: judged as the seat's answer ① Derived judgments
② Semver level
③ Boundary flagsRound 1 (
Round 2 (
Out-of-scope note (both rounds, carrier none): a START node's out-edge resolves the start node's own scope with bare trigger fields; whether the engine binds bare fields when it evaluates the start node's out-edge guards was not measured. Verified pre-existing and untouched by this diff: Implemented-by: VERDICT: PASS Generated by Claude Code |
Part of #11085
Clause-②: no
Two designer surfaces reported a guard reference as "not a reference in scope" although the engine writes it before it evaluates the guard. This PR completes site 2 (both surfaces) and lands the pure half of site 1. Site 1's host wiring is held back on purpose, see "Why Part of, not a full close" below.
Site 2: an edge guard sees its source node's own outputs (complete)
inspectors/flow-scope.ts:edgeSourceOutputRefs(draft, edge, connectors)is the one rule for which of the source node's own outputs are in scope on its out-edge: the source'snodeOutputRefs, except on afaultedge (the engine walks it only when the node failed, with nothing written back, and never evaluates its condition) and on an edge leaving the start node (it contributes the trigger record, the ruleresolveFlowScopealready applies).resolveEdgeScope(draft, edge, locale, connectors)isresolveFlowScopeat the source plus those refs, de-duplicated by token.inspectors/useFlowScope.ts:useEdgeScope(draft, edge, connectors)is the React twin:useFlowScopeat the source withedgeSourceOutputRefsas itsextraRefs. TheuseFlowScopedoc that told edge callers to pass the source id (the defect itself) now routes them touseEdgeScope.inspectors/FlowEdgeInspector.tsx: the guard's picker and its scope note readuseEdgeScope.previews/flow-expr-problems.ts: the Problems panel's edge loop readsresolveEdgeScope.Site 1: the connector registry reaches the Problems panel's scan (pure half only)
flowExpressionProblems(draft, locale, connectors)threads the registry intoresolveFlowScopefor nodes andresolveEdgeScopefor edges.buildFlowProblemslives inpreviews/flow-problems.ts(the order placed it inflow-expr-problems.ts); it takes an optionalconnectorsargument and passes it through.Why Part of, not a full close
The Problems panel's host, the only caller of
buildFlowProblems, ispreviews/FlowPreview.tsx: itsproblemsmemo feeds the Problems panel, the canvas badges, the banner and the red error ring. The dispatch order bars that file (objectui#10862 slice 4 edits it in parallel) and says to stop and report if the host lives there, so the host edit is not made here. It is three lines, and adds nothing beyond this PR's seam:useConnectorRegistryfrom../inspectors/connector-input-fields.jsandhasCommittedConnectorActionfrom../inspectors/flow-scope.js;problemsmemo:const connectors = useConnectorRegistry(hasCommittedConnectorAction(d));connectorsinto thebuildFlowProblems({ ... })call and add it to that memo's dependency list.Until then a guard
post.ok == truedownstream of a committed connector action still draws the Problems-panel warning (the inspectors accept it since objectui#11084), and objectui#11085 stays open for that half.Engine premise, re-measured on objectstack origin/main
14f80e23packages/services/service-automation/src/engine.ts,executeNode: on success the step is logged, then the block commented "Write back output variables" setsnode.id + '.' + keyfor every key ofresult.output, and only after it doestraverseNextrun.get_recordwrites itsoutputVariableinside its executor (builtin/crud-nodes.ts,variables.set(outputVariable, record)), before control returns to traversal.traverseNextselects out-edges withe.type !== 'fault'. On failure the engine sets$errorand executes thefaultedge's target directly: no condition evaluated, no output written back.Pins (per site: the reference the engine writes is clean, a reference no node writes still warns)
inspectors/flow-scope.test.ts, describe "edge scope — the source node’s own outputs are in scope on its out-edges (objectui#11085)":leadjoins the out-edge of aget_recordwithoutputVariable: leadwhile the node scope is unchanged; a fault edge, a start-node edge and a missing source add none;post.okjoins a connector action's own out-edge only with the registry.previews/flow-expr-problems.test.ts, describe "flowExpressionProblems — references the engine writes (objectui#11085)": site 2lead.status == 'open'clean on the out-edge,ghost.statusstill warns, the fault edge still warns; site 1post.ok == trueclean on a node, its own out-edge and a later edge with the registry, reported without it,ghost.okreported with it.previews/flow-problems.test.ts, describe "buildFlowProblems — the connector registry reaches the expression scan (objectui#11085)".inspectors/FlowEdgeInspector.sourceOutputs-11085.test.tsx: through the real edge inspector wiring, no note forlead.status, a note forghost.status, a note forlead.statuson a fault edge.Assertions read the verdict's level, target and named root, never the note's wording.
Verification (all at HEAD
2be3ab1a2)pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/previews/: 79 files, 1065 tests passed.pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/inspectors/: 114 files, 1583 passed, 1 skipped (a pre-existingskipIfinflow-node-config.spec-reconciliation.test.ts).FlowPreview,FlowCanvas,ProblemsPanel,FlowInspector,spec-symbol-parity): 434 passed.pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' buildexit 0, thenpnpm --filter @object-ui/app-shell type-checkexit 0;tsc -p tsconfig.test.json --listFilesOnlylists all four touched test files.--format json: 9 files): 0 errors, 2 warnings, bothno-explicit-anyon the pre-existing(draft as any).edgesline ofFlowEdgeInspector.tsx, a line this diff does not touch. Type-aware linting is not enabled ineslint.config.js(noparserOptions.project/projectService), so this diff cannot move a lint verdict on an untouched file.check-changeset-presence,check-control-bytes,check-new-cross-file-line-citations(0 new),check-vi-mock-specifiers,check-vi-mock-inherit,check-vi-mock-override-shape,check-test-path-roots,check-changeset-claims,check-pending-changeset-literals,check-changeset-no-major,check-changeset-fixed: all exit 0.check-changeset-claimsnames three pending changesets that mentionflow-expr-problems.ts/flow-scope.ts; each paragraph was re-read and none is falsified by this diff.Ablations (one-shot, objectstack
scripts/ablation-replace.mjswrap mode; the tests importsrcby relative path, so nodistis on the resolution path)edgeSourceOutputRefsreturns none: 5 red (two flow-scope edge-scope pins, the scan's site-2lead.statuspin, the scan's site-1 own-edgepost.okassertion, the edge inspector'slead.statuspin); every control stayed green. Restore proven: blob equals HEAD andgit diff HEADis empty.buildFlowProblemsdropsconnectors: 1 red (its registry pin). Restore proven.flowExpressionProblemsdropsconnectorsfrom the node scope: 2 red (the scan's site-1 node pin and thebuildFlowProblemsregistry pin). Restore proven.Declared narrowing
packages/app-shelland the repo-wide farm, which are CI's. A wholemetadata-admin/run (344 files) was started and stopped after 10 minutes without a verdict: NOT MEASURED, because it held the shared verify lock past the foreground cap while a sibling seat was parked behind it.previews/andinspectors/were run whole instead, plus the 22-file reader list; that list is a name grep, so a test reaching these modules only through a registry without naming them is outside it unless it sits in those two directories.Acceptance notes
previews/flow-problems.ts(home ofbuildFlowProblems) andinspectors/useFlowScope.ts(its edge doc would have kept teaching the defect;useEdgeScopelives besideuseFlowScope).status), while downstream nodes readrecord.status. Whether the engine binds bare trigger fields when it evaluates the start node's out-edge guards was not measured here. The Problems panel skips those edges; only the edge inspector's picker offers the bare spelling. Carrier: none.Generated by Claude Code