@ai-ecoverse/slicc-kernel 1.73.1 → 1.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -694,7 +694,7 @@ npm run test:unit
|
|
|
694
694
|
|
|
695
695
|
`npm test` builds `dist/` and runs the integration tests in Chromium from `playwright-core`, over raw CDP through the [harness from slicc-shared-web](https://github.com/ai-ecoverse/slicc-shared-web#integration-test-harness), against a cross-origin isolated test page that installs bash and coreutils into OPFS. Each test writes screenshots, console logs and CPU profiles to `artifacts/`; V8 coverage from the page and every worker, mapped back to `src/` through the source maps, goes to `coverage/`, and `artifacts/hotspots.md` lists where the time went.
|
|
696
696
|
|
|
697
|
-
Unit tests live in `test/unit/`, which stays out of git. They run real wasm bash and coreutils through the whole stack in Node `worker_threads` against an in-memory OPFS. The pre-commit hook runs them under coverage and requires every changed line in `src/` to be covered. `tools/heavy.sh` runs them two files at a time,
|
|
697
|
+
Unit tests live in `test/unit/`, which stays out of git. They run real wasm bash and coreutils through the whole stack in Node `worker_threads` against an in-memory OPFS. The pre-commit hook runs them under coverage and requires every changed line in `src/` to be covered. `tools/heavy.sh` runs them two files at a time, in one of two unit slots of the host (`/tmp/slicc-unit-N.lock`, waiting while both are taken; `SLICC_UNIT_SLOTS` sets how many, `SLICC_UNIT_SLOT=0` takes none, as for CI), never in the browser runs' slots (those go through `slicc-heavy`; `SLICC_HEAVY_SLOT=1` runs the unit tests through `~/.bb/coord-bin/slicc-heavy` instead, when it is there), and stops the run if its processes use more than 3,000,000 KB together or 2,000,000 KB in one process, or run longer than 900 s once it has its slot (`SLICC_HEAVY_TIMEOUT`; each test also has 180 s) (`SLICC_HEAVY_REPORT=1` prints the peak). `SLICC_HEAVY_TREE_KB` and `SLICC_HEAVY_PROC_KB` raise the caps, but only for measuring a run under a higher ceiling that still stops a runaway, never to get a commit through. The guard follows the command's process group and every process it has seen, including children that leave the group, but a process that forks, calls `setsid` and whose parent exits within one 0.25 s sample can escape: macOS has no unprivileged containment, and a test that daemonizes is a bug. The compiler tests (zig, rustc and cargo), each a few GB, are integration tests in `test/integration/compilers.test.mjs`, which CI runs.
|
|
698
698
|
|
|
699
699
|
The Biome, TypeScript, lefthook, Renovate and CI configuration comes from [slicc-shared-web](https://github.com/ai-ecoverse/slicc-shared-web), which also provides the `slicc-lint-comments` (no comments anywhere), `slicc-no-unit-tests` (no unit tests in git) and `slicc-diff-cover` (100% coverage of changed lines) commands that `npm run lint` and the pre-commit hook use.
|
|
700
700
|
|
|
@@ -8771,6 +8771,11 @@ function number(r) {
|
|
|
8771
8771
|
if (!r.ok) return -wasiErrno(r.errno);
|
|
8772
8772
|
return r.kind === "json" && typeof r.json === "number" ? r.json : -wasiErrno("EIO");
|
|
8773
8773
|
}
|
|
8774
|
+
function throughKernel(sig) {
|
|
8775
|
+
if (sig === 0) return false;
|
|
8776
|
+
const action = defaultAction(sig);
|
|
8777
|
+
return action === "terminate" || action === "stop";
|
|
8778
|
+
}
|
|
8774
8779
|
function restarted2(issue) {
|
|
8775
8780
|
for (; ; ) {
|
|
8776
8781
|
const r = issue();
|
|
@@ -8983,7 +8988,7 @@ function createProcessKernel(deps) {
|
|
|
8983
8988
|
return status(call2({ op: "umount", target: at(target), flags }, `umount ${target}`));
|
|
8984
8989
|
},
|
|
8985
8990
|
kill(pid, sig) {
|
|
8986
|
-
if (pid === deps.pid) {
|
|
8991
|
+
if (pid === deps.pid && !throughKernel(sig)) {
|
|
8987
8992
|
if (sig !== 0) deps.raise?.(sig);
|
|
8988
8993
|
return 0;
|
|
8989
8994
|
}
|
|
@@ -9027,6 +9032,7 @@ var S_IFMT2, S_IFDIR2, POLLIN2, POLLOUT2, POLLERR2, POLLHUP2, POLLNVAL, SELECT_S
|
|
|
9027
9032
|
var init_process_children = __esm({
|
|
9028
9033
|
"src/process/process-children.ts"() {
|
|
9029
9034
|
"use strict";
|
|
9035
|
+
init_signals();
|
|
9030
9036
|
init_process_fork();
|
|
9031
9037
|
init_wasi_errno();
|
|
9032
9038
|
S_IFMT2 = 61440;
|