You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server tests fail as root and under full-suite load #43
From the review of #41. The server suite (npm test -w server, 369 tests) was run in node:22 on Linux. Three failures show up that depend on how the suite is run, not on the code under test.
Fails when run as root
server/test/message-versions.test.mjs fakes a failing disk by making a directory read-only and expecting EACCES:
Both pass as a normal user. Containers and CI runners often run as root, so these should be skipped when process.getuid?.() === 0, or fail the write some way that doesn't depend on permissions.
Timing threshold too tight under load
server/test/model-levels.test.mjs:29, "a chat's levels do not wait for pi's catalogue to be built", asserts:
assert.ok(Date.now()-started<1000, `answered after ${...}ms`);
It reported answered after 1226ms during a full parallel run. Run on its own it passed 5 out of 5. The 1000 ms bound needs more room, or the check should measure something other than wall-clock time.
Related: macOS
Separate from Linux, three tests fail on macOS and the suite then hangs until killed. The causes are /var being a symlink to /private/var (paths compared unresolved) and macOS's shorter socket-path limit (104 characters against Linux's 108). Not urgent since the portal ships on Linux, but worth knowing for anyone running the tests on a Mac.
The as-root part is done: since #245 the full server suite passes as root on Node 22, on a 2-vCPU machine at --test-concurrency=3 like CI. model-levels uses a clock of its own instead of 1000 ms of wall-clock time. The auth and loaded-from-folders files are split so that none comes near the 120 s per-file limit under load. Still open: the macOS part (the /var symlink and the shorter socket-path limit).
What's left is macOS, which I'm keeping here. On main, a macOS run of the server suite now finishes (1553 tests, about two minutes) rather than hanging. These still fail there:
Paths are compared without resolving /var -> /private/var: file-safety, extension-host and two browser-guard tests. All four pass with TMPDIR set to the resolved path.
The socket limit: holdDataDir checks against Linux's 108 bytes and falls back to an abstract socket, which macOS doesn't have. second-instance "too long for a socket" and session-images-route fail with listen EINVAL. The second one's socket path is 110 bytes after realpath.
db-upgrade "an upgrade whose page cannot have its port still upgrades" has a different cause. The test holds the port on 127.0.0.1 and the upgrade page listens on 0.0.0.0, which macOS allows, so no error comes. It is tracked here because chore(release): 0.2.0 #303 put it here.
Activity
Merge pull request thecodacus#43 from Piggidragon/fix/reasoning-scroll
Piggidragon commentedon Oct 18, 2026
The as-root part is done: since #245 the full server suite passes as root on Node 22, on a 2-vCPU machine at
--test-concurrency=3like CI.model-levelsuses a clock of its own instead of 1000 ms of wall-clock time. Theauthandloaded-from-foldersfiles are split so that none comes near the 120 s per-file limit under load. Still open: the macOS part (the/varsymlink and the shorter socket-path limit).thecodacus commentedon Oct 23, 2026
Status for 0.2.0: the as-root and under-load parts are done.
What's left is macOS, which I'm keeping here. On main, a macOS run of the server suite now finishes (1553 tests, about two minutes) rather than hanging. These still fail there:
holdDataDirchecks against Linux's 108 bytes and falls back to an abstract socket, which macOS doesn't have. second-instance "too long for a socket" and session-images-route fail withlisten EINVAL. The second one's socket path is 110 bytes after realpath.