Skip to content

Commit ccbf93f

Browse files
docs(REV-008): mark the task complete and record the findings
Ticks the REV-008 checklist, updates the phase-12 tracker, and adds REV-009 to it. Two findings the task spec could not have anticipated are called out at the top of REV-008: the packaged app had never launched (found by insisting on a genuinely clean-clone verification), and D1's style-token verification is impossible because the injector is never constructed.
1 parent 6db325c commit ccbf93f

2 files changed

Lines changed: 55 additions & 32 deletions

File tree

dev-docs/tasks/phase-12-reanimation/PROGRESS.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
**Created:** 2026-07-22 (from NOODL-REVIVAL-ROADMAP.md Horizon 0)
44
**Last Updated:** 2026-07-22
5-
**Overall Status:** 🟡 In Progress (14%)
5+
**Overall Status:** 🟡 In Progress (33%)
66

77
---
88

99
## Quick Summary
1010

1111
| Metric | Value |
1212
| ------------ | ------ |
13-
| Total Tasks | 8 |
14-
| Completed | 2 |
13+
| Total Tasks | 9 |
14+
| Completed | 3 |
1515
| In Progress | 0 |
1616
| Not Started | 6 |
17-
| Overall | **25%** |
17+
| Overall | **33%** |
1818

1919
---
2020

@@ -29,7 +29,8 @@
2929
| REV-005 | Dependency Hygiene | 🔴 Not Started || Coordinate with REV-004 |
3030
| REV-006 | Docs Truth Pass | 🔴 Not Started || Independent; do early |
3131
| REV-007 | Ship v0 (signed builds + auto-update) | 🔴 Not Started || Needs REV-004 |
32-
| REV-008 | Dev Loop Hardening + Verification Debt | 🔴 Not Started || Stream A is critical: committed bundles let stale code run silently |
32+
| REV-008 | Dev Loop Hardening + Verification Debt | 🟢 Completed | Opus 4.8 | 186 artefacts untracked; packaged app launches again; 540 → 705 specs |
33+
| REV-009 | Style tokens were never wired up | 🔴 Not Started || Found by REV-008 Stream D; a shipped subsystem that does nothing |
3334

3435
---
3536

@@ -46,3 +47,4 @@ trackers misled contributors (see REV-006) — do not let this file become one o
4647
- **2026-07-22**: REV-002 completed. Root cause was `ELECTRON_RUN_AS_NODE=1` in the inherited environment — VS Code sets it in integrated terminals and the extension host, so the Electron binary booted as plain Node, `require('electron')` returned the CLI shim path instead of the API object, and `app` was `undefined` before any test code ran. That is why the suite could be green on another machine in February and dead here. Added `packages/noodl-editor/scripts/run-electron-tests.js` (spawns the binary directly with the variable stripped, propagates the exit code), stripped it in `scripts/test-editor.ts` too, and added a self-diagnosing guard in `test.js`. The harness also had no results path at all: `test.js` now receives Jasmine results over IPC from a reporter in `SpecRunner.html` and exits non-zero on failures, zero specs, renderer crash, early window close, or a 15-minute watchdog; `webpack.test.js` carries the child's code out through the dev server. Fixed the CI path, which could never have worked — `webpack.test-ci.js` inherited the dev-server `onListening` Electron spawn, and `SpecRunner.html` hard-coded the bundle URL to `localhost:8081` with no server running; CI now builds to disk and runs with a hidden window. Pinned `random: false` in Jasmine: the suite shares global state (`ProjectModel.instance`, `NodeLibrary` registration) and two `tests/nodegraph/export.js` specs passed or failed by seed. Suite result: **540 specs, 539 pass**, three consecutive clean runs at exit 0, and a deliberately broken `tests/io/` assertion correctly reported and exited 1. Fixed along the way: `tests/utils/ParameterValueResolver.test.ts` imported `@jest/globals`, which throws at module load and was taking down the entire run; two `schema-validator.test.ts` specs used Jest substring `toThrow`; and `ParameterValueResolver.toNumber(null)` returned `0` against its own documented contract (real bug, no production callers yet). One spec quarantined as `xit` — component port renames do not propagate to instances in other graphs, a genuine editor bug needing its own task. See `REV-002-NOTES.md` for that and the other follow-ups. Unblocks REV-003.
4748
- **2026-07-22**: Merged `cline-dev-tara` (16 commits, Jan 2026) into `cline-dev` after REV-002 made verification possible — see `dev-docs/reviews/MERGE-NOTES-cline-dev-tara.md`. Both branches had independently implemented ElementConfigs with different architectures and different consumers (9 of 14 conflicts were add/add on those files); kept `cline-dev`'s, which compiles and drives the property panel. Brought in StyleTokens and the embedded template system. Suite green at 540/0.
4849
- **2026-07-22**: Fixed the dev loop (`1502581`). The editor opened a black window because of two stacked stale-artefact bugs: `src/editor/index.html` only loads the dev-server bundle when `devMode === 'yes'`, which nothing ever set, so it ran a stale production `index.bundle.js` (production react-dom + external development react → `dispatcher.getOwner is not a function` before first paint); and `npm run dev` never rebuilt `src/main/main.bundle.js`, the Electron entry point, so main-process edits did nothing in dev. Also stripped `ELECTRON_RUN_AS_NODE` from the dev launch path — same bug REV-002 fixed for tests. Added headless debugging: `scripts/devtools/cdp.js` (health/eval/console/screenshot/dom/wait), `npm run dev:debug` with all service output in `.logs/dev.log`, renderer console mirrored into main stdout, and a `run-editor` agent skill. Editor verified rendering via CDP. Follow-up work captured as REV-008.
50+
- **2026-07-22**: REV-008 completed. **Stream A** — untracked 186 generated files (~24 MB) that were committed webpack output living in `src/`: the three entry bundles, their split chunks, the Monaco workers and the file-loader SVGs. That was the root enabler for the black-window bug — a months-old bundle could run instead of the source beside it, and every dev run left the tree dirty. `npm run check:artefacts` plus a CI workflow stop it recurring; the vendored parse-dashboard bundles stay tracked, since nothing here rebuilds them. Verifying from a genuinely clean clone turned up **two pre-existing defects that meant the packaged app had never launched**: `react`/`react-dom` are webpack externals, so the packaged app resolved *development* react (NODE_ENV is unset in a packaged Electron app) against the *production* react-dom it had built, throwing `dispatcher.getOwner is not a function` before first paint; and `split2`, `crelt`, `style-mod` and `w3c-keyname` were externalised but undeclared, so electron-builder never collected them (`Cannot find module 'split2'`). Both fixed, and the fix itself nearly shipped as a no-op — webpack's DefinePlugin constant-folded the dotted `process.env.NODE_ENV` away, which `cdp health` against the packaged build caught. A clean clone now produces a `.dmg` whose app renders. **Stream B** — `cdp.js` gained `--target=editor|viewer`, a `services` probe, and real `click`/`type` through the input pipeline; `dev-debug.js` attaches over CDP as pages appear and writes renderer exceptions into `.logs/dev.log`; the main process is debuggable at last via `npm run dev:debug -- --inspect-main`. `main.js` also gained the `ELECTRON_RUN_AS_NODE` guard `test.js` already had — without it the app exits 0 in silence. **Stream C** — both docs now say CDP-first for screenshots, and that a black `screencapture` frame is a macOS permission, not a crash. **Stream D** — the merge debt: the embedded hello-world template works and is now covered, including the never-executed template-flow-plus-`react19` combination; the six stranded Jest specs are converted and running (540 → 705 specs, 0 failures), and two of them were not merely stranded but *wrong* — `UBAConditions` built its fixture from flat dotted keys the implementation cannot resolve, and `ProjectCreationWizard` asserted against its own copies of the functions it claimed to test. `GroupConfig` was deleted rather than repointed: it keyed on a non-existent node type, and activating it would have stamped undefined CSS variables onto the most-used node in the product. That last point opened up **REV-009** — the style-token system was never connected to anything.

dev-docs/tasks/phase-12-reanimation/REV-008-DEV-LOOP-HARDENING.md

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# REV-008: Trustworthy Dev Loop, Visibility, and Merge Verification Debt
22

3+
> **Status: ✅ Completed 2026-07-22.** All four streams landed on
4+
> `task/rev-008-dev-loop-hardening`. Suite 540 → **705 specs, 0 failures**;
5+
> `typecheck:editor` clean.
6+
>
7+
> Two things worth knowing that this document did not anticipate:
8+
>
9+
> 1. **The packaged app had never launched.** Verifying Stream A from a genuinely
10+
> clean clone — as this task insisted on — surfaced two pre-existing defects
11+
> that had nothing to do with tracked bundles: externalised `react` resolving
12+
> its *development* build against a *production* `react-dom` (the same
13+
> `dispatcher.getOwner` error recorded below, but in a **fresh** production
14+
> build, not a stale one), and four externalised-but-undeclared modules that
15+
> electron-builder never packaged. Both fixed; a clean clone now yields a
16+
> `.dmg` whose app renders.
17+
> 2. **The style-token system was never connected.** Stream D1 asked for
18+
> token injection to be verified in a preview. It cannot be: nothing ever
19+
> constructs `StyleTokensInjector`. Written up as
20+
> [REV-009](./REV-009-STYLE-TOKENS-NEVER-WIRED.md); it is also why D2/D3 were
21+
> resolved by deletion rather than by repointing the identifiers.
22+
323
## Metadata
424

525
| Field | Value |
@@ -142,11 +162,11 @@ cannot simply be deleted without checking what depends on them:
142162

143163
### Success criteria
144164

145-
- [ ] No generated `*.bundle.js` tracked in git
146-
- [ ] Clean clone → `npm run build:editor` produces a launchable packaged app
147-
- [ ] Clean clone → `npm run dev:debug``cdp health` reports `reactMounted: true`
148-
- [ ] Repo shrinks by ~24 MB of artefacts
149-
- [ ] A regression guard exists and is wired into CI (coordinate with REV-003)
165+
- [x] No generated `*.bundle.js` tracked in git
166+
- [x] Clean clone → `npm run build:editor` produces a launchable packaged app
167+
- [x] Clean clone → `npm run dev:debug``cdp health` reports `reactMounted: true`
168+
- [x] Repo shrinks by ~24 MB of artefacts
169+
- [x] A regression guard exists and is wired into CI (coordinate with REV-003)
150170

151171
---
152172

@@ -177,11 +197,11 @@ cannot simply be deleted without checking what depends on them:
177197

178198
### Success criteria
179199

180-
- [ ] Viewer/preview frame inspectable via CDP
181-
- [ ] Main process debuggable via an opt-in `--inspect` port
182-
- [ ] One command reports the health of all dev services
183-
- [ ] `click` and `type` exist and drive React handlers correctly
184-
- [ ] Startup exceptions land in `.logs/dev.log` without manual attach
200+
- [x] Viewer/preview frame inspectable via CDP
201+
- [x] Main process debuggable via an opt-in `--inspect` port
202+
- [x] One command reports the health of all dev services
203+
- [x] `click` and `type` exist and drive React handlers correctly
204+
- [x] Startup exceptions land in `.logs/dev.log` without manual attach
185205

186206
---
187207

@@ -216,9 +236,9 @@ Playwright's `_electron` driver is the tool for it.
216236

217237
### Success criteria
218238

219-
- [ ] Both docs state CDP-first, and that a black `screencapture` frame means
239+
- [x] Both docs state CDP-first, and that a black `screencapture` frame means
220240
*permission*, not failure
221-
- [ ] The native-chrome escape hatch is documented with its prerequisite
241+
- [x] The native-chrome escape hatch is documented with its prerequisite
222242

223243
---
224244

@@ -302,12 +322,13 @@ between each.
302322

303323
### Success criteria
304324

305-
- [ ] New project creation verified end-to-end, with `react19` confirmed
306-
- [ ] Style-token injection verified in a running preview
307-
- [ ] Regression tests added for both
308-
- [ ] D2 decided and actioned; no dead config left keyed on a non-existent type
309-
- [ ] D3 resolved (ported or consciously dropped, recorded either way)
310-
- [ ] Stranded specs converted, rewritten, or deleted — none left running nowhere
325+
- [x] New project creation verified end-to-end, with `react19` confirmed
326+
- [x] Style-token injection verified — it does **not** work: `StyleTokensInjector`
327+
is never constructed. Written up as REV-009.
328+
- [x] Regression tests added for both
329+
- [x] D2 decided and actioned; no dead config left keyed on a non-existent type
330+
- [x] D3 resolved (ported or consciously dropped, recorded either way)
331+
- [x] Stranded specs converted, rewritten, or deleted — none left running nowhere
311332

312333
---
313334

@@ -342,12 +363,12 @@ between each.
342363

343364
## Checklist
344365

345-
- [ ] Read this file, the merge notes, and REV-002-NOTES fully
346-
- [ ] Create branch `task/rev-008-dev-loop-hardening`
347-
- [ ] Confirm the baseline: `dev:debug` + `cdp health``reactMounted: true`, `test:ci` green
348-
- [ ] Stream A — untrack build artefacts, verify from a clean clone, add a guard
349-
- [ ] Stream B — close the visibility gaps
350-
- [ ] Stream C — document CDP-first vs the permission escape hatch
351-
- [ ] Stream D — verify the merge, decide D2/D3, unstrand the specs
352-
- [ ] `test:ci` green and `typecheck:editor` clean
353-
- [ ] Update `PROGRESS.md`; open PR
366+
- [x] Read this file, the merge notes, and REV-002-NOTES fully
367+
- [x] Create branch `task/rev-008-dev-loop-hardening`
368+
- [x] Confirm the baseline: `dev:debug` + `cdp health``reactMounted: true`, `test:ci` green
369+
- [x] Stream A — untrack build artefacts, verify from a clean clone, add a guard
370+
- [x] Stream B — close the visibility gaps
371+
- [x] Stream C — document CDP-first vs the permission escape hatch
372+
- [x] Stream D — verify the merge, decide D2/D3, unstrand the specs
373+
- [x] `test:ci` green and `typecheck:editor` clean
374+
- [x] Update `PROGRESS.md`; open PR

0 commit comments

Comments
 (0)