Skip to content

ci: a push to main runs the full matrix, so main holds every cache - #234

Merged
foxnne merged 1 commit into
mainfrom
ci/nightly-cache-seed
Oct 8, 2026
Merged

foxnne merged 1 commit into
mainfrom
ci/nightly-cache-seed

Conversation

@foxnne

@foxnne foxnne commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up from #233.

What changes

Every pull request's first run now gets warm macOS, Windows and cross-build caches.

The only caches every PR can restore are the ones saved by a run on main; a cache a PR saves is visible to that PR alone. A push to main ran only the Linux jobs, so main never held a macOS, Windows or cross-build cache, and each PR's first run built those three cold. From #233's runs:

Job Cold Warm
macOS tests 389 s 43 s
Windows tests 501 s 285 s
Windows cross-build 365 s 50 s

The warm numbers were on unchanged source; a typical PR rebuilds the app and gains less.

Now a push to main runs what a PR runs: the three-platform test matrix and the Windows cross-build. That gives three things with no schedule and no new trigger:

  • The merge that changes a dependency saves the new caches to main in the same run. PRs opened after that merge start warm.
  • A cache GitHub evicts after 7 unused days comes back on the next merge.
  • Every merge is tested on all three platforms, not only Linux.

Cost: three more jobs per merge. They're free on a public repo, short on a cache hit, and nothing waits on a main run, since PRs are gated by ci-ok.

(This replaces a first version that added a nightly scheduled run instead.)

SDK impact

  • None

Verified

  • The workflow parses.
    • Triggers are unchanged: push to main, pull_request, merge_group, workflow_dispatch.
    • The matrix is the three platforms for every event.
    • The cross-build runs whenever the builds run.
    • No other check reads github.event_name except the changes job's diff base.
  • Live, after merge: the merge's own push run should save zig-0.16.0-test-macOS-ARM64-…, …-test-Windows-X64-… and …-windows-fizzy-backend-Linux-X64-… under refs/heads/main. main already holds the Linux test and integration caches. The next PR's first run should then restore all five.

Follow-ups

None.

🤖 Generated with Claude Code

@foxnne
foxnne force-pushed the ci/nightly-cache-seed branch from 60bd351 to 6e07365 Compare October 8, 2026 14:44
@foxnne foxnne changed the title ci: a nightly run on main seeds the macOS and Windows caches ci: a push to main runs the full matrix, so main holds every cache Oct 8, 2026
foxnne added a commit that referenced this pull request Oct 8, 2026
## What changes

**Fixes the macOS failure in #234's CI:** `LocalFs` "a read lands
through pump" failed with `error.NeverLanded`. #234 itself changes only
`ci.yml`, and the same test passed on macOS in #234's previous run and
in #228's.

**Cause.** The read runs on the `Io`'s thread pool, and the test pumped
and yielded **200,000 times** before giving up. When the read thread is
waiting on the disk, not the CPU, each yield returns at once. I measured
the full budget:

| Condition | 200,000 yields take |
|---|---|
| Idle M-series Mac | **20 ms** |
| Background priority | 125 ms |
| CPU saturated | 1.2–54 s (each yield hands the core away) |

So a runner whose disk took more than about 20–50 ms to answer failed
the test. Loading the CPU makes the test *more* tolerant, which is why
my reproduction attempts under load all passed: 0/80 runs of the test
binary and 0/15 warm `zig build test` runs at background priority.

**Reproduced directly:** with the read delayed by 100 ms, the old test
fails with exactly CI's error (`NeverLanded` at `LocalFs.zig:393`), and
the new one passes.

**Now:**
- **`LocalFs` "a read lands through pump"** pumps until the read lands
or 10 s pass on `std.Io.Clock.boot`, and stops the moment it lands, so
it's no slower when things are fast. It also keeps the read's error. The
old sink dropped it, so a read that *failed* also showed up as "never
landed". A future failure will now say which of the two it was.
- **The same count-of-yields wait** was in three `core/work.zig`
thread-mode tests (100,000 yields, about 10 ms) and in FileTable's
"rename onto a mount" test. They now wait on the clock the same way,
written inline at each site.

## SDK impact

- [x] None. Tests only.

## Verified

- [x] **macOS (local):** `zig build test` passes 71/71 steps and 491/492
tests (the one skip is the existing `lsp-uri` one). The file-table tests
pass 43/43 and the work tests 4/4.
- [x] **The read delayed 100 ms:** the old test fails with
`NeverLanded`; the new one passes. The delay was temporary and is not in
this diff.
- [ ] Linux, Windows: this PR's CI.

## Follow-ups

- #234's macOS failure was this flake. Re-running its failed job, or
merging this first, should turn it green.
- `core/FileTable.zig` on `main` already fails `zig fmt --check`. I left
it alone to keep this diff to the tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A pull request restores its Zig caches from its own earlier runs or from main's; a cache a pull
request saves is visible to that pull request alone. A push to main ran only the Linux jobs, so
main never held a macOS, Windows or cross-build cache and every pull request's first run built
those three cold (#233's warm runs took 43 s, 285 s and 50 s against 389 s, 501 s and 365 s
cold).

A push to main now runs what a pull request runs: the three-platform test matrix and the Windows
cross-build. The merge that changes a dependency saves the new caches under main, a cache GitHub
evicts after a quiet week comes back on the next merge, and every merge is tested on all three
platforms. Nothing waits on a main run, and with a cache hit the extra jobs are short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne force-pushed the ci/nightly-cache-seed branch from 6e07365 to d696567 Compare October 8, 2026 15:07
@foxnne
foxnne merged commit 5becdaf into main Oct 8, 2026
7 checks passed
@foxnne
foxnne deleted the ci/nightly-cache-seed branch October 8, 2026 15:19
foxnne pushed a commit that referenced this pull request Oct 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Euk6iCavQdW7MG5FN2vvFw
foxnne added a commit that referenced this pull request Oct 8, 2026
Part of #226

## What changes

Two pieces pixi's dropper magnifier (fizzyedit/pixi#3) needs to be a
clear liquid orb over its zoom, with no frost and strong refraction:
native Liquid Glass on macOS, the app's glass everywhere else. And the
SDK release that ships them, so the orb can be tried against `main` as
soon as this merges.

**`core.native_glass.offered`**
- The app publishes each frame whether the OS draws glass declared
outside a view drag (`publishOffered`, from `Popout.beginFrame`'s
`nativeGlass()`).
- A plugin that sees it declares its glass with `native_glass.add`.
Fizzy's overlay of Liquid Glass already stays up while any glass is
declared.
- Pixi declares a clear piece (`frost = 0`, the lens alone) over a zoom
it draws in the window, so the OS's lens refracts the window beneath.
- Off macOS 26, or with native glass off, `offered()` is false.

**`LiquidField.drawPicture` / `pictureMargin` / `lens`, and
`glass_look.forLens`**
- The app's glass as a lens over a picture the plugin drew. The middle
is the picture as it is, with no frost, colour or lift; the rim bends
and lights it.
- It reads no capture, so the middle stays pixel-exact.
- On the web, where no look is published, it is the earlier glass.
`pictureMargin` says how far past the shapes the picture should reach
for that glass's rim, at the strongest shape lens.

**Tried and dropped:** pixi tried the drop zones' frosted glass with its
zoom laid over it. On a Mac it read as a thick grey border or a flat
rim.

**Merged with main** (#234–#236, #239, #240).

## SDK impact

- [ ] None
- [ ] Core-only or additive: reaches plugins at the next SDK release
- [ ] Fingerprint moved: recorded in `sdk/src/version.zig`,
`sdk_version` untouched, PR labelled `sdk`
- [x] SDK release: bumps `sdk_version`, lists the `sdk` PRs since the
last `sdk-v*` tag

`sdk_version` goes 0.2.17 → 0.2.18 (ef95301). Since `sdk-v0.2.17` this
release carries:
- this PR's core additions;
- #223, #224 and #227's core (the one-slider glass, `glass_look`,
`core.native_glass`, `core.screens`'s menus and dialogs).

The fingerprint has not moved, so installed plugins keep loading.
Merging tags `sdk-v0.2.18` and, per #240, asks the store plugins to
repin.

## Verified

- `zig test core/gfx/glass_look.zig`: 13 pass.
- `zig fmt --check` and `zig ast-check` on the changed files.
- `tests/integration.zig` compiles `drawPicture` and checks
`pictureMargin`.
- CI: Linux, macOS, Windows, integration and the Windows cross-build on
this head.
- [x] macOS: pixi's orb tried locally against this branch by the
maintainer, who approved it.
- [ ] Windows:
- [ ] Linux:
- [ ] Web:

## Follow-ups

- pixi#3 repinned to `sdk-v0.2.18` once it's tagged.
- The orb pinching off pixi's sample button and merging with it (the
plan's next step for this consumer).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Euk6iCavQdW7MG5FN2vvFw

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant