An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:construction_worker: Isolate test execution from runner environment conflicts https://github.com/siyuan-note/siyuan/issues/19472
Daniel8f0071886c78
diff --git a/.github/workflows/api-contracts.yml b/.github/workflows/api-contracts.ymlindex c0959e461c..28403fb92a 100644--- a/.github/workflows/api-contracts.yml+++ b/.github/workflows/api-contracts.yml@@ -42,6 +42,8 @@ jobs:- name: Test all kernel packagesrun: go test -tags "fts5 sqlcipher" ./... -count=1working-directory: kernel+ env:+ TMPDIR: ${{ runner.temp }}frontend-tests:runs-on: windows-latestdiff --git a/app/package.json b/app/package.jsonindex b8e5cbf70c..9f24dac30e 100644--- a/app/package.json+++ b/app/package.json@@ -11,7 +11,7 @@"typecheck": "tsc -p tsconfig.typecheck.json && tsc -p tsconfig.api.json","api:generate": "node scripts/api-contracts.mjs","api:check": "node scripts/api-contracts.mjs --check",- "test": "node --import tsx --test --test-concurrency=4 \"src/**/*.test.ts\" \"tests/**/*.test.js\" \"electron/**/*.test.js\" \"scripts/**/*.test.js\"",+ "test": "node --import tsx --test --test-concurrency=1 \"src/**/*.test.ts\" \"tests/**/*.test.js\" \"electron/**/*.test.js\" \"scripts/**/*.test.js\"","dev": "webpack --mode development","dev:mobile": "webpack --mode development --config webpack.mobile.js","dev:desktop": "webpack --mode development --config webpack.desktop.js",diff --git a/docs/API-CONTRACTS.md b/docs/API-CONTRACTS.mdindex cbabf2dbdb..c9f0802ac3 100644--- a/docs/API-CONTRACTS.md+++ b/docs/API-CONTRACTS.md@@ -159,4 +159,6 @@ go test -tags "fts5 sqlcipher" ./... -count=1`tsconfig.api.json` separately enables strict checks and declaration-file checking for invalid parameters, misspelled fields, required bodies, success and failure branches, nullability, and method mismatches. The main application retains its existing configuration; do not assume strict null checks apply to every call. Handler tests use temporary workspaces and isolated test processes without starting or restarting the running kernel.-CI runs all kernel packages on Linux and all frontend, Electron, and packaging-script tests on Windows. Frontend discovery is restricted to `src/**/*.test.ts`, `tests/**/*.test.js`, `electron/**/*.test.js`, and `scripts/**/*.test.js`, so packaged copies under `app/build` are excluded. Test concurrency is limited to four files to avoid exhausting Electron process resources. New regression tests in these locations are included automatically; update the test command and this document when adding a new test location or filename convention. Keep `Contract` in Go contract regression test names so they remain easy to run separately.+On Linux, set `TMPDIR` to an existing directory under your home directory before running the full kernel suite. Import and static-file fixtures represent ordinary user data, while `/tmp` outside the workspace is intentionally rejected by the sensitive-path guard. CI uses `${{ runner.temp }}` for this purpose.++CI runs all kernel packages on Linux and all frontend, Electron, and packaging-script tests on Windows. Frontend discovery is restricted to `src/**/*.test.ts`, `tests/**/*.test.js`, `electron/**/*.test.js`, and `scripts/**/*.test.js`, so packaged copies under `app/build` are excluded. Test files run serially to avoid Electron process startup contention. New regression tests in these locations are included automatically; update the test command and this document when adding a new test location or filename convention. Keep `Contract` in Go contract regression test names so they remain easy to run separately.