Skip to content

test(provider): exit Claude fixture on EOF and prevent leaked processes - #48

Merged
nullStack65 merged 3 commits into
mainfrom
fix/provider-fixture-eof-20261031
Oct 31, 2026
Merged

nullStack65 merged 3 commits into
mainfrom
fix/provider-fixture-eof-20261031

Conversation

@nullStack65

@nullStack65 nullStack65 commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

The synthetic Claude readiness fixture kept a live interval after stdin closed, leaving stopped test work behind as Node processes. Clear only that keepalive on EOF and let Node exit naturally so queued stdout can drain. The version probe also exits naturally. Readiness probes and the regression use the same synthetic .mjs fixture.

The existing EOF regression uses the repository's NodeChildProcess namespace import and supported Schema.fromJsonString codecs. It preserves all exit/error/signal/stderr and type/subtype/request-ID assertions plus the two-second direct-child watchdog. A second128KiB request-ID case verifies the entire larger response survives pipe backpressure; no unbounded wait or latency/SLO qualification is introduced. The existing POSIX tilde-path convention and Windows skip remain.

Exact head: 8c4337893e9e0b1dc0d0148eb2708cc95f662b31.

Original request and provenance

Reported human quote from the original Mac repair dispatch, preserved exactly:

Before spinning these up, fix Mac storage, what keeps filling it, etc. it's been cleaned up too many times, let's root cause it and stop it from getting so bad. I don't think there is even any data on it I care about. Fix anything else that needs fixing before spinning these threads up. Codex cloud agents can be used while Mac repair happens. Mac repair should be a single 6.1 sol owner and I don't need it moving 1 2-megabyte files at a time and whatever bullshit.

Mac recovery owner #463 holds the incident evidence. The source ledger at the config repair head preserves the exact reported quote and technical follow-up. The opening/review T3 rows are agent-created handoffs, not authenticated human-origin messages. The original EOF-only fix was 3010acd; that fix and its durable regression remain in this branch. The latest coordinator follow-up corrects the concrete namespace/Schema diagnostics and preserves output flushing through natural exit.

Verification and limits

  • Coordinator reports real cloud Vitest at prior head1152494f0f909381081ee334a5a8d00cd16903f5 passed6 registry tests plus21 related provider tests. That run also found the named-import lint and two Effect preferSchemaOverJson failures fixed here. Those old-head passes do not qualify this new head.
  • Local native Node v24.21.0 syntax checks pass for both changed files; git diff --check passes. This is syntax/source inspection, not repository lint or Effect typecheck.
  • Direct native fixture probe: version/empty EOF/normal initialize EOF/128KiB initialize EOF all exit0, preserving the complete response (131,349bytes for the large case).
  • Removing interval cleanup reproduces the leaked-child timeout at2s; spawnSync terminates/reaps only its own child with SIGTERM.
  • Replacing cleanup with immediate process.exit(0) reproduces stdout truncation:65,536 of131,349bytes. Natural exit preserves the response. These are behavioral probes, not full qualification or timing guarantees.
  • Prepared real cloud Vitest/lint/Effect typecheck rerun is required at this exact new head. No Mac dependency-tree install, full suite, source merge, Actions enablement or new access. Existing Actions setting is untouched.
  • The separate cloud jsonc-parser installation-link defect remains an environment issue. The dependency is already declared; package manifests/lockfiles/source dependencies and diagnostics are unchanged.

Only the existing registry test and shared synthetic fixture changed. No real provider startup, credentials, live userdata/DB, security/access controls, VM disks or unrelated platform setup changes. Parent handles cloud rerun, independent review and merge.

@nullStack65

Copy link
Copy Markdown
Owner Author

START

START — T3 PR48 static-check/EOF-flush follow-up only. Existing head1152494f0f909381081ee334a5a8d00cd16903f5. Coordinator reports real cloud Vitest6 registry +21 related provider tests passed, while named spawnSync import violates namespace rule and raw JSON calls violate Effect preferSchemaOverJson. Fix via existing namespace/Schema conventions; preserve response assertion and owned direct-child2s watchdog. Replace forced EOF exit with minimal interval cleanup/natural exit to permit stdout flush. No diagnostic weakening, source-dependency edit for cloud jsonc-parser link defect, Mac dependency-tree install, Actions/security/access/merge or unrelated work. Second lightweight slot alongside pingdotgg#932; bounded64MiB disk/256MiB RAM preflight admitted. Return exact corrected head for prepared cloud rerun plus existing verified tomlkit target/interpreter for pingdotgg#284.

@nullStack65

Copy link
Copy Markdown
Owner Author

RESULT

RESULT — T3 PR48 source corrections published for the prepared real cloud rerun.

PR #48
Exact corrected head8c4337893e9e0b1dc0d0148eb2708cc95f662b31 (parent1152494f0f909381081ee334a5a8d00cd16903f5). Non-force push; no source merge. Only existing ProviderInstanceRegistryLive.test.ts and shared claudeTildeMock.mjs changed.

Changes:

  • Required import * as NodeChildProcess and NodeChildProcess.spawnSync.
  • Existing repository Schema.fromJsonString(Schema.Unknown) encodeSync/decodeUnknownSync pattern replaces new test JSON.stringify/JSON.parse calls. No diagnostic/config weakening or new suppression.
  • All response type/subtype/request-ID, child error/status/signal/stderr assertions preserved. Two-second direct-child watchdog remains.
  • EOF clears only the fixture's keepalive interval; natural exit lets queued stdout drain. Version probe also exits naturally.
  • Existing regression now covers both normal and128KiB request IDs to require full response flushing.

Bounded local evidence (not full qualification):

  • Native Node24.21.0 syntax/parse checks pass for both changed files; git diff --check passes.
  • Native copied-fixture version, emptyEOF, normal initializeEOF and128KiB initializeEOF pass with complete protocol response. Large response131,349bytes preserved.
  • Mutation removing interval cleanup reproduces ETIMEDOUT/SIGTERM at2,003ms; owned direct child terminated/reaped.
  • Mutation forcing process.exit(0) exits0 but truncates response to65,536bytes; full-response assertion would fail. Natural exit returns all131,349bytes.
  • Source inspection confirms namespace/codec convention, unchanged diagnostics suppression count, preserved watchdog/response assertions, and no dependency/lock/config/workflow changes. Worktree clean after commit.

Cloud boundary:
Coordinator reports real Vitest at OLD head1152494f passed6 registry +21 related provider tests. Those passes do not qualify this new head. Real cloud Vitest/lint/native Effect typecheck rerun remains required at8c4337893e9e0b1dc0d0148eb2708cc95f662b31. No Mac dependency-tree install, full test/lint/typecheck claim or replacement standalone qualification.
Cloud's missing jsonc-parser installation link is separately an environment defect in an already declared dependency; source dependencies were not changed to hide it. No Actions enablement, source merge, new access or worker fanout.

Durable local evidence: /Users/businessaccount/.local/state/closura/mac-disk-20261031/t3-48-static-followup/ (native-node24-probe.json, local-source-checks.json, source/PR readbacks). Existing private tomlkit reuse was separately verified for the coordinator's pingdotgg#284 handoff; no extra install, unrelated-file copy or global Python change. Exact paths returned in the repair thread.

Copy link
Copy Markdown
Owner Author

Exact-source validation and independent review receipt

Reviewed candidate: 8c4337893e9e0b1dc0d0148eb2708cc95f662b31; complete Git tree: 12456a0f25c122faf9f91ba55c3a89a4af85a2d5. Current main remains e97641abf69fb88538b53279ded28704b6ccb2b3; candidate is 3 ahead / 0 behind and changes only the existing registry test and shared synthetic fixture.

Independent source review found no remaining blocker. EOF clears only the fixture's own interval, allowing queued stdout to drain; version mode creates no keepalive. The durable regression shares the readiness fixture, checks normal and 128 KiB response IDs, retains child error/status/signal/stderr assertions, and has an owned direct-child timeout. Namespace/Schema corrections do not weaken diagnostics. No real provider, runtime/userdata, security, access, workflow or dependency-source changes.

The prepared cloud qualification owner completed, and the coordinator/reviewer read back, these results on the exact complete candidate tree:

Check Result
Real Vitest: registry, Claude capabilities, provider snapshot, Claude executable 27/27 passed, four files including all 6 registry tests
Native server Effect typecheck Passed
Workspace typechecks, cache disabled 15/15 passed
Targeted formatting/lint Passed
Full formatting/lint Passed, zero errors; 1,421 warnings
Restyle ceiling Passed, 628 findings at the existing ceiling
Complete Knip files/dependencies and configured exports audits Both passed, zero findings and no configuration-loading error

Primary scoped commands: from apps/server, ../../node_modules/.bin/vp test run src/provider/Layers/ProviderInstanceRegistryLive.test.ts src/provider/Layers/ClaudeCapabilitiesProbe.test.ts src/provider/providerSnapshot.test.ts src/provider/Drivers/ClaudeExecutable.test.ts --maxWorkers=1 and ../../node_modules/.bin/tsc --noEmit --incremental false; from root, targeted and full node_modules/.bin/vp check, node_modules/.bin/vp run lint:restyle-ceiling, and ASTRO_TELEMETRY_DISABLED=1 node_modules/.bin/vp run -r --concurrency-limit 2 typecheck. Both original complete Knip audit components were rerun after authentic pinned SPDX JSON was verified through the supported connector and placed only in the documented ignored cache. No exclusions, fabricated data, tracked dependency/lockfile edits, or audit bypass.

Identity nuance: the cloud executor's actual local HEAD remained base e97641ab...; it materialized the authentic candidate blobs and independently verified the complete tree above. It did not fabricate commit metadata or claim a clean checkout at candidate HEAD. GitHub independently returns that same tree for the published candidate commit. Toolchain included Node 24.19.0, Vite Plus 0.3.3, Vitest 4.1.11 and TypeScript 7.0.2+effect-tsgo.0.41.0.

Fresh source-landing checks: main is unprotected with required-status enforcement off/empty; repository rulesets are empty; no submitted reviews or unresolved threads; CodeRabbit status is success. Current AGENTS/development guidance requires scoped semantic tests/lint/types and identifies Knip enforcement; those checks above are complete. No mandatory GitHub Actions transport requirement was found. This receipt is not a GitHub Actions pass: zero current-head workflow runs/check-runs are present, and Actions remains untouched. No full test suite, desktop build, native Windows/macOS qualification, deployment, or installed-app claim. The legitimate CI-route health gap remains separately owned and open.

The coordinator relayed the user's normal source-merge authorization for this exact window. Normal expected-head source landing is authorized; no formal approval vote, rule bypass, Actions enablement or hosted billing change will be used. Source merge and installed/operational recovery remain distinct.

@nullStack65
nullStack65 marked this pull request as ready for review October 31, 2026 09:59
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nullStack65
nullStack65 merged commit 405f47c into main Oct 31, 2026
1 check passed

Copy link
Copy Markdown
Owner Author

Source landing verified

Merged normally by expected-head squash at 2026-10-31 09:59:49 UTC: 405f47c189187aa401821763c69c5e273de32831.

Post-merge readback confirms main points to that commit and its complete tree is 12456a0f25c122faf9f91ba55c3a89a4af85a2d5, exactly the independently reviewed/cloud-qualified candidate tree. Registry test blob c82a73248cdb25124f95669f178b35a790d69c4e and fixture blob caf62c9d0d977f1e3b42150919d0711a63e0f286 also match. The exact-source validation receipt above supersedes the older pending-cloud-check wording in the original PR body.

No formal approval vote or rule bypass was used. Post-merge Actions/check-run collections are empty, not green; Actions settings were not changed. This finishes verified source landing only. No app deployment, Mac checkout adoption, full-suite/native-platform pass, or resolution of the separately owned legitimate CI-route health gap is implied.

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