Commit Graph
26 Commits
Author SHA1 Message Date
Lauri Ojansivu e1d6ad77c0 build.sh, build.bat: Tests -> Playwright single spec.
Runs one Playwright spec, found by its file name or a part of it, on the
browsers chosen, optionally only the tests whose title matches. Also
./build.sh --playwright-spec <spec> [chromium|firefox|webkit|all] [filter].

A WeKan already answering on :3000 is used as it is. Otherwise a fresh
bundle is built and the test server started the way the whole-suite runs
start it (Meteor's mongod on :3001, the bundle on :3000), and both are
stopped afterwards, so a single spec does not pass or fail on a stale
bundle. In build.sh each browser runs natively when it can launch and in
the Playwright container when it cannot; Chromium in the VSCodium Flatpak
on arm64 runs natively without Docker. Logs go to
.tools/log/test-playwright-spec/<datetime>/.

Thanks to xet7 !
2026-11-19 22:41:33 +02:00
Lauri Ojansivu b35184d487 VSCodium sandbox: allow the host's Docker through flatpak-spawn --host.
vscodium-sandbox.sh now grants --talk-name=org.freedesktop.Flatpak, so
build.sh's docker_exec can run Playwright Firefox and WebKit in the
official Playwright image when they cannot start inside the sandbox.
WEKAN_SANDBOX_HOST_DOCKER=0 leaves the grant out. The README says what it
costs: flatpak-spawn --host is a host escape and the Docker socket is
root-equivalent. The script gets a bash shebang, as it now uses an array.

Thanks to xet7 !
2026-11-16 20:10:25 +02:00
Lauri Ojansivu 0566bf6ec8 Build the Docker image and the Bun build with Meteor 3.6.1.
The Dockerfile's METEOR_RELEASE is METEOR@3.6.1. The Bun build's
releases/bun/prepare-meteor.sh refused every release but 3.6; the 3.6
port (meteor-3.6.patch) applies unchanged to 3.6.1, checked with
git apply --check against 3.6.1's commit eaf13497, so 3.6.1 is accepted
pinned to that commit. The sandbox README names the current release.

Thanks to xet7 !
2026-11-14 18:26:04 +02:00
Lauri Ojansivu 21c94ce098 Fix macOS Sandbox for VSCodium.
Thanks to xet7 !
2026-11-02 10:14:47 +02:00
Lauri Ojansivu c58b2896d1 Fix macOS Sandbox for VSCodium.
Thanks to xet7 !
2026-11-02 09:43:32 +02:00
Lauri Ojansivu 6ac70c4cdd Windows sandbox: VSCodium in Windows Sandbox, seeing only Downloads\repos\wekan.
The Windows counterpart of the Linux Flatpak sandbox and the macOS
sandbox-exec one. Windows Sandbox is a disposable Hyper-V virtual machine
that comes with Windows 10 and 11 Pro, Enterprise and Education; it sees
nothing of the host but the folders mapped into it.

- docs/Security/Sandboxes/Windows/sandbox.ps1 (on the host; sandbox.bat
  starts it) offers to turn the Windows Sandbox feature on, copies
  user.name and user.email into the checkout's .git\config, and writes
  .tools\sandbox\wekan-vscodium.wsb: the checkout as the only mapped
  folder, read-write at the same path under the sandbox's user; network
  on; microphone, camera and printers off; ProtectedClient; half of the
  host's memory, 4 to 16 GiB.
- sandbox-logon.ps1 runs inside at logon: TEMP, TMP and TMPDIR in
  .tools\tmp, git's configuration in .tools\home, PortableGit and the
  VSCodium zip downloaded once into .tools - each verified (VSCodium's
  .sha256, the SHA-256 in Git for Windows' release notes) before it is
  unpacked - and VSCodium opened on the checkout, its settings and
  extensions in .tools\vscodium.
- README.md is the design: what is refused and allowed, how, and the
  trade-offs.

Not run on Windows yet: written and reviewed on macOS, where PowerShell is
not available. tests/windowsSandbox.test.cjs reads the scripts and pins
the single mapping, the .tools locations, verification before unpacking,
and that native commands cannot stop Windows PowerShell 5.1.

Thanks to xet7 !
2026-10-28 00:03:42 +02:00
Lauri Ojansivu 42ed50413f macOS sandbox: VSCodium under sandbox-exec, reaching only ~/Documents/repos/wekan.
The macOS counterpart of the Linux Flatpak sandbox
(docs/Security/Sandboxes/vscodium). docs/Security/Sandboxes/macOS/sandbox.sh
installs VSCodium with Homebrew when it is missing, writes a Seatbelt
profile for this checkout's path to .tools/sandbox/vscodium-macos.sb, a
Finder launcher beside it, and starts VSCodium under sandbox-exec:

- every file under /Users and /Volumes is refused - the home directory,
  ~/.ssh, ~/.gitconfig, other users and /Users/Shared, other disks - except
  the checkout, and the login session's ssh-agent socket is refused;
- HOME is .tools/home, TMPDIR .tools/tmp, VSCodium's settings and
  extensions are in .tools/vscodium, and env -i drops SSH_AUTH_SOCK and an
  editor's ELECTRON_RUN_AS_NODE;
- --no-sandbox, because Chromium's own helper sandbox cannot start inside
  sandbox-exec ("Operation not permitted"); every helper is inside this
  one instead;
- user.name and user.email are copied into the checkout's .git/config,
  since ~/.gitconfig cannot be read inside.

Verified on macOS 27 with --check (home, ~/.ssh, ~/.gitconfig and
/Users/Shared refused; the checkout, git and the network allowed) and by
starting VSCodium in it: the window, its helpers and the extension host
ran. README.md is the design: what is protected, how, and the trade-offs.
tests/macosSandbox.test.cjs pins the rules and, on macOS, runs a profile
against a shell.

Thanks to xet7 !
2026-10-28 00:00:20 +02:00
Lauri Ojansivu c65bf12f05 Updated vscodium sandbox 2026-10-11 03:05:28 +03:00
Lauri Ojansivu 9941680fae Isolate Firefox application data for macOS browser tests
Use Gecko app-data overrides for macOS Firefox in the build-menu probe, Playwright probe and real test projects. Keep isolated directories under .tools/tmp and clean them on process exit without changing HOME or browser sandboxes. Three helper regression tests and six Docker/config checks pass. All three focused security browser scenarios pass in Firefox on macOS 27.0.1.

Thanks to xet7 !
2026-10-03 19:11:41 +03:00
Lauri Ojansivu 9b213cdf48 Update WeKan runtime and build guidance to Node.js 26 2026-09-22 01:01:14 +03:00
Lauri Ojansivu f6680510ef Updated Flatpak sandbox settings. 2026-09-02 21:21:40 +03:00
Lauri Ojansivu 02776d20b3 Add an Ubuntu Asahi KVM test environment
Group the Fedora lifecycle guide and helpers under AsahiFedora and add matching Ubuntu ARM64 scripts using apt, AppArmor-compatible libvirt storage, KVM, UEFI and isolated NAT.

Thanks to xet7 !
2026-09-02 21:17:05 +03:00
Lauri Ojansivu c379584ec3 Document isolated KVM testing on Fedora Asahi
Add an ARM64 system-libvirt installer and safe start and graceful-stop helpers for a dedicated WeKan test VM. Keep host files, credentials, Docker, devices and clipboard integration outside the guest boundary.

Thanks to xet7 !
2026-09-02 21:14:31 +03:00
Lauri Ojansivu 4bf68e8c3d Sandbox: vscode to vscodium.
Thanks to xet7 !
2026-08-25 01:50:49 +03:00
Lauri Ojansivu a04d5c8127 Update vscodium Flatpak sandbox icon name.
Thanks to xet7 !
2026-08-22 23:50:26 +03:00
Lauri Ojansivu 1a098b5f48 Change vscode to vscodium.
Thanks to xet7 !
2026-08-22 23:50:26 +03:00
Lauri Ojansivu 9eedab13b6 Run every node suite and report all of them, instead of stopping at the first.
test:unit:node was `node tests/a.cjs && node tests/b.cjs && ...`, 260 suites
long. npm's && stops at the FIRST failing suite, so everything after it never
ran - and the summary said nothing about that. Tonight's run printed
"tests:508 fail:1" having skipped about 200 suites: the 01:21 run died at
recoveryReportWiring, which hid sandstormMigrationBridge, which hid whatever is
behind that. One stale guard per full test run, found one at a time.

tests/run-node-suites.cjs replaces the chain:

  * it DISCOVERS the suites (tests/*.test.cjs|js and tests/unit/*), so writing
    the file is registering it - the 72-suites-in-no-npm-script drift cannot
    come back, and neither can a hand-maintained 260-entry line;
  * every suite runs even when an earlier one failed, and the failures are
    listed together at the end, so one run tells you everything that is broken;
  * each suite still runs in its OWN node process, so a suite that throws,
    exits or leaves a handle open cannot affect the next one;
  * a per-suite timeout (5 min, WEKAN_SUITE_TIMEOUT_MS) means a hanging suite
    fails that suite instead of hanging the run;
  * output streams live and unchanged, so the "  ok - " progress counter still
    moves; `--list`, `--bail` and substring filters are there for working on one.

Discovery was compared against the old chain before switching: the same 260
suites, nothing gained and nothing lost.

build.sh reads the runner's own "===== node suites: N run, M failed" line for
the failure count now - exact, instead of guessing from error text - and falls
back to counting the failing suites it has already listed while the run is still
going. The note about the && chain is gone with the chain.

testsAreRegistered now guards the runner rather than a list: every suite on disk
is discovered, the only exclusion is the mocha entry point, every exclusion
carries a reason, and the loop does not stop on failure unless --bail was asked
for.

Thanks to xet7 !
2026-07-28 03:49:45 +03:00
Lauri Ojansivu 18175abef5 Docs: 'Fix open issues' process, sandbox build+test, #6500 startup note.
CLAUDE.md gains the 'Fix open issues' process (research newest maintained dependencies via Meteor 3 docs/issues/forums, atmosphere/packosphere/npm, add tests+negative+UI tests, commit format). docs/Security/Sandboxes/vscode/README.md documents a version-matched from-scratch toolchain in .tools/ (Node v24.18.0, npm, Meteor 3.5, newest Go for FerretDB) to build the WeKan bundle + FerretDB and run all tests, and notes Docker/podman is unavailable in the Flatpak sandbox. server/00waitForMongo.js keeps the Meteor.startup wait but documents the #6500 finding: accounts-base creates the users index before app hooks, so a top-level await here deadlocks — the reliable fix is the docker-compose healthcheck.

Thanks to xet7.
2026-07-22 09:21:21 +03:00
Lauri Ojansivu 4533268418 Update vscode sandbox.
Thanks to xet7 !
2026-07-05 12:12:24 +03:00
Lauri Ojansivu a37190e0fc Add more tests. Fix tests.
Thanks to xet7 !
2026-05-27 20:51:44 +03:00
Lauri Ojansivu 24577ad2a9 Fix tests. Added Filter test. Part 4.
Thanks to xet7 !
2026-05-21 15:46:32 +03:00
Lauri Ojansivu 1b1b04d083 Fix tests.
Thanks to xet7 !
2026-05-21 09:24:05 +03:00
Lauri Ojansivu f6d8befb56 Moved website to separate repo. Moved docs2 back to docs.
Thanks to xet7 !
2026-04-28 11:59:16 +03:00
Lauri Ojansivu 1c0d8e9964 Moved docs to docs2, and wekan.fi to docs, to be able publish with GitHub Pages.
Thanks to xet7 !
2026-04-16 14:36:10 +03:00
Lauri Ojansivu dace6b78c0 Fix typos 2026-02-15 18:29:38 +02:00
Lauri Ojansivu cc8b771eb4 Secure Sandbox for VSCode at Debian 13 amd64. Part 2.
Thanks to xet7 !
2026-01-22 02:18:25 +02:00