From f66901b51ade40681077323af5db57b007bda705 Mon Sep 17 00:00:00 2001 From: Adif Sgaid <69080239+adifsgaid@users.noreply.github.com> Date: Mon, 12 Oct 2026 21:44:14 +0200 Subject: [PATCH 1/2] fix(ci): repair the main-process sync-launch ratchet's imports check-main-sync-spawn-ratchet.mjs (#27756) imported diffCounts, formatBaseline, parseBaseline and parseBaselineNotes from check-focus-read-ratchet.mjs, but #27788 had already moved them to ratchet-baseline.mjs under their Count names. The script threw on import, so the gate, audit:code-quality:native and pnpm lint all failed on main. It now imports the helpers from where they live. The baseline entry for mobile-notification-dismissal-store.ts is pruned with the script's own --prune: #27731 removed that launch minutes before the ratchet merged. --- config/main-sync-spawn-baseline.txt | 1 - config/scripts/check-main-sync-spawn-ratchet.mjs | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/config/main-sync-spawn-baseline.txt b/config/main-sync-spawn-baseline.txt index 14a347ff7725..29f7942a633e 100644 --- a/config/main-sync-spawn-baseline.txt +++ b/config/main-sync-spawn-baseline.txt @@ -57,7 +57,6 @@ 1 src/main/pwsh.ts 3 src/main/runtime/device-registry.ts 1 src/main/runtime/e2ee-keypair.ts -1 src/main/runtime/mobile-notification-dismissal-store.ts 1 src/main/runtime/push/push-unregister-outbox.ts 1 src/main/runtime/relay/relay-region-preference.ts 1 src/main/runtime/relay/relay-revoke-outbox.ts diff --git a/config/scripts/check-main-sync-spawn-ratchet.mjs b/config/scripts/check-main-sync-spawn-ratchet.mjs index b5e2be3a49ff..3d2cf12bba0b 100644 --- a/config/scripts/check-main-sync-spawn-ratchet.mjs +++ b/config/scripts/check-main-sync-spawn-ratchet.mjs @@ -4,10 +4,10 @@ import { pathToFileURL } from 'node:url' import ts from 'typescript-api' import { diffCounts, - formatBaseline, - parseBaseline, - parseBaselineNotes -} from './check-focus-read-ratchet.mjs' + formatCountBaseline, + parseCountBaseline, + parseCountNotes +} from './ratchet-baseline.mjs' import { literalString, propertyName, unwrap } from './static-module-specifiers.mjs' import { isTestOnlySourcePath } from './test-only-source-path.mjs' @@ -392,7 +392,7 @@ export function main(root = ROOT) { const { counts, symbols } = countSyncSpawnUses(collectSyncSpawnSources(root)) const { grown, shrunk } = diffCounts( counts, - parseBaseline(readFileSync(path.join(root, BASELINE_PATH), 'utf8')) + parseCountBaseline(readFileSync(path.join(root, BASELINE_PATH), 'utf8')) ) for (const { file, now, allowed } of grown) { console.error( @@ -419,12 +419,12 @@ export function prune(root = ROOT) { const { counts } = countSyncSpawnUses(collectSyncSpawnSources(root)) // Lowers entries only; growth still has to be fixed in the code. const pruned = new Map( - [...parseBaseline(text)].map(([file, allowed]) => [ + [...parseCountBaseline(text)].map(([file, allowed]) => [ file, Math.min(allowed, counts.get(file) ?? 0) ]) ) - writeFileSync(baselineFile, formatBaseline(pruned, BASELINE_HEADER, parseBaselineNotes(text))) + writeFileSync(baselineFile, formatCountBaseline(pruned, BASELINE_HEADER, parseCountNotes(text))) console.log(`Pruned ${BASELINE_PATH} to ${total(pruned)} use(s).`) } From c8a5aacac44e6b9411417a5e55014853b7115f3d Mon Sep 17 00:00:00 2001 From: Adif Sgaid <69080239+adifsgaid@users.noreply.github.com> Date: Mon, 12 Oct 2026 21:44:39 +0200 Subject: [PATCH 2/2] chore(ratchet): baseline the two sync launches that predate the ratchet pty-process-ceiling.ts and pty-process-ceiling-runtime.ts each gained one runProcessSync in #27769, merged twelve hours before the ratchet (#27756), so its baseline never listed them. Both run in the daemon process, like the other daemon entries here. With them listed the gate passes again; converting them to runProcess would also clear it. --- config/main-sync-spawn-baseline.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/main-sync-spawn-baseline.txt b/config/main-sync-spawn-baseline.txt index 29f7942a633e..c9ab24eb4358 100644 --- a/config/main-sync-spawn-baseline.txt +++ b/config/main-sync-spawn-baseline.txt @@ -24,6 +24,8 @@ 1 src/main/daemon/daemon-process-identity-query.ts 1 src/main/daemon/daemon-process-start-time.ts 1 src/main/daemon/daemon-user-manager-lifetime.ts +1 src/main/daemon/pty-process-ceiling-runtime.ts +1 src/main/daemon/pty-process-ceiling.ts 1 src/main/daemon/pty-subprocess/shell-launch-plan.ts 1 src/main/emulator/serve-sim-runtime-materializer.ts 1 src/main/git/command-runner/git-exec-file.ts