fix(ci): a removed layout writer no longer fails other PRs' ratchet check (#27557)

#27529 removed two main-process layout writers after the ratchet landed, so main's
baseline went stale and every PR failed the check. Prune the baseline and report a
shrunk count as a warning; only growth fails.
This commit is contained in:
Jinwoo Hong
2026-10-11 15:38:44 -04:00
committed by GitHub
parent 738e0e034b
commit a0b0328f99
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -3,10 +3,10 @@
# This is a RATCHET: counts may only go DOWN. Layout moves to one runtime owner; do not add
# writers. Prune after removing writers: pnpm check:layout-writer-ratchets --prune
1 src/main/ipc/pty/ipc/leaf-move.ts
2 src/main/ipc/pty/ipc/spawn-commit-persist.ts
1 src/main/ipc/pty/ipc/spawn-commit-persist.ts
1 src/main/ipc/pty/pane/pane-owner-replacement.ts
3 src/main/ipc/pty/pane/stable-owner.ts
2 src/main/ipc/pty/runtime/spawn-commit.ts
1 src/main/ipc/pty/runtime/spawn-commit.ts
1 src/main/ipc/renderer-shutdown-checkpoint.ts
1 src/main/ipc/runtime-environment-removal-cleanup.ts
1 src/main/ipc/runtime-environment-session-reconcile.ts
@@ -455,12 +455,13 @@ export function main(root = process.cwd()) {
`::error file=${file}::${now} ${ratchet.label}, baseline allows ${allowed}. ${ADVICE}`
)
}
// Why: a removal must not fail PRs that branched before it; only growth fails.
for (const { file, now, allowed } of shrunk) {
console.error(
`::error file=${file}::${now} ${ratchet.label}, baseline still allows ${allowed}. Run: pnpm check:layout-writer-ratchets --prune`
console.warn(
`::warning file=${file}::${now} ${ratchet.label}, baseline still allows ${allowed}. Run: pnpm check:layout-writer-ratchets --prune`
)
}
if (grown.length + shrunk.length > 0) {
if (grown.length > 0) {
failed = true
} else {
console.log(`Layout-writer ratchet (${ratchet.id}) OK — ${total(current)} ${ratchet.label}.`)