fix(lanes): clear stale detection on real stage transitions, exclude scratch dirs from implement detect

setStage() left detected_stage/signal/at untouched across a real transition,
so a prior task's leftover inference (e.g. `tests` from earlier work) both
misrepresented a fresh task's progress and — because recordDetection is
forward-only — silently rejected every real detection behind it until the
old one aged past DETECTION_TTL_MS. A real stage change now clears the
detection columns; a same-stage heartbeat leaves a live detection alone.

Also excludes `.superpowers/` from the `implement` node's Write detect rule
- brainstorm-companion scratch files were being counted as implementation
work.

fix(client): disable Node's default --experimental-webstorage in tests

Node 25 enables --experimental-webstorage by default, which defines a
broken global `localStorage` (no backing file configured) ahead of jsdom's
own full polyfill. Every test touching real localStorage failed with
"localStorage.clear/getItem is not a function" — not flaky, not test-specific,
just this one Node default. NODE_OPTIONS=--no-experimental-webstorage on the
test scripts lets jsdom's polyfill take over as before.
This commit is contained in:
2026-07-31 10:53:07 +07:00
parent 9b1fa67385
commit 4905d63b97
4 changed files with 61 additions and 10 deletions
+2 -2
View File
@@ -7,8 +7,8 @@
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest"
"test": "NODE_OPTIONS=--no-experimental-webstorage vitest run",
"test:watch": "NODE_OPTIONS=--no-experimental-webstorage vitest"
},
"dependencies": {
"@fontsource/inter": "^5.2.8",