Repository navigation
refactor(chat): move the turn lifecycle into a Main-process ChatStreamManager #70
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Verify | |
| # Pull-request gate. `release.yml` is tag-triggered and only proves that | |
| # installers can be produced, which is not the same as proving the app can start: | |
| # three separate startup crashes in this repo (a hoisted `script-loader!sql.js` | |
| # require, a module-scope `new DOMMatrix()` in bundled pdfjs, and | |
| # `AnkiExport is not a constructor` from a lost CJS interop) all packaged cleanly. | |
| # | |
| # `npm run smoke:packaged` launches the real packaged executable and self-checks | |
| # it, so it is the step that actually catches those. It runs on all three | |
| # platforms because the native addons are arch-specific: | |
| # | |
| # better_sqlite3.node, vec0.so/.dylib/.dll, skia.*.node | |
| # | |
| # `lint` is deliberately not part of this gate: it reports no errors but still | |
| # carries a large pre-existing `@typescript-eslint/no-explicit-any` baseline, | |
| # unrelated to build correctness. | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| # Verification only needs to read the repository. | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify: | |
| name: verify (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| # Report every platform's result instead of stopping at the first failure. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| # check:version compares package.json against the newest release tag, so the | |
| # tags have to be here. `fetch-tags: true` does NOT do it: in the shallow | |
| # path actions/checkout only adds the checked-out ref's own tag to the | |
| # refspec, and a pull request ref (`refs/pull/N/merge`) has no tag. All tags | |
| # come with all history, and this repository is small enough that the full | |
| # fetch is not worth optimising. | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| # Deliberately before `npm ci`: it reads only package.json and the git tags, | |
| # so a version that has fallen behind the newest release fails in seconds | |
| # instead of after a full install. | |
| - name: Version consistency | |
| run: npm run check:version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Typecheck | |
| run: npm run typecheck | |
| # Cheap and platform-independent: enforces DESIGN.md's mechanically | |
| # checkable rules (radius, elevation, colours, text levels) before the | |
| # long packaging step below does any work. | |
| - name: Design tokens | |
| run: npm run check:design | |
| - name: Unit tests | |
| run: npm test | |
| # Runs `npm run build` first, then electron-builder --dir, so the bundle and | |
| # the package are both covered by this one step. | |
| - name: Build and package (unpacked) | |
| run: npm run build:unpack | |
| env: | |
| # No signing material in CI; don't let electron-builder go looking for | |
| # an identity on macOS or a certificate on Windows. | |
| CSC_IDENTITY_AUTO_DISCOVERY: 'false' | |
| # The packaged app needs a display; GitHub's Linux runners are headless. | |
| - name: Smoke test the packaged app (Linux) | |
| if: runner.os == 'Linux' | |
| run: xvfb-run -a npm run smoke:packaged | |
| - name: Smoke test the packaged app (macOS / Windows) | |
| if: runner.os != 'Linux' | |
| run: npm run smoke:packaged | |
| # The eval baseline (#75) is the reference point every v1.5 experiment is | |
| # measured against, so CI proves the committed numbers still reproduce. The | |
| # model cache is keyed on the pinned model file, so the 134 MB download | |
| # happens once per pin, not once per run. A hit is required for the run to | |
| # be offline: `eval:prepare` only downloads when the cache is cold. | |
| - name: Cache eval embedding model | |
| if: runner.os == 'Linux' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.config/knownote/models | |
| key: knownote-eval-model-${{ hashFiles('src/main/embedding/localModel.ts') }} | |
| - name: Eval harness is deterministic | |
| if: runner.os == 'Linux' | |
| run: | | |
| xvfb-run -a npm run eval:prepare | |
| xvfb-run -a node scripts/eval.mjs | |
| cp docs/eval/baseline-v1.4.json /tmp/eval-a.json | |
| xvfb-run -a node scripts/eval.mjs | |
| diff /tmp/eval-a.json docs/eval/baseline-v1.4.json |