Skip to content

gate: nothing retightens the file-size baseline now that inherited drift is non-fatal (#2267) #2310

Description

@macanderson

Problem

PR #2267 makes the file-size ratchet judge the change rather than the tree: a file passes when current <= max(baseline ceiling, size at the merge base). That correctly stops merge skew from redding main (the #1761 / #1782 / #2003 shape). What it removes is the thing that used to force scripts/file-size-baseline.txt back down: inherited drift is now non-fatal, and persists green behind a stderr note (scripts/check-file-size.sh:316, line as of #2267's head).

Nothing guarantees convergence. Today it heals only by accident: any legitimate god-file growth runs make file-size-update, which regenerates every entry, incidentally retightening the drifted ones. That is a property of the file format, not a mechanism — a tree that goes a long time without a baseline raise accumulates ceilings that no longer describe it, and each stale ceiling is headroom a future PR can spend without review.

Definition of done

A mechanism that makes drift converge, chosen deliberately. Options worth weighing:

  • A periodic (CI cron or release-time) make file-size-update that opens a retightening PR when the regenerated baseline differs from the committed one.
  • A drift budget: the guard fails when a file's size at the base is more than N lines below its ceiling, forcing a retighten.
  • Retighten-on-touch: a PR that edits a drifted file must regenerate that file's entry.

Whichever is chosen, the note at check-file-size.sh:316 should say what will eventually close the gap rather than only reporting it.

Constraints discovered

  • The baseline is generated and gate-enforced; prose copies of the god-file list follow it (scripts/check-god-files.sh). A retightening mechanism must not require hand-edits to those copies.
  • make file-size-update rewrites the whole baseline, so any automated retighten lands as a reviewable baseline diff — that is the intended shape, per AGENTS.md.
  • Do not reintroduce a whole-tree verdict: judging the change is what fix(gate): the file-size ratchet judges the change, not the tree (#2004) #2267 fixed, and the drift problem must be solved without undoing it.

Refs #2267, #2004.

Metadata

Metadata

Assignees

Labels

P3Later — low urgency, backlogarea:ciGitHub Actions, release pipeline, packaging

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions