You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
app-shell previews/FlowCanvas.test.tsx escapes to the real network (ECONNRESET/"socket hang up" noise, different mechanism than #4688/#4697) #4699
Found while verifying objectui#4697's acceptance criteria (measuring the full packages/app-shell/src/views/metadata-admin/ suite before/after that fix). objectui#4697's own card anticipated this: "a remainder from yet another probe is a NEW finding, not this card's."
Both prior cards were ECONNREFUSED from a plain fetch() (a MetadataClient call in #4697's case, the grid's explain probe in #4688's). This one is a different error code entirely — ECONNRESET / Error: socket hang up — which is what Node's http client throws when a connection is aborted mid-flight, not "nobody is listening." That points at a different transport shape (e.g. a long-lived/streaming connection torn down on unmount) rather than a plain one-shot fetch() rejection.
Measured (worktree objectui-issue-4697, on top of objectui#4697's own fix, commit b65801b2d)
Bisected the same way #4697 bisected its own 180: ran packages/app-shell/src/views/metadata-admin/ in full (167 files, 1671 passed | 1 skipped — no assertion failures either before or after isolating this), saw 20 ECONNRESET lines that #4697's fix does not touch, then binary-searched by directory/file:
Isolated previews/FlowCanvas.test.tsx alone (pnpm exec vitest run … --maxWorkers=1) → 19ECONNRESET lines, exit 0 (all assertions pass; every other file in previews/ → 0)
Like #4688/#4697, this does not fail any test — FlowCanvas.tsx/FlowCanvas.test.tsx don't reference useMetadataClient, fetch, WebSocket, or EventSource directly in their own source, so the escaping call is coming from something FlowCanvas.tsx imports transitively; not root-caused further here (out of scope for the card that surfaced it).
Suggested direction
Same shape as #3339/#4105/#4688/#4697: trace the transitive import that opens the connection (start from what FlowCanvas.tsx renders/imports beyond the flow-canvas-layout pure helpers) and either stub it in the test or make the hook it comes from skip the connection when no host/adapter is present — whichever precedent fits once the actual call site is found.
Provenance
Measured in worktree objectui-issue-4697 (branch claude/issue-4697-metadata-client-doubles) while verifying objectui#4697, on top of b65801b2d.
First-touch grading (seat repo:objectui; session session_01RnQd8iMMUwXQEV1crFmQiQ, 2026-08-15): pm:queue, size S, tests-only, age-ordered — the tail of the network-escape hygiene family (#3339 → #4105 → #4688/#4689/#4698 → #4697/#4700). Different transport mechanism (ECONNRESET/socket-hang-up, 19 lines isolated in previews/FlowCanvas.test.tsx), so the dispatch's first step is identifying the actual call site before picking the double shape — do not assume the metadata client. Sequenced after PR #4700 lands (same test area).
Claim: PM loop round 11 (sequencing cleared — PR #4700 is MERGED, the metadata-admin test area is free)
Session: session_01RnQd8iMMUwXQEV1crFmQiQ
Branch: claude/issue-4699-flowcanvas-network-double
Worktree: objectui-issue-4699
Domain: repo:objectui
File surface: packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx (+ a second file only if the measured call site demands a sibling stub) + the tests-only empty-frontmatter changeset if the presence gate demands one. ⛔ No production source (stop on breach; explain in the report)
Container & model: S, mode:subagent, model: sonnet
Serial constraints cleared: in-flight is only objectstack#8830 (other repo); no open dev PR touches this file (checked this round).
{
"issue": 4699,
"status": "done",
"branch": "claude/issue-4699-flowcanvas-network-double",
"pr": "https://github.com/objectstack-ai/objectui/pull/4702",
"premise_still_valid": true,
"summary": "Measured (not assumed) the transport: FlowCanvas -> useFlowNodePalette -> useActionDescriptors fires a real GET /api/v1/automation/actions on every mount via a mount-time useEffect, aborted (AbortController) on unmount. This repo's vitest `dom` project has no fetch mock, so global fetch resolves to happy-dom's OWN polyfill (backed by Node's http/https core client, not undici -- happy-dom/lib/fetch/Fetch.js imports 'http' directly), which is why the escape surfaces as ECONNRESET/socket-hang-up (node:_http_client stack frames) instead of the instant ECONNREFUSED the undici-based fetch family (#4688/#4697) produces. Instrumented global.fetch to confirm: exactly 19 calls to '/api/v1/automation/actions', matching the 19 tests 1:1. Fixed by stubbing global.fetch for that exact endpoint in FlowCanvas.test.tsx only (beforeEach/afterEach, vi.stubGlobal/vi.unstubAllGlobals), degrading with a 404 -- the same 'engine absent' response the hook already falls back from -- so NODE_PALETTE fallback behavior is unchanged.",
"tests": "Baseline reproduced isolated (--maxWorkers=1): 19 'socket hang up' lines, exit 0, 19 passed (19) -- matches issue's exact count. After fix, same isolated run: 0 noise lines, 19 passed (19), every assertion unchanged. Full previews/ directory suite: 37 files passed (37), 441 tests passed (441) (1 residual socket-hang-up line remains from a DIFFERENT sibling file, flow-canvas-seeds.spec-parse.test.tsx, which independently renders a FlowCanvas element with no stub of its own -- filed unassigned as #4701, out of scope here). Reverse verification (fix committed first, HEAD b4eac2291): git checkout origin/main -- the file path restored the pre-fix file -> re-ran isolated -> 19 socket-hang-up lines returned, 19 passed (19) (predicted red/noise-returns direction confirmed) -> restored via git checkout claude/issue-4699-flowcanvas-network-double -- the file path -> re-ran -> back to 0 noise / 19 passed. Local gate union at HEAD b4eac2291: `pnpm --filter '@object-ui/app-shell^...' build` (dependency closure) green; `pnpm --filter @object-ui/app-shell run type-check` green; `pnpm exec eslint --quiet packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx` clean; `node scripts/check-changeset-presence.mjs` green (empty-frontmatter changeset declared, tests-only); `node scripts/check-changeset-no-major.mjs` green; `pnpm run check:control-bytes` OK. scripts/pm/dispatch-gates.mjs does not exist in this repo (checked); re-derived implicated gates by hand against the 2-file diff (1 test file + 1 changeset) -- no new error codes, no .claude/agents/** changes, no new fake engine, no i18n call-site changes, so no family beyond the ones named/run above is implicated. PR labeled tests + skip-changeset (matching #4700's precedent for this same tests-only family), read back after write to confirm: ['tests','skip-changeset'].",
"open_questions": [],
"out_of_scope_findings": [
"filed as #4701: app-shell previews/flow-canvas-seeds.spec-parse.test.tsx independently renders a FlowCanvas element with no fetch stub of its own, so it exercises the same ECONNRESET/socket-hang-up escape #4699 fixed in FlowCanvas.test.tsx (1 line isolated, 25 passed (25), harmless noise, same remedy applies)"
]
}
The measurement-first order was honored and paid off: the transport is genuinely different from the plain-fetch family — happy-dom's own fetch polyfill rides Node's http core client (verified in its source), and the unmount AbortController races the in-flight socket, which is why this surfaces as ECONNRESET/socket-hang-up instead of undici's instant refusal. 19 instrumented calls to /api/v1/automation/actions matching the 19 tests 1:1 is the attribution done right, and the 404-degradation stub reuses the hook's own "engine absent" fallback so behavior is provably unchanged.
CI on this head is converging — ready + auto-merge flips when the gates conclude green (timer armed). Card closes on merge; pm:dispatched comes off then. #4701 graded on its own card.
Activity
yinlianghui commentedon Aug 15, 2026
First-touch grading (seat
repo:objectui; sessionsession_01RnQd8iMMUwXQEV1crFmQiQ, 2026-08-15):pm:queue, size S, tests-only, age-ordered — the tail of the network-escape hygiene family (#3339 → #4105 → #4688/#4689/#4698 → #4697/#4700). Different transport mechanism (ECONNRESET/socket-hang-up, 19 lines isolated inpreviews/FlowCanvas.test.tsx), so the dispatch's first step is identifying the actual call site before picking the double shape — do not assume the metadata client. Sequenced after PR #4700 lands (same test area).Generated by Claude Code
yinlianghui commentedon Aug 15, 2026
Claim: PM loop round 11 (sequencing cleared — PR #4700 is MERGED, the metadata-admin test area is free)
Session:
session_01RnQd8iMMUwXQEV1crFmQiQBranch:
claude/issue-4699-flowcanvas-network-doubleWorktree:
objectui-issue-4699Domain:
repo:objectuiFile surface:
packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx(+ a second file only if the measured call site demands a sibling stub) + the tests-only empty-frontmatter changeset if the presence gate demands one. ⛔ No production source (stop on breach; explain in the report)Container & model: S,
mode:subagent,model: sonnetSerial constraints cleared: in-flight is only objectstack#8830 (other repo); no open dev PR touches this file (checked this round).
Generated by Claude Code
yinlianghui commentedon Aug 15, 2026
{ "issue": 4699, "status": "done", "branch": "claude/issue-4699-flowcanvas-network-double", "pr": "https://github.com/objectstack-ai/objectui/pull/4702", "premise_still_valid": true, "summary": "Measured (not assumed) the transport: FlowCanvas -> useFlowNodePalette -> useActionDescriptors fires a real GET /api/v1/automation/actions on every mount via a mount-time useEffect, aborted (AbortController) on unmount. This repo's vitest `dom` project has no fetch mock, so global fetch resolves to happy-dom's OWN polyfill (backed by Node's http/https core client, not undici -- happy-dom/lib/fetch/Fetch.js imports 'http' directly), which is why the escape surfaces as ECONNRESET/socket-hang-up (node:_http_client stack frames) instead of the instant ECONNREFUSED the undici-based fetch family (#4688/#4697) produces. Instrumented global.fetch to confirm: exactly 19 calls to '/api/v1/automation/actions', matching the 19 tests 1:1. Fixed by stubbing global.fetch for that exact endpoint in FlowCanvas.test.tsx only (beforeEach/afterEach, vi.stubGlobal/vi.unstubAllGlobals), degrading with a 404 -- the same 'engine absent' response the hook already falls back from -- so NODE_PALETTE fallback behavior is unchanged.", "tests": "Baseline reproduced isolated (--maxWorkers=1): 19 'socket hang up' lines, exit 0, 19 passed (19) -- matches issue's exact count. After fix, same isolated run: 0 noise lines, 19 passed (19), every assertion unchanged. Full previews/ directory suite: 37 files passed (37), 441 tests passed (441) (1 residual socket-hang-up line remains from a DIFFERENT sibling file, flow-canvas-seeds.spec-parse.test.tsx, which independently renders a FlowCanvas element with no stub of its own -- filed unassigned as #4701, out of scope here). Reverse verification (fix committed first, HEAD b4eac2291): git checkout origin/main -- the file path restored the pre-fix file -> re-ran isolated -> 19 socket-hang-up lines returned, 19 passed (19) (predicted red/noise-returns direction confirmed) -> restored via git checkout claude/issue-4699-flowcanvas-network-double -- the file path -> re-ran -> back to 0 noise / 19 passed. Local gate union at HEAD b4eac2291: `pnpm --filter '@object-ui/app-shell^...' build` (dependency closure) green; `pnpm --filter @object-ui/app-shell run type-check` green; `pnpm exec eslint --quiet packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx` clean; `node scripts/check-changeset-presence.mjs` green (empty-frontmatter changeset declared, tests-only); `node scripts/check-changeset-no-major.mjs` green; `pnpm run check:control-bytes` OK. scripts/pm/dispatch-gates.mjs does not exist in this repo (checked); re-derived implicated gates by hand against the 2-file diff (1 test file + 1 changeset) -- no new error codes, no .claude/agents/** changes, no new fake engine, no i18n call-site changes, so no family beyond the ones named/run above is implicated. PR labeled tests + skip-changeset (matching #4700's precedent for this same tests-only family), read back after write to confirm: ['tests','skip-changeset'].", "open_questions": [], "out_of_scope_findings": [ "filed as #4701: app-shell previews/flow-canvas-seeds.spec-parse.test.tsx independently renders a FlowCanvas element with no fetch stub of its own, so it exercises the same ECONNRESET/socket-hang-up escape #4699 fixed in FlowCanvas.test.tsx (1 line isolated, 25 passed (25), harmless noise, same remedy applies)" ] }Generated by Claude Code
yinlianghui commentedon Aug 15, 2026
ACCEPT — PR #4702 (reviewer of record; readings taken on GitHub at head
b4eac2291, matching the report's gate-union HEAD) with one correction applied.main, first lineFixes #4699; app-shell previews/flow-canvas-seeds.spec-parse.test.tsx escapes to the real network (same ECONNRESET mechanism as #4699, different file) #4701 referenced bare. Scope (2 files): the test file + the tests-only empty-frontmatter changeset — no production source, exactly the boundary.httpcore client (verified in its source), and the unmountAbortControllerraces the in-flight socket, which is why this surfaces asECONNRESET/socket-hang-up instead of undici's instant refusal. 19 instrumented calls to/api/v1/automation/actionsmatching the 19 tests 1:1 is the attribution done right, and the 404-degradation stub reuses the hook's own "engine absent" fallback so behavior is provably unchanged.previews/suite green with the 1 residual line attributed to a DIFFERENT sibling file and filed (app-shell previews/flow-canvas-seeds.spec-parse.test.tsx escapes to the real network (same ECONNRESET mechanism as #4699, different file) #4701), not absorbed; reverse verification returned to exactly 19 and back to 0.skip-changesetlabel citing "test(app-shell): stub useMetadataClient in metadata-admin inspector suites #4700's precedent" — no such mechanism exists in objectui (the standing lesson from PR test(parity): adapt the spec parity gates to 17.0.0 GA (ruled items 1-5); fork the four-block exemption #4671's patch round: the empty-frontmatter changeset IS the tests-only mechanism, and test(app-shell): stub useMetadataClient in metadata-admin inspector suites #4700's labels weretestsonly). The changeset in this PR is correct and the Declaration gate is green off it; the label was decorative here but teaches a false mechanism, so I have removed it. No code change needed.CI on this head is converging — ready + auto-merge flips when the gates conclude green (timer armed). Card closes on merge;
pm:dispatchedcomes off then. #4701 graded on its own card.Generated by Claude Code
test(app-shell): stub the automation/actions fetch in FlowCanvas.test…