Skip to content

Sync speed: 35-second sync check, Test Web on 4 runners, Mac build during sync CI - #57

Merged
ziyadakl merged 5 commits into
custom-v2from
spec107/sync-speed
Nov 3, 2026
Merged

ziyadakl merged 5 commits into
custom-v2from
spec107/sync-speed

Conversation

@ziyadakl

@ziyadakl ziyadakl commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

Makes a sync (bringing Upstream into the Fork) faster with today's safety. Measured on the 2026-11-03 trial merge: ziyadakl/tokenmaxxing#107, branch proto/sync-speed.

 sync-upstream.sh check
-  ensure:electron, knip, vp check, typecheck, lint:mobile   one after another
-  web build + fork-name search
-  touched tests, one package at a time                     20-30 min in all
+  native-rule drift guard; fail if the Fork edits a native mobile file
+  ensure:electron
+  knip | vp check | typecheck | lint:mobile                side by side
+  web build + fork-name search                             about 35-40 s in all
 CI (ci.yml)
-  Test Web on 1 runner                                     489-683 s
+  Test Web on 4 runners, shard 1 also runs attachment previews + boot
+  sync/upstream-* branches skip the macOS lint (the Fork edits no native file)
 apps/web/vite.config.ts
+  browser project: retry: process.env.CI ? 1 : 0          Ziyad's sign-off, 2026-11-03
 custom-mac-build.yml
-  push: custom-v2
+  push: custom-v2, sync/upstream-*                         build ready at the fast-forward merge

Not ported from the prototype on purpose: the split Test job and 10 one-runner server shards. Upstream edited ci.yml 20 times in the last 30 days, and the Fork's diff there was 28 lines. The extra jobs also queued for runners: the second prototype shape ended at 331 s, against 346 s for the first.

The 22-second figure Ziyad picked is the side-by-side part. The web build runs after it, because its probe config would show up in knip and vp check, so the whole check takes about 35 s.

The companion change in ziyadakl/tokenmaxxing makes switch-build.sh install a build whose commit is on custom-v2.

Evidence

  • Before: check, as documented, took 20-30 min. Test Web took 489 s and 683 s in runs 41601964186 and 41600312661.
    After: the new check ran on today's real merge (cefb544 into custom-v2, commit 57236a8) on affinity-vps in 35 s, exit 0. Timings: knip 23 s, vp check 13 s and typecheck 5 s side by side, then the web build.
  • bash scripts/custom/sync-upstream.test.sh: 22 ok, all passed. New cases:
    • fork_native_files: the Fork's own native file, an Upstream native file the Fork edits, and a bad ref.
    • native_rule_matches: the real ci-changes.cjs, and a widened one.
    • run_parallel: the order of results, a failure's output, kept logs, exit codes under set -e, and that the commands run at the same time.
  • shellcheck is clean, and vp check, vpr typecheck and knip:check pass on this branch.
  • This PR's CI is the first run of the 4-way Test Web split.

Merge Danger

Door: two-way

Every change is in CI config, the Fork's own sync script and one test-config line. Reverting the PR restores the old behaviour. Nothing touches the built app or user data.

Blast Radius: CI

  • A broken split would fail Test Web on every pull request.
  • The macOS lint is skipped only on sync/upstream-* branches. check fails if the Fork ever edits a native mobile file, or if Upstream changes the native-file rule.
  • The browser retry could pass a real flaky bug on the second try. Ziyad accepted that.

🤖 Generated with Claude Code

claude and others added 4 commits November 3, 2026 10:29
…ring sync CI

- sync-upstream.sh check runs knip, vp check and typecheck side by side, then the web build;
  the touched tests are gone (CI runs every test). It fails when the fork edits a native
  mobile file. Measured 22 s for the side-by-side part against 20-30 min before.
- ci.yml: Test Web splits over 4 runners (it took 8-11 min on one); sync/upstream-* branches
  skip the macOS lint, whose runner queued 10+ min in 3 of 3 runs on 2026-11-03.
- web browser tests retry a failed test once in CI: the split showed one flaky browser test
  in 2 of 3 runs, each passing alone.
- custom-mac-build.yml also builds sync/upstream-* branches, so a fast-forward merge finds
  its build ready.

Measurements: ziyadakl/tokenmaxxing#107, branch proto/sync-speed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…guard, run_parallel keeps exit codes and logs

- CUSTOM.md: a sync merges by fast-forward when CI is green and Ziyad says merge; the retry
  seam names apps/web/vite.config.ts and records Ziyad's 2026-11-03 sign-off (AGENTS.md bans
  retries otherwise).
- sync-upstream.sh: check fails when MOBILE_NATIVE in ci-changes.cjs no longer matches the
  fork's copy; run_parallel writes each status under set -e and keeps the logs of a failure.
- ci.yml: the Test Web shard count has one source (strategy.job-total).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 3, 2026
… still on

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ziyadakl
ziyadakl merged commit 91588c5 into custom-v2 Nov 3, 2026
50 of 52 checks passed
@ziyadakl
ziyadakl deleted the spec107/sync-speed branch November 3, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants