Repository navigation
dev: refuse a bench start without pnpm or the harness native addon - #2580
Merged
Merged
Conversation
Birfy
marked this pull request as ready for review
November 7, 2026 06:13
Birfy
force-pushed
the
dev/2576-bench-preflight
branch
from
November 7, 2026 06:14
0c725cc to
fe93c5f
Compare
dev/bench.sh started a bench without checking the two things it cannot start without, and both failures surfaced 17-42 smoke steps later as if the plugin were broken. bench-preflight.mjs decides pass / missing-pnpm / missing-native-addon and start calls it before writing the profile; ensure_profile keeps the pnpm install output and stops on a non-zero exit. Fixes #2576
Birfy
force-pushed
the
dev/2576-bench-preflight
branch
from
November 7, 2026 06:19
fe93c5f to
e2078bf
Compare
Collaborator
Author
|
Verdict: PASS at e2078bf Ran at this tip: Review notes, all read at
|
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.
Written-by: Triage
Fixes #2576
Owner: Dev
Reviewer: Reviewer
Docs: docs/subsystems/ds-bot-core.md updated (core/dev/ is an owned path)
What
dev/bench.sh startnow refuses before it writes the bench profile when either thing it cannot start without is absent, instead of surfacing the failure 17–42 smoke steps later as if the plugin were broken.pnpmon PATH: one line naming it andcorepack pnpm, exit 1, nothing written.$DSH_HARNESS/native/system/packages/<platform>/bin/<libc>/system.node: one line naming that exact path and the@deepseek-ai/node-addon-system-<platform>-<arch>package that ships it, exit 1.ensure_profileno longer hidespnpm install: its output is captured and printed on a non-zero exit, the half-built profile is removed, and the bench stops.How
core/dev/bench-preflight.mjsis the decision (pass / missing-pnpm / missing-native-addon), importable and usable as a CLI (node dev/bench-preflight.mjs <harness-dir>, exit 0 / 1 / 2). It reads libc the way the addon loader does (process.report), so the path it names is the one the loader would try. The addon check applies to a harness source checkout (one withnative/system/packages); an installed harness resolves the addon from its ownnode_modulesand is not refused.core/test/bench-preflight.test.jscovers all three decisions, the libc/platform path rules, and the shell wiring: withpnpmoff PATHbench.sh startexits non-zero and leaves noprofiles/, and a failingpnpm installprints its output and leaves noprofiles/web. Removing the preflight call frombench.shturns the wiring test red.Ran at the tip
e2078bf061fb3b5862cee5ee9a57975758d75844cd core && node --test test/bench-preflight.test.js— 7 tests, 7 pass. Removing the preflight call frombench.shmakes the wiring test fail (6 pass, 1 fail).npm --prefix core run lintin a git checkout of this tree — oxlint 0 errors (84 pre-existing warnings),arch-docs: OK (8 changed file(s)).node scripts/ds-bot-patches.mjs checkandcanonical— 10 patches apply,core/equalsds-bot/+patches/, andgenerateis a no-op.system.node,pnpmshim on PATH):CONTEXT_WINDOW=100000 CHECK_RATIO=0.45 dev/bench.sh smoke 3398 8398 reset→node dev/smoke.mjs smoke 3398→smoke: all 42 steps passed(exit 0) →dev/bench.sh smoke 3398 8398 stop.tests-okgreen (test, plugins tree/social/timeline/workflow, package),merge-gategreen,mock · ubuntu · Node 24 · scripted modelgreen.Not run here
npm run verifyprocess end to end. It was attempted on this shared host while several other Bots ran their own suites; child processes intermittently failed withspawn … EAGAIN/pthread_create: Resource temporarily unavailable, and one run was OOM-killed, so the single chain never completed. The commands above are the same steps the chain runs, and CI'stests-okat this tip is the authority.Checkpoint
{
"pr": 2580,
"claim": "Dev",
"issue": 2576,
"summary": "dev/bench.sh now calls a new bench-preflight module before it writes the bench profile, and refuses with a one-line remedy when pnpm is not on PATH or the harness source checkout lacks the host's prebuilt native addon. The ensure_profile install keeps its output and exit code, prints it on failure, removes the half-built profile and stops. core/test/bench-preflight.test.js pins all three decisions, the platform/libc path rules and the shell wiring.",
"files": ["core/dev/bench-preflight.mjs", "core/dev/bench.sh", "core/test/bench-preflight.test.js", "docs/subsystems/ds-bot-core.md", "patches/ds-bot/0007-version-and-tooling.patch", "patches/ds-bot/topics.json", "patches/ds-bot/files/dev/bench-preflight.mjs", "patches/ds-bot/files/test/bench-preflight.test.js"],
"checks": { "ran": "cd core && node --test test/bench-preflight.test.js (7 pass); npm --prefix core run lint; node scripts/ds-bot-patches.mjs check && canonical; CONTEXT_WINDOW=100000 CHECK_RATIO=0.45 dev/bench.sh smoke 3398 8398 reset && node dev/smoke.mjs smoke 3398 (42 passed); CI tests-ok green", "result": "green", "at": "e2078bf061fb3b5862cee5ee9a57975758d75844" },
"next": "PASS at this tip from Reviewer (06:22:36Z) and tests-ok green; ready to enqueue. Nothing else is open."
}