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
Copy file name to clipboardExpand all lines: AGENTS.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -294,6 +294,7 @@ hooks are not installed.
294
294
repository lint/tests, E2E, coverage, Lighthouse, and mutation testing are cloud-CI work unless
295
295
the user explicitly requests a narrowly scoped local run.
296
296
-**Vitest watch-mode hard rule:** Never invoke `pnpm test`, `npm run test`, or a bare Vitest wrapper; use an explicit targeted `pnpm exec vitest run <path>` command so constrained hardware never waits on watch mode.
297
+
-**First-attempt CI evidence:** The required Vitest job intentionally has no `--retry`; a first-attempt failure remains authoritative. Do not hide a suspected flake with `skip`/`todo` or retries. Temporary quarantine requires a `flaky-test` issue, owner, reproduction evidence, adjacent QNBS-v3 issue/expiry comment, visible CI summary, and removal or explicit renewal within 14 days; see `docs/CI.md`.
|`rust-tauri`|`fmt`/`check`/`clippy`/`test` for `src-tauri/`; path-scoped (skips on PRs that don't touch it), needs GTK/WebKit apt-get steps |
358
359
|`core-rust`| Same `fmt`/`check`/`clippy`/`test` for `crates/worldscript-project` (renderer-neutral Rust Core); path-scoped, no GUI deps so no apt-get steps needed |
359
360
|`build`| Production build, smoke-test prod build in Chromium, bundle budget, rollup analyze artifact; on `main`: SLSA build provenance attestation + Pages artifact |
@@ -407,9 +408,7 @@ Never commit directly to `main` — always a feature branch + PR, even for a sin
407
408
## Security Considerations
408
409
409
410
-**No build-time secrets.** API keys are entered via Settings UI and stored encrypted in IndexedDB (AES-256-GCM via Web Crypto API). Do not put AI keys in `.env` or host environment variables for inference.
410
-
-**CSP:**
411
-
- Web (`index.html`): `connect-src` includes `https:` scheme-source to support BYOK custom base URLs, plus explicit localhost endpoints for Ollama/LM Studio/local AI and explicit `wss://` signaling endpoints. See ADR-0004 for the web-vs-Tauri rationale.
412
-
- Tauri (`src-tauri/tauri.conf.json`): strict `connect-src` with enumerated cloud provider endpoints, no `https:` blanket.
411
+
-**CSP:** Web and Tauri use the same explicit `connect-src` origin allowlist from `config/csp-connect-src.json`; arbitrary `https:`, `http:`, and `ws:` scheme wildcards are forbidden. Run `pnpm run csp:sync` followed by `pnpm run csp:check` after changing a provider, local service, or signaling endpoint; CI enforces the non-mutating `pnpm run csp:verify` drift check. Runtime preflight rejects unlisted browser BYOK endpoints with an actionable error.
413
412
-**No `dangerouslySetInnerHTML` without DOMPurify.** Biome flags `noDangerouslySetInnerHtml` as error.
414
413
-**Never log API keys, IVs, or plaintext payloads.** Use `services/logger.ts` (`createLogger(module)` factory — IDB + Tauri JSONL + DEV console sinks; GDPR `sanitizeLogContext`). `console.log` is blocked by Biome in production paths.
415
414
-**Service Worker:** AI hosts are network-only (`public/sw.js`). WASM/ONNX chunks are excluded from precache.
// QNBS-v3: B-1 sentinel guard (async) — skips if flag off/unlocked/recovery-pending, auto-disables on a missing sentinel, else shows the unlock modal.
// QNBS-v3 (CodeAnt #342): re-check via the ref, not the closed-over `recoveryJournal`, since the sibling journal-check effect may have resolved mid-await.
plaintext until the renderer-neutral R-15 storage work ships; the IndexedDB passphrase flow no
36
+
longer presents itself as a project-file encryption gate on Tauri.
37
+
-**CI authority closure:** Core path changes now select the Tauri consumer gate, workflow-policy tests protect local path-dependency coverage and aggregate deployment gating, and Pages deployment waits for `ci-success`.
38
+
-**Accessibility contrast:** command-palette heading contrast was corrected to meet the intended
39
+
WCAG threshold.
24
40
25
41
### Deprecated
26
42
27
43
-**`storycraft://` deep links:** the legacy scheme remains accepted for this release and displays
28
44
a migration notice; it is scheduled for removal in the next release.
29
45
30
-
-**Renderer-neutral Rust Core seed:**`crates/worldscript-project` now provides headless project
31
-
schema, validation, migration, plain JSON I/O, and a test/CLI harness, with one narrow Tauri
32
-
validation command wired through the cross-workspace path dependency.
46
+
### Changed
47
+
48
+
-**CSP egress parity:** Web/PWA and Tauri now use one explicit provider, local-service, and Yjs
49
+
signaling origin allowlist; arbitrary HTTPS egress and the contradictory loopback upgrade policy
50
+
are no longer accepted. New BYOK endpoints require an explicit CSP policy update.
33
51
-**Qt Early Killer-Gate qualification:** the native roadmap now requires cheap, evidence-backed
34
52
lifecycle, accessibility/input, packaging/update-trust, crash/recovery, and security checks
35
53
before substantial Qt UI work can create sunk cost.
36
-
-**Rust TaskSupervisor bounded text proof:** adds bounded renderer-neutral `text.analyze` and
37
-
`text.diff` tasks, typed qualification wrappers, deterministic LCS/whitespace contracts, and
38
-
explicit fallback to the existing TypeScript path; no production caller is switched yet.
39
-
40
-
### Changed
41
54
42
55
-**Diagnostics sink boundary:** structured log construction and recursive redaction now remain
43
56
portable before serialized IDB, Tauri JSONL, and development-console adapters receive the record;
@@ -55,17 +68,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55
68
versions before native execution (#437, #439, #440).
56
69
-**Native maturity evidence:** the G1 qualification ledger now records the partial, evidence-backed
57
70
status of the native migration without claiming a production authority switch (#438).
58
-
59
-
### Fixed
60
-
61
-
-**CI authority closure:**Core path changes now select the Tauri consumer gate, workflow-policy tests protect local path-dependency coverage and aggregate deployment gating, and Pages deployment waits for `ci-success`.
62
-
-**Accessibility contrast:** command-palette heading contrast was corrected to meet the intended
63
-
WCAG threshold.
71
+
-**Mutation-test plumbing:** the manual Stryker workflow now uses explicit per-module incremental
0 commit comments