Skip to content

Measure and trim the iPhone CI job's memory - #271

Merged
BunsDev merged 5 commits into
mainfrom
ios-ci-memory
Oct 18, 2026
Merged

BunsDev merged 5 commits into
mainfrom
ios-ci-memory

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

The iPhone companion job failed about 1 run in 7. The failure looked like a /resume or UI timeout, but the cause was the runner paging. Sampling memory across the whole job showed where the memory went: the simulator's own first-boot work. This PR boots the simulator before the build, so that burst no longer lands in the paired test.

Evidence

The first sampled run, 39095765816 (green, sampling inside the test only):

  • About 2½ minutes into testPairApproveAndFollowUpThroughTheMac, six wallpaper poster extensions (Gradient, Weather, Kaleidoscope, Rhizome ×2, Mercury; 260–300 MB each) started at once.
  • They ran beside News and Fitness widgets, Health, Calendar and Shortcuts.
  • Free memory fell to 28% and swap rose from 0 to 942 MB in 30 s.
  • The fixture stalled for 37.9 s. The run passed only because no wait was open then.
  • The two red runs since Send the iPhone test's resume over a socket and log fixture stalls #265 (38890707807, 38898248332) stalled the same way, 29–31 s at nearly zero CPU. They failed at phone-side steps that don't need the Mac.

With this change (run 39097082261, two attempts):

Burst (lowest free) Paired test Longest fixture stall in it
attempt 1 24% at +3 min after boot, during the unit tests 8 min 51 s 2.2 s
attempt 2 25% at +3 min after boot, during pnpm install/build 7 min 2 s none ≥ 1 s
before (3 runs) during the paired test 10–14 min 29–38 s

Changes

  • ci.yml:
    • The simulator is picked, set to the on-screen keyboard, and booted (simctl boot) before pnpm install/build.
    • A sampler starts right after checkout.
    • A Memory low point step prints the job's worst moment.
  • Scripts/sample-memory.sh (new): records free memory, swap and the eight largest processes every 10 s into the uploaded iphone-test-results (memory.log). --summary prints the low point.
  • docs/status.md: the Known rough edges /resume entry gets the cause and the result.
  • docs/ios-companion.md: when the job fails, check memory first.

No test budget changed. test-e2e.sh is unchanged.

Verified: pnpm build && pnpm test passed locally. The setup-node workflow guard passes. The sampler and summary were exercised on their own. Three CI runs of this branch had the iPhone job green.

Coven-Harness: Claude Code / claude-opus-5-5

Since #265 the fixture logs every event-loop stall. The two failures since then (runs
38890707807 and 38898248332) were 29-31 s stalls with almost no CPU and 143-164 major page
faults, and their failing steps (lines 378 and 394) are phone-side UI steps that do not
need the Mac. So the whole runner was paging, not just the fixture.

With MODEX_IOS_MEMORY_LOG set, test-e2e.sh now records free memory, swap and the eight
largest processes every 10 s, and prints the lowest-free sample when it exits. CI sets it
inside the uploaded test-results folder, so green and red runs both show what holds the
runner's memory before anyone trims the job.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 18, 2026 5:35am UTC

Request Review

…the job

The first sampled run (39095765816) put the paired test's paging on the simulator's own
first-boot work. Two and a half minutes into the test, six wallpaper poster extensions,
each 260-300 MB, started at once beside News and Fitness widgets, Health and Calendar.
Free memory fell to 28%, swap went from 0 to 942 MB, and the fixture stalled for 38 s. That
run passed only because no assertion was waiting then. The two red runs stalled at the
same point in the test.

The job now picks the simulator and boots it before pnpm install and build, so that work
overlaps the build. A sampler started right after checkout records free memory, swap and
the eight largest processes every 10 s for the whole job, into the uploaded test results.
A last step prints the low point. test-e2e.sh is back to how it was.

Coven-Harness: Claude Code / claude-opus-5-5
Known rough edges: the iPhone /resume entry now names the cause (the simulator's
first-boot burst of wallpaper and widget extensions), the early boot that moves it into the
build, and the two runs since. docs/ios-companion.md says where to look for memory first when
the job fails: the memory.log artifact, the Memory low point step, and the fixture's stall
lines.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev marked this pull request as ready for review October 18, 2026 05:03
@github-code-quality

github-code-quality Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main cba0b06 ios-ci-memory d57663e +/-
62% 62% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 18, 2026 05:56 UTC

@BunsDev
BunsDev merged commit 89c98f2 into main Oct 18, 2026
11 checks passed
@BunsDev
BunsDev deleted the ios-ci-memory branch October 18, 2026 05:58
BunsDev added a commit that referenced this pull request Oct 18, 2026
Val decided on #290: Known rough edges keeps only open problems. Six fixed
incidents move, word for word, to docs/reviews/2026-10-18-resolved-rough-edges.md,
each under the PR that fixed it (#153, #189, #190, #197, #204, #265 and #271).
The section now links to them.

Entries with an open part stay: the layout e2e note, the demo-thread and sizing
test corrections whose causes are unproven, and the poisoned ChatGPT threads.
Also: node-pty's line says Modex still ships the beta, the demo-thread note no
longer waits on a merge that happened (#189), and the tracker pointers list the
open CF PRs after #289 landed.

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 18, 2026
…ycle 1) (#292)

* Record what shipped in plans, specs, README and status

Docs and plans steward, cycle 1 (#290).

- Plans: a status line on each ledger under docs/superpowers/plans/ and on
  docs/mac-store-preview-plan.md, naming the PRs and release that delivered it.
  Unticked boxes stay as history rather than being ticked after the fact.
- Specs: routines (Phases 0 and 1 on main), sticky Auto routing (shipped in
  v0.0.11) and approval rules (parts 1 and 2 shipped, gate off).
- README: app-owned sign-in, self-updating Macs from v0.0.12, Windows and Linux
  installers from v0.1.0, Images and Plugins no longer marked unreleased.
- status.md: the site's static fallback follows apps/site/release.json; the
  delivered release-candidates entry leaves In flight for a pointer to tracker
  #273; Next 3 points to #286.

Coven-Harness: Claude Code / claude-opus-5-5

* Bring reference docs in line with main and the releases

Docs and plans steward, cycle 1 (#290). Each change was checked against the
code on main, a release section of status.md or a review.

- Shipped work no longer reads as pending: the approval rules editor (v0.0.7),
  Modex sign-in (v0.0.9), 1Password filling (v0.0.11), the notes folder
  (v0.1.0), the hosted native updater scenarios and the first
  published-to-published upgrade, and Windows/Linux publication.
- Behaviour matches the code: Windows and Linux show no update banner; Auto's
  judge sees a placeholder for assistant replies and runs `jev` with one
  attempt; Claude's model list is Modex's fixed aliases; the Settings sections
  and transport labels; Space options → Agent notes; the companion's policy
  route and current version; the knowledge fence for overlapping folders; CI's
  e2e runs the unpackaged build.
- The Store record and processed 0.0.8 package are recorded under gate 5.

Coven-Harness: Claude Code / claude-opus-5-5

* Close the two finished In flight entries and add the GitHub App to Next

Val decided on #290: the local work recovery and retired worktrees entries
are done, so they leave In flight. The recovery audit and the archive
READMEs keep their record. Their one open item, repository authorization
through a GitHub App, becomes Next 4, ahead of the out-of-scope Cloud tasks.

Coven-Harness: Claude Code / claude-opus-5-5

* Move fixed rough edges into a dated review

Val decided on #290: Known rough edges keeps only open problems. Six fixed
incidents move, word for word, to docs/reviews/2026-10-18-resolved-rough-edges.md,
each under the PR that fixed it (#153, #189, #190, #197, #204, #265 and #271).
The section now links to them.

Entries with an open part stay: the layout e2e note, the demo-thread and sizing
test corrections whose causes are unproven, and the poisoned ChatGPT threads.
Also: node-pty's line says Modex still ships the beta, the demo-thread note no
longer waits on a merge that happened (#189), and the tracker pointers list the
open CF PRs after #289 landed.

Coven-Harness: Claude Code / claude-opus-5-5

* Move status.md's release sections into their release reviews

Val decided on #290: status.md keeps the Shipped table as the index, and each
release's details live in its review. The v0.0.6 to v0.1.0 sections (651 lines)
move unchanged to a "Status summary" section at the end of each review. Only link
targets change, so they resolve from docs/reviews/. status.md drops from 1,060 to
388 lines.

The Shipped rows now link their reviews. Four links that pointed at the old
release anchors now point at the reviews. A new convention and step 1 of the
release procedure say where a release's details go from now on.

Coven-Harness: Claude Code / claude-opus-5-5

* Trim the Mac App Store entry to its current state

Val decided on #290. The 52-line In flight entry becomes 15 lines: what Apple
shows, what signed acceptance covered, and what is open, each linked to its
receipt. The old entry moves unchanged to a "Status summary" section of the
October 11 signed-acceptance review, with links re-based to docs/reviews/.

The short entry drops two statements that no longer hold. The iPhone CI failures
have been diagnosed (resolved rough edges), and the Store recovery changes are
on main (edf52fc, #173).

Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

1 active deployment
Preview — d57663e8 Deployed Oct 18, 2026 by vercel[bot]
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