Commit Graph
121 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 11bed26788 Companion repositories are found in .tools/w, .tools/xet7 and .tools/Secretchronicles.
The repositories under .tools/ are now grouped by their GitHub owner:
github.com/wekan/* in .tools/w/, github.com/xet7/* in .tools/xet7/ and
github.com/Secretchronicles/* in .tools/Secretchronicles/. build.sh,
build.bat, the release and debug scripts, the tests and the docs looked
for .tools/FerretDB, .tools/wekan.fi, .tools/charts, .tools/node-patches,
.tools/mongo-tools-patches and .tools/TSC, and now use the new places.

ensure_tool_repo takes the owner from the clone URL through a new
tool_repo_dir, so a missing companion repository is cloned into the same
place the scripts read it from. tests/toolsDirectoryRepos.test.cjs runs the
mapping and checks that nothing lands flat in .tools/ any more.

Finding the website checkout again let securityRegressionCoverage compare
the Hall of Fame, which it had been skipping: CreateBleed is published and
is now in the inventory with its unit and UI tests. The exceljs fork test
reads npm-packages/exceljs, the copy WeKan builds with, instead of a clone
under .tools that is not part of the build.

Thanks to xet7 !
2026-11-07 23:32:43 +02:00
Lauri Ojansivu db52764592 Docker Playwright browsers open WeKan at ROOT_URL, so uploads work in tests.
build.sh starts the test server with ROOT_URL=http://localhost:3000 but sent
the Docker Playwright browsers and the Node E2E container to
http://127.0.0.1:3000. Meteor-Files sends every upload to ROOT_URL +
/cdn/storage/<collection>/__upload and answers no CORS preflight for another
origin, so the browser blocked it ("Access to fetch at
'http://localhost:3000/cdn/storage/attachments/__upload' from origin
'http://127.0.0.1:3000' has been blocked by CORS policy") and the four drawing
specs whose Save uploads an attachment timed out in the full Chromium run.
The default is now http://localhost:3000, like playwright.config.js and the
macOS path; with it the eight drawing tests pass in the same container.
tests/playwrightBaseUrlMatchesRootUrl.test.cjs checks that every browser
default in build.sh and the Playwright config is the test server's ROOT_URL
origin, and fails on the old default.

Thanks to xet7 !
2026-11-06 20:56:02 +02:00
Lauri Ojansivu c61a1b7f41 build.sh and releases/*.sh work on Arch Linux and Omarchy.
Omarchy (https://omarchy.org) is Arch with Hyprland: pacman, the Arch
repositories and yay for the AUR. The shared detector in
releases/ensure-tools.sh now names Omarchy and the other Arch derivatives
(EndeavourOS, CachyOS, Manjaro) explicitly, and what the scripts did there
is fixed:

- No more `pacman -Sy <package>`: that is a partial upgrade, which Arch does
  not support. _et_pacman installs with `-S --needed`, does a full `-Syu`
  only when pacman has never synced (a fresh archlinux container) or when
  WEKAN_PACMAN_SYU=1 asks for it, and otherwise says to update first, naming
  omarchy-update on Omarchy.
- 7zip instead of p7zip, which Arch has replaced.
- snapcraft: snapd from the AUR with yay or paru (never as root), then
  snapd.socket, /snap and the snapcraft snap, instead of only an error.
- The SSH server menu entries use sshd.service outside Debian/Ubuntu, where
  the unit is not called ssh.
- Playwright: `install --with-deps` runs apt-get, so outside Debian/Ubuntu
  the browser libraries come from pacman (or dnf) and the browsers are
  installed without --with-deps. WebKit, which Playwright builds for
  Debian/Ubuntu only, runs in the Playwright Docker image on Arch when
  Docker is there.
- The en_US.UTF-8 locale note gives the Arch/Omarchy steps too.

tests/archOmarchyScripts.test.cjs drives the helpers offline with stubbed
sudo/pacman/yay, and its negative test fails if any tracked shell script
does a `pacman -Sy` partial upgrade or installs p7zip.

Thanks to xet7 !
2026-11-06 01:57:00 +02:00
Lauri Ojansivu d9e48a909d Tests: the list-sync specs' mock servers are reachable from WeKan when the browsers run in Docker on macOS.
The list-sync specs answer as Jira or GitLab from a server in the test
process, and WeKan's server fetches from it. With the browsers in Docker
on macOS that server was on the container's loopback, which Docker
Desktop keeps from the host: "fetch failed", and every test of
list-sync-estimate, -planning, -source and -time-estimates failed in
EVERYTHING's Firefox stage.

build.sh already forwarded the test SMTP port from the host into the
container through docker exec; the same forwarder carries any TCP. On
macOS it now also forwards a small pool, 39101-39104 by default
(WEKAN_TEST_REVERSE_PORTS), and names it to the specs, which listen
through helpers/reachable-server.cjs: the first free port of the pool,
or any port when there is none, as before. Linux forwards nothing.

30 of 30 of those specs pass in Firefox in Docker now.
playwrightReachableServer.test.cjs: the pool is read strictly, a port in
use is skipped, no pool listens anywhere, and when every forwarded port
is taken it fails clearly instead of listening where WeKan cannot reach.
playwrightDockerHost.test.cjs: macOS forwards the SMTP port and the pool
(or the one configured), names it to the container and removes its ready
files; Linux forwards nothing.

Thanks to xet7 !
2026-11-01 07:50:40 +02:00
Lauri Ojansivu 8a1f7a14a9 Tests: the Playwright container sees the repo and the files root at their own host paths.
A spec and the server share files by path. admin-continuous-backup gives
the server a key file it wrote under .tools/tmp, and reads the stream.json
the server wrote to its target - and with the repository mounted at /repo
and the files root at /wekan-files, every such path named a file only one
side had: "The encryption key file cannot be read", and no stream.json, in
both of its tests in EVERYTHING's Firefox stage (the only browser there that
runs in Docker on this Mac, and on Linux arm64 every browser does).

Both are mounted at the path they have on the host now, the specs are told
that path in WEKAN_FILES_PATH, and the in-container script finds the proxy
and the Playwright binaries from its working directory. Both tests pass in
the container now.

playwrightDockerHost.test.cjs drives run_playwright_docker on macOS and
Linux: the repo and the files root are mounted at their own paths,
WEKAN_FILES_PATH and HOME follow, and the function names no container-only
path. It fails on the code before.

Thanks to xet7 !
2026-11-01 06:08:05 +02:00
Lauri Ojansivu 7f948bf438 Tests: the macOS Playwright container uses Docker's bridge network, not the host network.
Three Firefox tests of one EVERYTHING run waited the full 60 s in
waitForMeteor: their page's own document never arrived. Measured from
containers during that run, on Docker Desktop for macOS:

- host network, through the WeKan proxy:          3 of 600 requests lost
- host network, straight to host.docker.internal: 8 of 600 connects never
  completed
- bridge network, through the same proxy:          0 of 1000
- from the Mac itself:                             0 of 300

So it is Docker Desktop's host network, not WeKan and not the proxy. On
macOS nothing needs that network - WeKan and MongoDB are reached through
host.docker.internal and SMTP through docker exec - so the container runs
on the bridge network, where the proxy still serves localhost:3000 and the
browser keeps ROOT_URL's origin. Linux keeps the host network, which is
the real one there.

playwrightDockerHost.test.cjs drives run_playwright_docker with uname
stubbed: Darwin gets bridge and the proxy, Linux gets host and none, and
the function names no network of its own. It fails on the code before.

Thanks to xet7 !
2026-11-01 06:06:04 +02:00
Lauri Ojansivu 16103f9ad2 Tests: the whole-suite run keeps its test database in .tools/, not beside the checkout.
build.sh and build.bat started the test mongod on :3001 with its dbpath
in the checkout's parent directory (../mongodb-test-3001). That is the
one thing in a test run that was written outside the repository, against
the rule that everything WeKan's scripts write stays in .tools/ - and a
sandboxed editor, which may write only the repository, could not create
it, so EVERYTHING's browser stages had no database to run against. It is
.tools/mongodb-test-<port> now, which git and Meteor already ignore.

toolsDirOnly.test.cjs pins the new path in both scripts and fails on a
test database beside the checkout.

Thanks to xet7 !
2026-11-01 02:51:41 +02:00
Lauri Ojansivu 5a13e927bc Builds trace module resolution only with WEKAN_BUILD_TRACE_MODULES=1.
Turning the NODE_DEBUG=module trace off for EVERYTHING alone was not
enough: a dev build from the build.sh menu wrote 1.1 GB, three million
lines, in its first three minutes, before it was interrupted. The trace
is now opt-in in build.sh and build.bat alike, and the diagnostics line
says whether it is on and how to turn it on. The other build diagnostics
(resolver commands, npm verbose, METEOR_PROFILE) are unchanged.

Thanks to xet7 !
2026-10-31 13:01:57 +02:00
Lauri Ojansivu 6551062492 EVERYTHING builds without the per-require module trace.
The build's NODE_DEBUG=module trace wrote over 12 GB in the first half
hour of an EVERYTHING run on macOS - twice, through tee - and slowed the
build it traced, so the run would fill the disk before reaching the tests.
A build from the menu still traces by default; WEKAN_BUILD_TRACE_MODULES=0
turns it off, and EVERYTHING sets that unless the caller asked for 1. The
other build diagnostics (resolver commands, npm verbose, METEOR_PROFILE)
are unchanged.

Thanks to xet7 !
2026-10-31 04:15:01 +02:00
Lauri Ojansivu f1c0db247a CHANGELOG.md is the short changelog, written from CHANGELOG-big.md.
CHANGELOG-big.md is the changelog as it was: # Status, # Upcoming and every
release in full, with its <details> entries. Everything that writes or edits
the changelog uses it - release-all.sh, release-notes.sh and the release
workflow, the commit-link repair in build.sh and fix-changelog-hashes.sh,
the archive, the wrapper, the version scripts - and the release notes'
"More details at ChangeLog" link goes to its section. remote-release.py,
shared with FerretDB and the patch repositories, takes the file from its
config, and only WeKan's names CHANGELOG-big.md.

CHANGELOG.md is new: no Status and no Upcoming, only the In short paragraph
of each of the five newest releases and a link to its full section, in plain
Markdown - no <details>, <summary>, </summary> or </details>, and HTML links
written as Markdown links. releases/changelog-short.mjs writes it;
release-all.sh runs it right after naming the release, so it is in the
release commit, and changelog.sh does too. The Sandstorm App Market keeps
embedding CHANGELOG.md, now the short one.

old-CHANGELOG/'s headers say they moved out of CHANGELOG-big.md. References
to Upcoming or TODO Later in code comments and docs name CHANGELOG-big.md.
CLAUDE.md and AGENTS.md describe both files: CHANGELOG-big.md is written,
CHANGELOG.md is generated and never edited by hand.

tests/changelogShort.test.cjs: CHANGELOG.md is exactly what the generator
writes, the five newest releases with their whole In short, links that
resolve, and none of the four tags or an HTML link; the changelog tests
read CHANGELOG-big.md.

Thanks to xet7 !
2026-10-30 03:29:48 +02:00
Lauri Ojansivu aeff4900df Every file the scripts write stays in .tools/: temporary files, downloads, Meteor, Node.js, npm.
build.sh and the releases/ scripts wrote all over the machine: temporary
files to /tmp and macOS's /var/folders, downloads and release zips to
~/Downloads or ~/Lataukset, Meteor to ~/.meteor, Node.js to /usr/local
(sudo n) or ~/.nvm, the npm cache to ~/.npm, Volta to ~/.volta, the
Sandstorm toolchain to ~/projects, and PATH lines into ~/.zshrc and
~/.bashrc. A sandboxed editor (Flatpak on Linux, sandbox-exec on macOS)
can reach only the checkout, and a container's own /tmp is a few hundred
megabytes. Everything is in .tools/ now, which git and Meteor ignore:

- releases/tools-env.sh, sourced by build.sh and every script that writes
  files, sets TMPDIR/TMP/TEMP to .tools/tmp (also downloads and release
  zips), NVM_DIR, npm_config_cache, VOLTA_HOME and the meteor-spk
  directory to .tools/, METEOR_WAREHOUSE_DIR to .tools/.meteor once Meteor
  is installed there, and puts those tools first on PATH, so no shell rc
  file is edited. HOME is not moved: git needs ~/.gitconfig and ~/.ssh.
  A TMPDIR already inside a .tools/ is kept, so a test's own directory
  there stays its own; without a writable one it stops rather than fall
  back to /tmp. It never fails a caller running set -euo pipefail.
- macOS's mktemp ignores TMPDIR when given no template, so every mktemp
  names one: mktemp "$TMPDIR/name.XXXXXX". Fixed /tmp files are in
  $TMPDIR.
- build.sh installs Node.js on Linux into .tools/n (N_PREFIX, no sudo),
  nvm on macOS into .tools/nvm (PROFILE=/dev/null: no rc file edited), and
  Meteor with HOME=.tools for the installer only, into .tools/.meteor.
  build.sh is replaced, not edited in place, while it may be running.
- Containers get this checkout's .tools/tmp as their /tmp: every
  db-conformance database (MariaDB's temporary tables were verified to land
  there, and MongoDB's socket) and the repack container, which empty it
  themselves before they are removed. install-node-for-arch.sh requires
  the mounted TMPDIR.
- tests/run-node-suites.cjs gives every suite TMPDIR in .tools/tmp, and the
  tests that copied a script into a fixture copy tools-env.sh too; tests
  that pinned ~/.meteor, the rc file edits, sudo n or /tmp/manifest.json
  pin the .tools/ places now and say why.

tests/toolsDirOnly.test.cjs runs tools-env.sh against a TMPDIR already
set elsewhere and under set -euo pipefail, and fails on any script that
makes a temporary file without naming .tools/tmp, writes to the home
directory, or edits a shell rc file, or on a container whose /tmp is its
own.

Thanks to xet7 !
2026-10-27 23:49:55 +02:00
Lauri Ojansivu 70485c38df A database speed test: the common WeKan queries on every database, twice a production WeKan of data.
docs/Databases/FerretDB/1/SpeedTest/speedtest.sh (build.sh and build.bat ->
Tests -> Database speed test) is releases/db-conformance.sh with
WEKAN_DB_SUITE=speedtest: the same FerretDB built from source and the same
databases started the same way - SQLite, PostgreSQL, MySQL and MariaDB through
FerretDB v1, MongoDB 6, 7, 8 and 9, and now FerretDB 2 with PostgreSQL and
DocumentDB.

data.cjs generates, deterministically, twice the users, boards, lists,
swimlanes and cards of a production instance (615,070 cards), skewed the way
real ones are; indexes.cjs creates the indexes WeKan creates, read from its
ensureIndex calls; queries.cjs asks 18 common WeKan queries as WeKan's own code
builds them; report.cjs writes Results.md - a row per database, fastest at the
top, a column per query - and fails when a database answered or stored
anything differently from MongoDB. README.md describes it, what it found, what
was improved and what could still be.

db-conformance.sh: WEKAN_DB_BACKENDS runs only the named databases (to repeat
one into an earlier run's WEKAN_LOGDIR), containers are removed with their
volumes, SQLite's data is under .tools/tmp, and FerretDB 2 is a backend of the
speed test, and of the conformance run with WEKAN_CONFORMANCE_FERRETDB2=1. The
conformance catalogue gains a case of writes by string _id and _ids differing
only by case, which found that FerretDB on MariaDB 12.3 lost them.

tests/dbSpeedTest.test.cjs checks the data, the index list, the queries, the
report's order and that a difference fails it, the wiring and the Due Cards
board scope.

Thanks to xet7 !
2026-10-24 18:18:15 +03:00
Lauri Ojansivu 46e30f01e4 Import: Planka, Microsoft To Do, KanbanFlow, Basecamp, Google Tasks and Google Keep from their APIs.
Decided on 2026-10-14. On the import page each of the six asks for what
its service needs - a self-hosted Planka its address, username and
password; the others an access token (Basecamp also its account id) -
lists what that account can import, and fetches the chosen board, list
or project. The credentials go with each call and are used for that
call's requests only; they are never stored or logged, and the page
clears secret fields once a fetch has used them. The fetched JSON fills
the import text box and the import goes on as for a pasted export: the
service's parser (models/lib/<key>ApiFormat.js) into the generalized
importer, with the members step and the loss report. The same JSON can
be pasted, or posted to POST /api/boards/import/<key>.

- server/apiImport.js: apiImportList and apiImportFetch, signed in only,
  off with the Admin Panel's import switch, not in Sandstorm, rate
  limited; credentials checked against the service's own fields
  (models/lib/apiImportServices.js).
- server/lib/apiImportRequest.js: every request through the SSRF guard -
  pinned address, no redirects, bounded in time and size - so a Planka
  address cannot point the server at its own network; an administrator
  can allow such a host with API_IMPORT_ALLOWED_PRIVATE_HOSTS. An error
  names only the origin and the status.
- models/lib/apiImport/<key>.js: each service's client, plain Node with
  the request injected, paging bounded and the token only in a header.
- Each has a docs page under docs/Features/ImportExport/, listed in the
  coverage index and External-Tools.md.

Tests: tests/<key>ApiImport.test.cjs (client with a fake request, every
parsed field, wrong shapes), tests/apiImport.test.cjs (credentials, the
gate, the wiring, the shapes refused), api-import.e2e.js (the form for
every service, fetched JSON imported through the page, refusals incl. a
private address). Live tests, read only, run from build.sh / build.bat ->
Tests -> Live tests with your own accounts (releases/live-tests/README.md);
they were not run here. New strings translated in all locales.

Also: the release risk baseline allows the services' API addresses, and
the guards that count import creators, list the import sources and pin
the platform fetch() calls know the new ones.

Thanks to xet7 !
2026-10-14 22:57:15 +03:00
Lauri Ojansivu d6c1d6fce1 List Sync: write WeKan's changes back to GitLab.
#2698. A list synced from GitLab gets a Sync option of its own, off by
default: Write changes back to GitLab. With it, every Sync run first
sends what members did on the list's cards, then reads GitLab, so the
read finds both sides agreeing:

- a title or description edited in WeKan, when the issue still has the
  text both sides last agreed on - the local-only edit the reconcile
  already keeps. The Source footer Sync adds is not sent; when both sides
  changed, nothing is written and it stays a conflict to resolve;
- a card archived in WeKan closes its open issue, and restoring a card
  WeKan closed reopens it (syncClosedByWeKan); an issue GitLab closed is
  never reopened by WeKan;
- a comment written in WeKan becomes a note, and keeps the note's id
  (syncCommentId) so the comments sync does not bring it back twice.

Only what happens after it was switched on is sent (writeBackSince), at
most 100 writes a run. Every write is fenced by the list's Sync
reservation, goes through the same address checks as the reads (no
redirects, PUT or POST to an issue or its notes only), and records on
the WeKan side only while the card or comment is still as planned. A
refused write is shown in the Sync popup (syncWriteBackError, beside
syncSource because the run's list writes match syncSource whole) and the
read sync still runs. Not in Sandstorm, whose bridge only reads.

Tests: tests/listSyncWriteBack.test.cjs (the plan with GitLab's shapes,
the parser's footer, every negative - conflict, legacy card, old
archive or comment, foreign card, issue GitLab closed - and the wiring),
server/lib/tests/listSyncWriteBack.tests.js (end to end through
syncOneList against a fake GitLab). The live test,
releases/live-tests/gitlab-write-back.mjs, runs from build.sh / build.bat
-> Tests -> Live tests with the glab login releases/mirror.sh uses, on one
scratch issue in a private project of that account; it is human-run and
was not run here. releases/live-tests/run.mjs runs every live test and
skips a service with no login.

Also: the English variants get the SQRL and Windows sign-in strings
(their key order follows en.i18n.json); buildScriptParity accounts for
the scripts CI runs inside their own environments; new strings
translated in all locales.

Thanks to xet7 !
2026-10-14 22:08:34 +03:00
Lauri Ojansivu 91bfd08097 Test real Nextcloud deployments and preserve signed SockJS identities
Keep verified gateway identities bound to their actual upgrade sockets before SockJS filters custom headers. Add repository-local Nextcloud 32-35 acceptance runs for authentication, isolation, uploads, lifecycle, source-built upgrades, restored volumes and mutual-TLS FRP. Harden release archive checks and exercise signing and workflow failures.

Thanks to xet7.
2026-10-11 22:46:45 +03:00
Lauri Ojansivu 0dbf9d8502 Install Meteor with npx meteor, as the Meteor documentation says.
https://docs.meteor.com/about/install.html installs Meteor on Linux, macOS
and Windows alike with `npx meteor`, as the user and never with sudo; the
global npm install is only its fallback. npx runs the meteor package's bin,
which installs into ~/.meteor (%LOCALAPPDATA%\.meteor on Windows) and puts
it on PATH, so npm 12's refusal to run install scripts does not apply, and
the documented npm fallback flags that npm 12 rejects are not needed.

build.sh's Linux branch and build.bat now run npx -y meteor unless Meteor
is installed already, as the macOS branch did. build.sh removes the global
installer package an earlier setup left, and gives ~/.npm back to the user
if an old sudo npm made it root's. releases/rebuild-release.sh does the
same instead of sudo npm on Linux and brew install meteor on macOS.

Checked with npm 12.2.0: npx -y meteor installed Meteor 3.5.2 into a
scratch HOME and added it to .bashrc and .bash_profile.

Thanks to xet7 !
2026-10-11 03:17:01 +03:00
Lauri Ojansivu 9c3692f832 Let npm 12 run the Meteor installer's install script.
npm 12 runs no package's install script unless allow-scripts names it, and
only warns when it blocks one. The meteor npm package is just an installer:
its install script is what downloads Meteor, so Setup -> Install dependencies
finished with no Meteor. build.sh, build.bat and releases/rebuild-release.sh
now pass --allow-scripts=meteor, which npm 12.2.0 matches against the
registry URL's package name, so it allows that one script and nothing else.
Checked with npm 12.2.0 on a registry package: blocked without the flag, run
with it. npx -y meteor (macOS) runs the installer as the package's bin and
needs no change.

tests/npmNoUnsafePerm.test.cjs becomes tests/npmMeteorInstall.test.cjs and
also fails on a global npm install of meteor without --allow-scripts=meteor.

Thanks to xet7 !
2026-10-11 03:12:41 +03:00
Lauri Ojansivu 3c755c1855 Install Meteor with --foreground-scripts, the full flag name npm 12 requires.
5c9334b76c passed --foreground-script, as Meteor's install documentation
spells it. npm 11 read that as an abbreviation; npm 12.2.0, which build.sh
installs from the Dockerfile's NPM_VERSION before installing Meteor, stops
with 'Invalid abbreviated flag'. Checked against npm 12.2.0: it accepts
--foreground-scripts and refuses both --foreground-script and --unsafe-perm.
The test now also fails on the abbreviated flag, in the scripts and in the
.agents notes it was copied from.

Thanks to xet7 !
2026-10-11 03:07:38 +03:00
Lauri Ojansivu 5c9334b76c Install Meteor with --foreground-script, which npm 11 accepts.
Setup -> Install dependencies stopped with EUNKNOWNCONFIG right after n
installed the pinned Node and npm 11: npm 7 removed --unsafe-perm and npm 11
refuses an unknown cli flag. build.sh and releases/rebuild-release.sh now
pass --foreground-script, as Meteor's own install documentation does, and
tests/npmNoUnsafePerm.test.cjs fails when any script passes the old flag.

Thanks to xet7 !
2026-10-11 03:03:53 +03:00
Lauri Ojansivu c454f8567d build.bat: do what build.sh does, not only offer the same menu.
The menu checks already matched every entry; these labels existed but did
less than their build.sh twins:

- Mocha runs with --full-app, EMAIL_RECEIPT_SWEEP_INTERVAL_MS, WRITABLE_PATH
  and its own METEOR_LOCAL_DIR, and returns its exit status instead of 0.
- `build.bat --run-everything [mode]` works, as `./build.sh --run-everything`.
- The floating-promises guard fails instead of only warning.
- Playwright browsers live in .tools\ms-playwright and a single-browser run
  sets WEKAN_PLAYWRIGHT_PROJECT; .tools\.meteor is on PATH.
- CUSTOM PORT + SUBDOMAIN: a bare name is NAME.localhost, the port is
  checked, a trailing slash is removed, and the WEKAN_DEV_* overrides work.
- The trace dev server uses the computed heap, not a fixed 8192 MB.
- The Docker image tag is read from the compose file; "Kill all dev
  servers" also stops `rspack build --watch`.
- The build sets the same diagnostics (npm verbose, METEOR_PROFILE, module
  resolution, the command-output tracer), supports
  WEKAN_BUILD_HEAP_SNAPSHOT, and explains an out-of-heap failure.
- Setup installs Node.js and npm at the Dockerfile's NODE_VERSION and
  NPM_VERSION. build.sh pinned npm@12.0.2 by hand while the Dockerfile says
  12.2.0; it now reads NPM_VERSION too.

tests/buildScriptParity.test.cjs checks each of these in both scripts.

Thanks to xet7 !
2026-10-10 18:55:04 +03:00
Lauri Ojansivu 63a7fba465 Let the login-cookie refresh limit be raised, and stop browser tests signing themselves out.
Meteor answers more than 30 refreshes of the HttpOnly login cookie per 10
seconds from one client address with 429, and every page load is one. The
whole browser suite comes from localhost, so a quick run signed its own
test users out: 18-rtl-layout "list pages" landed on the sign-in page on
its third full navigation in one of two runs with two workers. TODO Later
recorded this on 2026-10-05.

ACCOUNTS_COOKIE_REFRESH_RATE_LIMIT now sets the allowance per 10 seconds;
anything but a positive whole number keeps Meteor's default, and the
limiter is never switched off. The browser test server sets it to 100000.
It also helps an install where many users reach WeKan through a proxy
that is not trusted for the client address and so share one address;
documented beside the login settings. loginWithToken additionally waits
out a 429 on the cookie refresh and resumes once, and only for that.

tests/cookieRefreshRateLimit.test.cjs runs the parser with valid and
invalid values and pins the server, build.sh, docs and helper wiring.

Thanks to xet7 !
2026-10-07 17:29:08 +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 dae1fd68e8 Restore FrameBleed protection: WeKan's pages refuse being framed by other sites again.
With BROWSER_POLICY_ENABLED (the Docker and Snap default) WeKan is meant to be
frameable only by itself and TRUSTED_URL, so another site cannot load it in an
invisible frame and trick a signed-in user into clicking through it
(clickjacking). When browser-policy was removed on 2022-04-08, every line of
server/policy.js was commented out, and since then the app's pages carried no
framing header at all; only file responses did.

Every response now gets Content-Security-Policy: frame-ancestors 'self' plus
the TRUSTED_URL origins, and X-Frame-Options: SAMEORIGIN when no trusted origin
is set; a malformed TRUSTED_URL never widens it, and Sandstorm, which always
frames WeKan, and a disabled policy send nothing. build.sh and build.bat run
the test server with the default policy. FrameBleed moves from the recorded
gaps to guarded, with unit, negative and browser tests. A framed load cannot be
told from a normal one, so there is nothing to record in Problems.

Thanks to xet7 !
2026-10-02 10:46:06 +03:00
Lauri Ojansivu 2172f19d88 Fix SyncBleed: send List Sync requests through the SSRF guard and keep responses out of errors.
GHSA-5q84-p3vr-f3xv: a board member with write access chooses the List Sync
server URL for Gitea, Forgejo, GitLab and Jira. It was fetched with the
platform fetch(), so it reached 127.0.0.1, private networks and the cloud
metadata address, and up to 200 bytes of a failed response were copied into
the error the preview returns and lastSyncError stores. An open and a closed
internal port also answered differently.

Every request now goes through fetchSafe: internal addresses refused, DNS
pinned, redirects refused, response size and time bounded. An error carries the
origin and HTTP status only, a non-JSON answer says so without quoting it, and
a guard refusal is one message that does not name what a host resolved to.
Saving Sync settings refuses an internal address too, so none is stored. Both
refusals are recorded as SyncBleed in Admin Panel -> Problems.

A self-hosted tracker on the server's network is allowed only by the
administrator, with LIST_SYNC_ALLOWED_PRIVATE_HOSTS (exact hosts); the test
server allows 127.0.0.1 for the List Sync specs' mock tracker. The browser test
found that an IPv6 literal such as [::1] kept its brackets and was looked up as
a name at save time; the shared validator now checks it as an address.

tests/syncBleed.test.cjs reproduces the report on the real fetcher for every
provider, and fails on a platform fetch() to anything but a fixed or
administrator-allowed host, or a response body copied into an error, anywhere
in the server tree. list-sync-source.e2e.js saves and previews internal
addresses in the browser and checks no request reaches the mock tracker.
securityRegressionCoverage lists CacheBleed and SyncBleed with their tests.

Thanks to alham-rizvi and xet7 !
2026-10-02 09:46:00 +03:00
Lauri Ojansivu 7c11276028 Repair update hooks, UI layouts and EVERYTHING test harness
Keep trusted card snapshots intact after checking caller field permissions.
Restore custom-field activities, History and Sync updates; fix popup layouts,
textarea rule descriptions, WebKit date resets and mobile Rules mail rows.

Align Meteor versions, make image fixtures portable, configure local SMTP
for both test server modes, and bridge Docker Desktop database and SMTP
connections. Stabilize paginated, lazy-loading and security test fixtures.

Focused Node and Chromium, WebKit and Docker Firefox regressions pass.
The full Node rerun still reports translation completeness failures.

Thanks to xet7 !
2026-09-30 01:16:12 +03:00
Lauri Ojansivu d1bfeafcaf Run the server Mocha suite in --full-app mode so its integration tests run.
26 tests in server/lib/tests - notification delivery, stored history, Sync
hooks, rule plans and webhooks - skip unless Meteor.isAppTest, which only
--full-app sets, and every runner used plain `meteor test`, so they had
never run. build.sh and npm test now pass --full-app, WRITABLE_PATH (the app
will not start without it) and the one-second email receipt sweep one test
waits for: 559 pass, none pending. The one that had been failing unseen,
syncHookedCards, gave a card a value for a custom field defined on no board,
which the admin-only-field guard rightly refuses; it now creates the field.
A node guard keeps the runners in this mode and every such file loaded.

Thanks to xet7 !
2026-09-29 16:51:47 +03:00
Lauri Ojansivu 786b8b0179 Find the dev server's IP address on macOS in build.sh.
"CUSTOM-IP:PORT" listed addresses with `ip address`, which macOS does not
have, and the CURRENT-IP options tried only en0 and en1 on macOS, so a Mac
whose network is on another interface got localhost. current_ip_address now
reads the default-route interface's address on macOS and the kernel's source
address on Linux; list_ip_addresses uses ip or ifconfig, whichever exists.
The custom option also offers the detected address as its default.

Thanks to xet7 !
2026-09-29 15:46:31 +03:00
Lauri Ojansivu 54ce3015e8 Include the Node.js atomic runtime in Linux release packages.
Keep libatomic1 in Docker runtime dependencies, package architecture-matched libraries and licensing in Linux ZIPs inherited by AppImage and Flatpak, and include the library in Sandstorm. Install it explicitly in native and emulated builders; remove inherited Linux runtime files from Windows and macOS repacks.

Thanks to Nissulya, PetitManchot and xet7 !
2026-09-24 14:21:55 +03:00
Lauri Ojansivu 3f4dcaec53 Gate release menus on dependency review and retry missing builds 2026-09-23 21:56:45 +03:00
Lauri Ojansivu 95f0e045a5 Keep Docker browser tests on Meteor localhost origin 2026-09-22 14:59:15 +03:00
Lauri Ojansivu ced5263a47 Repair macOS test and release workflow regressions 2026-09-22 09:46:48 +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 a990e7f202 Provide full MIME detection across server platforms
Share native file and bundled libmagic detection across uploads, extension correction and administrator file checks. Include the portable WASM database in runtime dependencies, stage native file for Snap and Linux setup, and verify release assets before smoke boot.

Cover portable detection with native file absent, missing dependencies/assets, isolated release layout and HTML diagnostics in Chromium, Firefox and WebKit.

Thanks to xet7 !
2026-09-20 21:06:30 +03:00
Lauri Ojansivu 721805b800 Fix source development startup warnings and browser fixture cleanup
Cache Meteor package transforms, make development DEBUG logging opt-in, and replace legacy CAS URL parsing while preserving callback encoding and custom HTTPS ports. Clean attachment metadata during browser fixture teardown, including failure paths.

Verify six focused Node suites, nine sequential browser checks across Chromium, Firefox and WebKit, and live HTTP requests with deprecation tracing. Document the package cache and verification limits.

Thanks to xet7.
2026-09-20 12:25:56 +03:00
Lauri Ojansivu b104edeef1 Add source-loaded development server and sequential EVERYTHING testing
Add Dev server nobuild to both build menus with shared URL and port options. Load checkout JavaScript and templates in memory using the installed Meteor toolchain; start its bundled MongoDB on the next port and wait for owned database shutdown.

Run server, Node, import, E2E and all supported Chromium, Firefox and WebKit regressions sequentially, stopping on failure. Preserve CommonJS semantics, native fetch, dynamic import namespaces and client source access boundaries. Document verified results and the remaining Windows and intermittent Firefox limits.

Thanks to xet7 !
2026-09-20 05:37:00 +03:00
Lauri Ojansivu 5ed9fc944a Remove obsolete Summernote integration and editor configuration.
Use the Markdown textarea for every editor. Remove the retired environment and Snap options from server settings, all platform launchers, build scripts and current documentation. Keep released and archived changelog entries intact.

Keep notification HTML escaping independent of editor configuration, preserve attachment metadata and mention behavior, and cover Markdown and emoji round trips in browser tests. Also import the translator used by attachment error handlers.

Thanks to xet7 !
2026-09-19 14:32:29 +03:00
Lauri Ojansivu a6da38e763 Document automatic Git menu merge and translation review progress 2026-09-14 14:26:42 +03:00
Lauri Ojansivu f23a18515a Automate orphan autostash recovery and merge origin in Git menu 2026-09-14 14:26:20 +03:00
Lauri Ojansivu f665f7cdaf Guard Git menu operations and report interrupted pull cleanup failures 2026-09-14 14:24:18 +03:00
Lauri Ojansivu f7def463be Restrict release notes to summary security and language updates
Emit only In short, Security, translation language names, thanks and the exact changelog anchor. Keep other details in the changelog and verify security retention, omitted developer entries and version-specific links offline.

Thanks to xet7 !
2026-09-14 13:39:32 +03:00
Lauri Ojansivu 8db16132cb Summarize release-note translations as updated languages
Keep detailed translation entries in the changelog and audit, but list only affected languages in release notes. Require explicit language metadata, preserve other topic details, and anchor release heading extraction. Verify nested detail removal and missing-metadata failure offline.

Thanks to xet7 !
2026-09-14 13:26:55 +03:00
Lauri Ojansivu ccfceb7b77 Exclude binary provenance tables from release notes
Generate initial and refreshed release notes solely from the changelog. Retain checksum verification and build provenance artifacts separately. Update build entry points, release instructions and regression guards.

Thanks to xet7 !
2026-09-14 13:22:19 +03:00
Lauri Ojansivu a744eb907f Standardize organization mirror log datetime directories
Use the shared log-directory reservation for organization reports and update remaining path examples. Verify report paths with offline organization fixtures.

Thanks to xet7 !
2026-09-14 12:14:08 +03:00
Lauri Ojansivu 0d6be31986 Standardize build and release log directories on readable datetimes
Use operation/YYYY-MM-DD_HH-MM-SS for Unix and Windows build logs, mirror launcher and data reports, translation push reports, conformance and speed diagnostics. Preserve earlier same-second runs with reserved suffixes. Keep record timestamps in their existing data format.

Path and collision fixtures, build progress and parity, mirror launcher and Transifex suites pass. Shell syntax checks pass; Windows execution was not available. Update the internal release preflight inventory used by parity checks.

Thanks to xet7 !
2026-09-14 12:02:36 +03:00
Lauri Ojansivu 14d6a8cd14 Repair stale translation changelog links and truthful preflight reporting
Repoint four missing hashes to local commits with matching subjects. Report unresolved links without a contradictory success message, propagate checker failures and treat an unchanged changelog as a successful check.

Thanks to xet7 !
2026-09-14 11:12:47 +03:00
Lauri Ojansivu 3fedee2b91 Report completed build logs and prepare read-only server manifests
Print development and release log paths at completion on shell and Windows builds. Match the release workflow by making Meteor's server package manifest writable before updating node-gyp and installing dependencies.

Add completion/failure and read-only-manifest regressions. Development compilation and release startup smoke check pass on Linux arm64; 13 targeted test entries pass. Native Windows execution is unavailable.

Thanks to xet7.
2026-09-14 00:30:44 +03:00
Lauri Ojansivu 5f8f22f8c3 Unify shell and Windows log directories by operation date and time 2026-09-14 00:02:30 +03:00
Lauri Ojansivu 0fdda91dec Separate repeated build logs into date and time directories 2026-09-13 23:58:51 +03:00
Lauri Ojansivu 002e6faa76 Log development and release builds by build type and day 2026-09-13 23:55:57 +03:00