Skip to content

ci: repair red main (advisories, sandbox under dash, tree-sitter in jest, readiness check) - #1

Merged
classeve-public merged 4 commits into
mainfrom
ci/repair-2026-09-18
Sep 19, 2026
Merged

classeve-public merged 4 commits into
mainfrom
ci/repair-2026-09-18

Conversation

@classeve-public

@classeve-public classeve-public commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Repairs main, red since 2026-09-08 (last green ae9c94d). Four causes:

Audit dependencies — hono (moderate) and js-yaml (high). npm audit fix, lockfile-only; npm audit reports 0 vulnerabilities.

Sandbox: repository commands never ran on Debian or Ubuntu — /bin/sh there is dash, which has no ulimit -u (dash spells the process ceiling -p). The ulimit chain stopped and sh exited 2 before exec, on every such host since the first release; the exactly-once test added in 2.15.0 was the first to assert the exit code. The process ceiling now tries -u, then -p, and nothing runs if neither sets it. -f is given in 512-byte blocks, the unit every POSIX sh uses (KB had halved the configured size). The process ceiling applies inside the new user namespace only: RLIMIT_NPROC counts every task the user owns, so outside one it stops the target's own threads on any busy host. A new Linux test reads /proc/self/limits from the sandboxed process and checks each ceiling.

workspace-parse-cache — Jest re-evaluates tree-sitter's JS wrapper in every test file but loads its native addon once per worker. The second evaluation captures its own rootNode getter instead of the native method, so every later tree in that worker has no root node. A server process evaluates the wrapper once and is unaffected. A test shim now evaluates it once per worker. Without the shim, the six parsing suites in one process fail 1 test; with it, 114 of 114 pass.

Docker install path — 2.15.0 moved the migration count behind authentication at /ready_detail. The check still asked /ready.

Local: typecheck, lint, and npm run test:ci (1941 passed, coverage thresholds met).

npm audit flagged hono (moderate) and js-yaml (high); semver-compatible, lockfile-only. Clears the CI Audit dependencies failure; npm audit now reports 0 vulnerabilities.
ClassEve added 3 commits September 19, 2026 23:06
…un on Debian and Ubuntu

/bin/sh is dash on Debian and Ubuntu, and dash has no `ulimit -u` (it spells the process ceiling
-p). The chain stopped there and sh exited 2 before exec, so no sandboxed command has run on those
hosts since the first release; the new exactly-once test was the first to assert a Linux exit code.

- the process ceiling tries -u (bash, busybox) and then -p (dash); if neither sets it, nothing runs
- -f is given in 512-byte blocks, the unit every POSIX sh uses; KB had halved the configured size
- the process ceiling applies inside the new user namespace only: RLIMIT_NPROC counts every task
  the user owns, so outside one it stops the target's own threads on any busy host

A Linux test reads /proc/self/limits from the sandboxed process and checks each ceiling's value.
Jest re-evaluates tree-sitter's JS wrapper in each test file but loads its native addon once per
worker. The second evaluation destructures Tree.prototype after the first replaced rootNode with a
getter, captures undefined, and from then on every tree in that worker has no root node. Any test
file that was not the first parser in its worker searched empty trees; workspace-parse-cache was
the one whose assertions noticed.

The shim evaluates the wrapper once per worker and hands every test file that instance, as a real
process does. Reproduced without the shim: the six parsing suites in one process, 1 failure; with
it, 114 of 114.
2.15.0 moved the detailed readiness report behind authentication at /ready_detail, so /ready
answers every caller with the same body. The check still asked /ready and found no migrations
field.
@classeve-public classeve-public changed the title ci: repair red main (dep advisories, flaky parser pooling, sandbox ulimit abort) ci: repair red main (advisories, sandbox under dash, tree-sitter in jest, readiness check) Sep 19, 2026
@classeve-public
classeve-public merged commit acdd2a1 into main Sep 19, 2026
9 checks passed
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