Skip to content

Commit 804deeb

Browse files
committed
Fix(release): the Docker web build sees the shared Vite plugin, and Windows CI skips Harper's Node engine tests
Two release-day failures from the Harper work. The Docker image builds the web client from a copy of apps/ and packages/ only, so the renderer config's import of tooling/vite/harper-wasm-asset could not resolve and the publish stopped at the web build; the image now copies tooling/vite too. On the Windows runners the real-engine tests failed to open the wasm: harper.js reads a file:// binary through new URL(url).pathname, which on Windows gives /D:/... and sends Node to D:\D:\..., a harper.js 2.7 bug in its Node loader. The app never loads Harper through Node (the renderer fetches the wasm over the zen-harper scheme), so those tests are skipped on win32 and keep pinning the engine contract on the other runners. Claude-Session: https://claude.ai/code/session_015HNdWonTE8g6dPY2SkdsRS
1 parent 4835a24 commit 804deeb

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ RUN npm ci --no-audit --no-fund --loglevel=error
2828

2929
COPY apps apps
3030
COPY packages packages
31+
# The renderer configs import shared Vite plugins from tooling/vite (the
32+
# Harper wasm asset resolver); without this copy the web build cannot resolve them.
33+
COPY tooling/vite tooling/vite
3134

3235
RUN npm run build --workspace @zennotes/web
3336

packages/app-core/src/lib/harper-lint.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/**
22
* Runs Harper's real engine under Node (LocalLinter reads the wasm from disk),
33
* so these pin the contract the editor relies on rather than a mock of it.
4+
*
5+
* Skipped on Windows: harper.js 2.7 reads a `file://` binary through
6+
* `new URL(url).pathname`, which on Windows yields `/D:/...` and makes Node
7+
* look for `D:\D:\...`. The app never loads Harper through Node (the
8+
* renderer fetches the wasm over the zen-harper scheme), so the contract
9+
* these tests pin is exercised on the other runners.
410
*/
511
import { describe, expect, it } from 'vitest'
612
import { HARPER_LINT_CHAR_LIMIT, harperSessionFromLinter, harperSuggestionChange } from './harper-lint'
@@ -13,7 +19,7 @@ async function session() {
1319
return harperSessionFromLinter(harper, linter)
1420
}
1521

16-
describe('Harper session', () => {
22+
describe.skipIf(process.platform === 'win32')('Harper session', () => {
1723
it('reports spans in UTF-16 units, so an emoji before the word does not shift it', async () => {
1824
const text = 'I 😀 beleive this is teh answer.'
1925
const lints = await (await session()).lint(text)

0 commit comments

Comments
 (0)