Problem
Recurring CI friction: PRs pass Mac local pre-push but fail Linux CI on ts-eslint-baseline-ratchet because the platform baselines drift independently and the Mac pre-push hook only verifies the active platform's baseline.
Recent occurrences
The pattern: any PR that touches a TS file in a way that changes the lint count fixes the Mac baseline locally (precommit catches it) but ships with a stale Linux baseline. CI surfaces the issue 80+ seconds into the GH Actions run, then the dev has to push another commit, wait again, etc.
Why the platforms differ
The Linux CI parser fails on parserOptions.project for several files (e.g. workers/continuum-core/bindings/test-{ffi,ipc,voice-loop}.ts, workspace/interpretability-pipeline/init.ts). These appear as "errors" in the count but only on Linux because of differences in how @typescript-eslint/parser resolves project paths there.
Two fix shapes:
Option A — Make pre-push verify BOTH baselines
scripts/ratchets/check-eslint-baseline.sh runs once per platform via PLATFORM_BASELINE_FILE. Add a second pass that also reads the OTHER platform's baseline (in addition to the active one) and warns if the delta from the active platform's count would also break that baseline. Doesn't catch cases where the actual lint count differs between platforms (the parserOptions.project issue), but catches the common case where a deletion is applied to one baseline but not the other.
Option B — Fix the platform skew
Add the missing files to the relevant tsconfig.json include arrays so parserOptions.project resolves them on Linux too. Then the actual count should match across platforms and a single baseline file is enough. Requires per-file investigation but unblocks Option A naturally because the platforms stop drifting.
Option C — Auto-mirror in precommit
When precommit verifies the Mac baseline, also update the Linux baseline to the same value (since the structural -delta is symmetric across platforms). Skip when files in src/eslint-baseline.linux.txt's "Linux only" set are touched. Lower-friction but adds magic.
Recommendation
Start with Option B (fix the underlying parser-options issue) since it's the root cause. If after that the platforms still drift, reach for Option A as the safety net.
Acceptance
- After the fix, no PR should require a follow-up commit to ratchet a platform baseline that the local pre-push didn't catch.
- Document any remaining platform-specific lint behavior in the baseline-files' headers.
Problem
Recurring CI friction: PRs pass Mac local pre-push but fail Linux CI on
ts-eslint-baseline-ratchetbecause the platform baselines drift independently and the Mac pre-push hook only verifies the active platform's baseline.Recent occurrences
eslint-baseline.linux.txtafter the Mac baseline was already correct.ts-eslint-baseline-ratchetfailed:Baseline: 5456 errors, Current: 5455 errors, Delta: -1 fewer error(s). Same shape — a deletion that improved the Linux count but the Mac dev didn't know.The pattern: any PR that touches a TS file in a way that changes the lint count fixes the Mac baseline locally (precommit catches it) but ships with a stale Linux baseline. CI surfaces the issue 80+ seconds into the GH Actions run, then the dev has to push another commit, wait again, etc.
Why the platforms differ
The Linux CI parser fails on
parserOptions.projectfor several files (e.g.workers/continuum-core/bindings/test-{ffi,ipc,voice-loop}.ts,workspace/interpretability-pipeline/init.ts). These appear as "errors" in the count but only on Linux because of differences in how@typescript-eslint/parserresolves project paths there.Two fix shapes:
Option A — Make pre-push verify BOTH baselines
scripts/ratchets/check-eslint-baseline.shruns once per platform viaPLATFORM_BASELINE_FILE. Add a second pass that also reads the OTHER platform's baseline (in addition to the active one) and warns if the delta from the active platform's count would also break that baseline. Doesn't catch cases where the actual lint count differs between platforms (theparserOptions.projectissue), but catches the common case where a deletion is applied to one baseline but not the other.Option B — Fix the platform skew
Add the missing files to the relevant
tsconfig.jsonincludearrays soparserOptions.projectresolves them on Linux too. Then the actual count should match across platforms and a single baseline file is enough. Requires per-file investigation but unblocks Option A naturally because the platforms stop drifting.Option C — Auto-mirror in precommit
When precommit verifies the Mac baseline, also update the Linux baseline to the same value (since the structural -delta is symmetric across platforms). Skip when files in
src/eslint-baseline.linux.txt's "Linux only" set are touched. Lower-friction but adds magic.Recommendation
Start with Option B (fix the underlying parser-options issue) since it's the root cause. If after that the platforms still drift, reach for Option A as the safety net.
Acceptance