From 72d39fd808305e39206457eed90b6374ffd8cc47 Mon Sep 17 00:00:00 2001 From: repo-worker-tmp-code-b Date: Thu, 12 Nov 2026 03:24:53 -0600 Subject: [PATCH] fix(ci): preserve production-line exemptions after ID crate move --- .../scripts/check-production-line-limit.sh | 15 +++++++----- .../check-production-line-limit.test.sh | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/.github/scripts/check-production-line-limit.sh b/.github/scripts/check-production-line-limit.sh index a2cc7040ee..5e4c8058dc 100755 --- a/.github/scripts/check-production-line-limit.sh +++ b/.github/scripts/check-production-line-limit.sh @@ -34,15 +34,18 @@ declare -A GRANDFATHERED=( # Grandfathered 2026-11-11 in the #7089 re-arm landing: each file # below was already over the limit when the guard's triggers were # restored, so it is grandfathered with a linked split issue, - # per this guard's convention. The entry is deleted in the same - # PR that lands the split. + # per this guard's convention. The four id-worlds files moved from + # pkgs/id/src/ in #4408; keep their exact current paths here or the + # path-keyed exemptions stop matching. The boards file is separately + # tracked by #8891. Delete each entry in the PR that lands its split. ["pkgs/fleet/crates/fleet-queue/src/client.rs"]="#8588" ["pkgs/fleet/crates/fleet-queue/src/turso_queue.rs"]="#8589" ["pkgs/id/src/commands/serve.rs"]="#8590" - ["pkgs/id/src/directory.rs"]="#8591" - ["pkgs/id/src/world/actor.rs"]="#8592" - ["pkgs/id/src/world/core.rs"]="#8593" - ["pkgs/id/src/world_session/mod.rs"]="#8594" + ["pkgs/id/crates/id-worlds/src/directory.rs"]="#8591" + ["pkgs/id/crates/id-worlds/src/world/actor.rs"]="#8592" + ["pkgs/id/crates/id-worlds/src/world/core.rs"]="#8593" + ["pkgs/id/crates/id-worlds/src/world_session/mod.rs"]="#8594" + ["pkgs/id/src/boards.rs"]="#8891" ) # Count production lines of one file: every line that is not part of diff --git a/.github/scripts/check-production-line-limit.test.sh b/.github/scripts/check-production-line-limit.test.sh index 959aa6b774..7a7fe821ef 100755 --- a/.github/scripts/check-production-line-limit.test.sh +++ b/.github/scripts/check-production-line-limit.test.sh @@ -37,6 +37,29 @@ bash "$SCRIPT" "$TMP/ok" >"$TMP/ok.out" grep -q "production-line-guard: OK" "$TMP/ok.out" echo "pass: compliant tree passes" +# The four split-tracked id-worlds modules were moved by #4408 after +# their grandfather entries were added, and boards.rs has its own split +# issue (#8891). Exact current paths stay grandfathered; a nearby +# untracked module must still fail under the unchanged 2500-line limit. +mkdir -p "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/world" "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/world_session" "$TMP/grandfathered/pkgs/id/src" +gen "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/directory.rs" 2501 +gen "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/world/actor.rs" 2501 +gen "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/world/core.rs" 2501 +gen "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/world_session/mod.rs" 2501 +gen "$TMP/grandfathered/pkgs/id/src/boards.rs" 2501 +gen "$TMP/grandfathered/pkgs/id/crates/id-worlds/src/world/actor_extra.rs" 2501 +if bash "$SCRIPT" "$TMP/grandfathered" >"$TMP/grandfathered.out" 2>&1; then + echo "FAIL: guard accepted an untracked over-limit module" >&2 + exit 1 +fi +grep -q "GRANDFATHERED pkgs/id/crates/id-worlds/src/directory.rs: 2501 production lines.*#8591" "$TMP/grandfathered.out" +grep -q "GRANDFATHERED pkgs/id/crates/id-worlds/src/world/actor.rs: 2501 production lines.*#8592" "$TMP/grandfathered.out" +grep -q "GRANDFATHERED pkgs/id/crates/id-worlds/src/world/core.rs: 2501 production lines.*#8593" "$TMP/grandfathered.out" +grep -q "GRANDFATHERED pkgs/id/crates/id-worlds/src/world_session/mod.rs: 2501 production lines.*#8594" "$TMP/grandfathered.out" +grep -q "GRANDFATHERED pkgs/id/src/boards.rs: 2501 production lines.*#8891" "$TMP/grandfathered.out" +grep -q "OVER LIMIT pkgs/id/crates/id-worlds/src/world/actor_extra.rs: 2501 production lines" "$TMP/grandfathered.out" +echo "pass: moved split-tracked paths are grandfathered narrowly" + # Violating tree: one synthetic over-limit production file. mkdir -p "$TMP/bad/pkgs/id/src" gen "$TMP/bad/pkgs/id/src/huge.rs" 2501