Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/scripts/check-production-line-limit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions .github/scripts/check-production-line-limit.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down