Repository navigation
fix(start-sdk): prevent one-sided output capture from blocking daemons - #4645
Conversation
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Cross-review requested. |
helix-white
left a comment
There was a problem hiding this comment.
Reviewed b1c58f5; merges cleanly into master.
CommandControllernow builds a per-fd stdio array, so a stream without a callback inherits the runtime's descriptor instead of being an unread pipe. That removes the one-sided back-pressure hang. Stdin moves from an unused pipe to inherit, which matches what the no-callback path already did.commandOptionsspreads the remaining spawn options through unchanged, so the array reachescp.spawn. WideningStdioOptions.stdiotocp.StdioOptionsis compatible with the existing'inherit'callers, andspawnalready returnscp.ChildProcess(nullable streams), so the?.onhandling stays correct.- The
runAsInitpath still usesstdio: 'inherit'and ignores the callbacks. That behavior predates this change and is out of scope. - The test runs a real subprocess against the production controller for all four callback combinations, and inherited streams go to files that nothing reads. It would hang on the previous pipe-both behavior.
No changes requested.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b
|
CI failure diagnosis: the changelog/version job reaches the unrelated APT publishing fixture and fails because the runner lacks apt-ftparchive ( |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Fixed CI in 9922d69 as requested. A shared setup-release-tests action installs apt-utils (which supplies apt-ftparchive), dpkg-dev, and gnupg in both the changelog job and the full-test job, since both run the APT fixture. Added regression coverage for both call sites and documented local prerequisites. Ran the action’s exact install script locally, then make release-notes-test: all 175 Node tests and both shell suites pass, including apt-publish-test. All 64 package-CI action tests and formatting pass. The two workflow regression cases fail against the previous workflow and pass with the fix. Fresh CI is pending. Closed the interim Jellyfin workaround PR #45 at @dr-bonez’s direction; Jellyfin will rebuild after the SDK release instead. The PR brief reflects both changes. |
|
Please re-review the added CI dependency setup and its tests in 9922d69. The approved daemon-output implementation is unchanged; the brief now includes the CI repair and SDK-first Jellyfin rollout. |
helix-white
left a comment
There was a problem hiding this comment.
Re-reviewed 9922d69 against my earlier approval at b1c58f5. It still merges cleanly into master, and the daemon-output implementation is unchanged.
setup-release-testsinstallsapt-utils(which providesapt-ftparchive),dpkg-devandgnupgafter anapt-get update. Both jobs that reachscripts/tests/apt-publish-test.shuse it: the changelog job (make release-notes-test) and the test job (make test). One shared action keeps the dependency list in one place. In the test job it also refreshes the package index before the existingbash-completioninstall.release-test-deps.test.mjsuses the samejs-yamlandREPOfixtures as the neighbouring action tests, andmake testpicks it up through the.github/actions/tests/*.test.mjsglob. It asserts the setup step runs after checkout and before each command, and that the action installs the three packages.- The AGENTS.md note documents the local prerequisite where contributors look for test commands.
No changes requested.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b
|
The CI repair has passed renewed cross-review on 9922d69, and GitHub reports MERGEABLE. The brief is current and final review is requested from @dr-bonez again. Prettier and conflict checks pass; changelog validation, full tests, lockfile/format checks, generated artifacts, license checks, and the three architecture builds remain in progress. |
|
Retiring the marked review from @helix-b (#4645 (review)). Dismissed by Helix: the changes require a substantive PR brief update. Commit 9922d69 (single non-merge commit on b1c58f5) leaves the SDK daemon-output code unchanged but adds new CI scope: a shared .github/actions/setup-release-tests action installing apt-utils/dpkg-dev/gnupg, wired into both the changelog job (make release-notes-test) and the test job (make test) in test.yaml, a workflow-wiring regression test, and an AGENTS.md prerequisite note. The reviewed brief described the PR as an SDK-only change (+6/−2 in 2 files) and stated the changelog job's missing-apt-ftparchive failure was an unrelated merge blocker outside the PR. The PR now fixes that failure by changing CI runner setup and contributor docs, so the brief's scope and its merge-blocker statement must be updated. |
|
Merged after final approval. All executed checks passed, including the repaired changelog/release-tooling job, full automated tests, formatting/lockfiles, generated artifacts, dependency licenses, and x86_64/aarch64/riscv64 compilation. Image assembly/deployment and metadata-only retarget jobs were skipped, not executed verification. The fix is in source, not yet in existing installed package bundles. As agreed, the interim Jellyfin workaround remains closed; Jellyfin needs a rebuild after an SDK release containing this change. No SDK release or package publication was performed in this task. |
The reported CI dependency failure is fixed in this PR at @dr-bonez’s request. Cross-review approves the updated head; fresh CI remains pending.
Fixes daemon hangs when a package captures only stdout or stderr. The SDK previously piped both streams but read only the stream with a callback, allowing the other socket to fill. Jellyfin's stdout startup-readiness callback exposes this defect to ffprobe descendants inheriting stderr; this reproduces the mechanism without establishing the affected server's exact blocked descriptor or peer.
The fix uses Node's per-descriptor stdio options: callback-backed output streams remain piped, and each other stream inherits the runtime's descriptor. Stdin also inherits instead of becoming an unused pipe.
SubContainer.spawnaccepts Node's standard stdio options and forwards them through its existing command preparation. There is no new queue, drainer, timeout, or discarded output. Init-process launches retain their existing inherited stdio behavior; callbacks remain unsupported there.Also fixes CI’s missing
apt-ftparchive: both jobs that run release-tooling tests installapt-utils,dpkg-dev, andgnupgthrough one shared setup action. The tests use real archive/signing tools and an isolated fake S3 store; they do not publish externally. Contributor guidance records the local prerequisites.Implementation diff: +19 / −2 lines in 4 files (excludes lockfiles, tests, docs, release notes, and changelog).
Packages receive this only after an SDK release and rebuild; existing installed bundles do not change. The pending SDK version is already 4.1.0. The interim Jellyfin #45 workaround is closed at @dr-bonez’s direction; Jellyfin will instead rebuild against the released SDK fix. #4537 changes one-off command completion in another method of the same subcontainer module; neither depends on the other.
Verification: On the Linux build host, real Node subprocesses write 1 MiB to each stream through the production controller, with inherited outputs directed to files that have no viewer. Both one-sided callback cases time out before the fix; all four callback combinations complete in 18–50 ms after it, with every byte retained. SDK typecheck, bundle, formatting, changelog version check, and
make start-sdk-testpass, including 340 SDK Jest tests, 45 build-script tests, core tests, and declaration-documentation checks. The new suite passes with open-handle detection. One full-suite run warned about a worker force-exit despite passing tests; npm also reports existing tooling audit advisories. The CI setup action’s exact installation commands were run on the Debian build host, thenmake release-notes-testpassed all 175 Node tests and both shell suites, including the previously failing APT fixture.make package-ci-testpasses all 64 tests. The two new workflow-wiring checks fail against the previous workflow and pass after the fix; formatting checks pass. GitHub’s Ubuntu runner execution remains pending. No live StartOS/Jellyfin scan was run, and the original server's socket mapping remains unverified.Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol