1 Commits
Author SHA1 Message Date
sneak 7635af0107 chore: run jest in three worker processes (closes #426)
check / check (push) Failing after 1s
e2e / e2e-chrome (push) Failing after 1s
e2e / e2e-firefox (push) Failing after 1s
The test and test:verbose scripts ran jest with one worker per CPU core,
about 47 processes and 7-8 GiB per run on the shared 48-core build host.
They now pass --maxWorkers=3. On that host the suite takes 23-29s, inside
the unchanged 30-second cap in script/test but not by much: one test
file, tests/persistedFieldContract.test.js, takes most of it. One or two
workers went past the cap, so this departs from the issue's two-process
limit. make check, the pre-commit hook and script/cibuild all reach jest
through these scripts; the timings in the script/test and Dockerfile
comments are updated to match.

Model: opus-5-5
2026-10-04 11:48:13 +00:00
4 changed files with 19 additions and 17 deletions
+3 -3
View File
@@ -9,9 +9,9 @@ WORKDIR /app
ENV AUTISTMASK_LINT_NATIVE=1 ENV AUTISTMASK_LINT_NATIVE=1
# script/test's default 30s bound is the host figure, against a suite that # script/test's default 30s bound is the host figure, against a suite that
# runs in about 28s there. In here the same suite starts on a cold jest cache # takes 23-29s there with three jest workers. In here the same suite starts on
# and shares the runner with the rest of the build, so 30s is marginal rather # a cold jest cache and shares the runner with the rest of the build, so 30s
# than a bound — it killed a healthy suite at 30.6s on a cold CI cache. 180s # is too tight — it killed a healthy suite at 30.6s on a cold CI cache. 180s
# still catches a hang in three minutes and cannot be tripped by a suite that # still catches a hang in three minutes and cannot be tripped by a suite that
# is merely running on contended hardware. # is merely running on contended hardware.
ENV AUTISTMASK_TEST_TIMEOUT=180 ENV AUTISTMASK_TEST_TIMEOUT=180
+7 -5
View File
@@ -45,14 +45,16 @@ but the review is broader than any of them.
# Completed Steps # Completed Steps
- 2026-10-04: `make test` runs jest in two worker processes - 2026-10-04: `make test` runs jest in three worker processes
([#426](https://git.eeqj.de/sneak/AutistMask/issues/426)). The `test` and ([#426](https://git.eeqj.de/sneak/AutistMask/issues/426)). The `test` and
`test:verbose` scripts in `package.json` ran `jest --forceExit`, which starts `test:verbose` scripts in `package.json` ran `jest --forceExit`, which starts
one worker per CPU core: about 47 processes and 7-8 GiB per run on the shared one worker per CPU core: about 47 processes and 7-8 GiB per run on the shared
48-core build host. They now pass `--maxWorkers=2`. One process took the suite 48-core build host. They now pass `--maxWorkers=3`, and the suite takes 23-29s
past the 30-second cap in `script/test`, which is unchanged; two workers stay there: inside the 30-second cap in `script/test`, which is unchanged, but not
inside it, though on the busy build host only just. `make check`, the by much, because `tests/persistedFieldContract.test.js` alone takes most of it
pre-commit hook and `script/cibuild` all run the suite through these scripts. ([#428](https://git.eeqj.de/sneak/AutistMask/issues/428)). One or two workers
went past the cap. `make check`, the pre-commit hook and `script/cibuild` all
run the suite through these scripts.
- 2026-10-04: The error container on each dApp approval screen keeps its height - 2026-10-04: The error container on each dApp approval screen keeps its height
when an error appears when an error appears
+2 -2
View File
@@ -6,8 +6,8 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
"test": "jest --forceExit --maxWorkers=2", "test": "jest --forceExit --maxWorkers=3",
"test:verbose": "jest --forceExit --maxWorkers=2 --verbose", "test:verbose": "jest --forceExit --maxWorkers=3 --verbose",
"build": "node build.js", "build": "node build.js",
"lint": "eslint . && prettier --check .", "lint": "eslint . && prettier --check .",
"fmt": "prettier --write .", "fmt": "prettier --write .",
+7 -7
View File
@@ -1,16 +1,16 @@
#!/bin/sh #!/bin/sh
# script/test: run the test suite. # script/test: run the test suite.
# #
# jest runs two worker processes (package.json), not one per CPU core: on a # jest runs three worker processes (package.json), not one per CPU core: on a
# many-core shared host one per core took gigabytes of RAM per run. # many-core shared host one per core took gigabytes of RAM per run.
# #
# The timeout bounds a hung suite; it is not a performance budget. On the busy # The timeout bounds a hung suite; it is not a performance budget. On the busy
# shared build host the suite takes about 28s with two workers and # shared build host the suite takes 23-29s with three workers, so
# REPO_POLICIES' 30s cap is the bound. Inside the image the same suite also # REPO_POLICIES' 30s cap is tight there, not comfortable. Inside the image the
# pays a cold jest cache and shares the runner with the rest of the build, # same suite also pays a cold jest cache and shares the runner with the rest of
# which is not what that budget describes, so the Dockerfile raises the bound # the build, which is not what that budget describes, so the Dockerfile raises
# through AUTISTMASK_TEST_TIMEOUT. A cap a healthy suite can trip on a cold # the bound through AUTISTMASK_TEST_TIMEOUT. A cap a healthy suite can trip on a
# cache produces a red that means nothing, and teaches "just run it again". # cold cache produces a red that means nothing, and teaches "just run it again".
set -eu set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"