Skip to content

fix(ci): code-size ratchet trips because the workspace clippy gate's cfg-gate comments grew two oversized files #209

Closed

Description

@KooshaPari

Summary

The workspace clippy gate (PR #190) added narrow #[cfg(...)] gates to jcode-setup-hints and jcode-telemetry-core so the --all-targets test build no longer sees unused imports and dead code. Splitting one import into two, and documenting why, grew both files past their code-size baseline, so the "Enforce oversized-file ratchet" gate failed on master:

Code-size budget exceeded. Existing oversized Rust files must shrink or stay flat,
and new oversized production files are not allowed:
  - oversized file grew: crates/jcode-setup-hints/src/lib.rs (2654 -> 2660 LOC)
  - oversized file grew: crates/jcode-telemetry-core/src/lib.rs (2610 -> 2629 LOC)

Both files are over the ratchet's 1200 LOC threshold, so it requires them to stay flat or shrink. The growth was almost entirely explanatory comment, so this compresses those comments rather than moving the baseline.

File before after baseline
crates/jcode-setup-hints/src/lib.rs 2660 2650 2654
crates/jcode-telemetry-core/src/lib.rs 2629 2609 2610

python3 scripts/check_code_size_budget.py now exits 0 and reports both files as shrank.

What was NOT changed

  • The diff is comment-only. Verified mechanically: git diff | grep -E "^[+-]" | grep -vE "^(\+\+\+|---)" | grep -vE "^[+-]\s*(//|$)" returns zero lines. No code line was added, removed or altered.
  • No #[cfg(...)] gate was removed, added or weakened.
  • No test assertion was removed, weakened or skipped.
  • scripts/code_size_budget.json is deliberately NOT updated. The ratchet is the contract; the fix is to make the code smaller, not to move the goalposts.

Why comment-compression and not --update

scripts/check_code_size_budget.py --update would have made the gate pass in one command, but it would also silently re-baseline every oversized file in the repo — destroying the ratchet's ability to catch future growth. The gate's own message says to run --update "only after intentional cleanup"; this PR is that cleanup, performed on the two files that actually grew.

Evidence

Activity

  1. coderabbitai commented on Oct 28, 2026

    @coderabbitai
    🔗 Related PRs

    #190 - fix(ci): give the desk-linux build cold-cache timeout budgets (PR #169 sibling) [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    kilo-triaged
    on Oct 28, 2026
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

    kilo-triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions