Skip to content

[Bug]: eleven of twelve file-size ratchet "generated" exemptions are hand-written files #4706

Closed

Description

@lidge-jun

Client or integration

Other

Area

Other

Summary

GENERATED_PATHS in scripts/file-size-ratchet.ts:31 exempts twelve paths from every size cap — evaluate() returns GENERATED before applying one, so those files may grow without bound.

Only src/adapters/cursor/gen/agent_pb.ts is actually generated (@generated by protoc-gen-es). The other eleven are hand-maintained: the nine gui/src/i18n/*.ts catalogues — en.ts describes itself as the TKey source of truth and is ~2,879 lines — plus docs-site/src/data/frontier-benchmarks.json (hand-maintained snapshots) and scripts/model-metadata.source.json (the input to the generator, not its output; the generated output src/generated/model-metadata.ts is 108 lines and is scanned normally).

Exempting data and i18n catalogues may well be the intended policy. Calling them "generated" is what invites the next hand-written file onto the list.

Reproduction

  1. Read scripts/file-size-ratchet.ts:31-44 and tests/fixtures/file-size-baseline.json:2-14.
  2. Open gui/src/i18n/en.ts:1-8 and read what the file says it is.
  3. Grow any exempt file by an arbitrary amount and run bun test tests/ci-workflows/file-size-ratchet.test.ts; it stays green.

Suggested fix: rename to EXEMPT_PATHS, or split generated / data / i18n into separate lists with the reason for each, and keep only agent_pb.ts classified as generated.

Version

2.56.0 (e4a8539)

Operating system

macOS 15.5

Logs or error output

(static analysis; no runtime output)

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. lidge-jun commented on Sep 15, 2026

    @lidge-jun
    OwnerAuthor

    리뷰 · 우선순위 62 / 80

    이 이슈는 파일 크기 ratchet의 GENERATED_PATHS 열두 항목 중 열하나가 실제 생성물이 아니라는 명명·정책 문제다. tip의 scripts/file-size-ratchet.ts 31–44행 목록을 보면 src/adapters/cursor/gen/agent_pb.ts만 protoc 생성물이고, 나머지 아홉 gui/src/i18n/*.ts와 docs-site/src/data/frontier-benchmarks.json, scripts/model-metadata.source.json(생성 입력이며 출력 src/generated/model-metadata.ts는 일반 스캔)은 손수 관리 파일이다. evaluate()가 이 목록이면 GENERATED로 크기 상한을 건너뛰므로, 이름만 ‘generated’인 채 무한 성장이 허용된다.

    런타임 버그는 아니다. i18n/데이터 카탈로그를 상한 밖으로 두는 정책 자체는 합리적일 수 있다. 문제는 그 정책을 ‘generated’라고 부르는 순간, 다음 손수 파일이 같은 목록에 섞이기 쉽다는 점이다. gui/src/i18n/en.ts 머리 주석도 TKey 정본이라고 스스로 말한다. baseline fixture와 테스트가 이 목록을 그대로 믿으면 이름만 고치는 PR도 fixture를 같이 건드려야 한다.

    우선순위는 중하. 고드파일 캠페인·file-size ratchet 신뢰성과는 맞닿지만, 사용자 트래픽이나 릴리스 차단 사유는 아니다.

    라인 scripts/file-size-ratchet.ts 31–44 - GENERATED_PATHS에 hand-written 11개가 포함.
    경로 tests/fixtures/file-size-baseline.json - 같은 면제 목록을 고정.
    경로 gui/src/i18n/en.ts - 생성물이 아니라 TKey 소스라고 명시.
    경로 scripts/model-metadata.source.json - 생성기 입력인데 GENERATED로 분류.

    메인테이너의 판단이 필요한 지점

    • 이름을 EXEMPT_PATHS로만 바꿀지, generated/data/i18n으로 나눌지.
    • i18n에 soft cap을 둘지 완전 면제를 유지할지.
    • baseline fixture 갱신 규칙을 같은 PR에 넣을지.

    너의 추천
    받아라. 이름·분류를 고치는 작은 chore PR로 충분하다. agent_pb.ts만 generated로 남기고 나머지는 이유 달린 exempt 목록으로 분리하라.

    이 댓글은 grok-bot이 작성했습니다

  2. added 2 commits that reference this issue on Sep 16, 2026
  3. lidge-jun commented on Sep 16, 2026

    @lidge-jun
    OwnerAuthor

    Landed via #4757 at 9af2b0c

  4. lidge-jun commented on Sep 16, 2026

    @lidge-jun
    OwnerAuthor

    Landed via #4757 at 2ace217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglanded-via-maintainerOriginal PR closed after landing via a maintainer merge train

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions