[Bug] DeckNotifier sits at exactly its class-size ceiling, 1307 of 1307 #630

Closed
opened 2026-07-22 16:21:56 +00:00 by brenno · 0 comments
Owner

Found in the pre-publication test review, measured empirically. Relates to #518 (structural debt) but filed separately so it can be closed on its own.

Evidence: in a throwaway worktree on clean HEAD, adding five empty methods to lib/state/deck_provider_auto.dart produces DeckNotifier: 1312 lines (ceiling 1307). HEAD therefore sits at the ceiling with zero headroom. This was also observed in the live working copy: thirteen lines of unrelated work from a parallel session turned make check-conventions red with 1319 lines (ceiling 1307).

The baseline has not been raised since 0e6fb84b, so the ratchet is holding — but the error message reads "or deliberately raise the line in classSizeBaseline", which is exactly what someone under time pressure will do.

Why this matters now: the first outside contribution that adds anything to the deck provider gets a red gate about class size that has nothing to do with their change, plus an invitation to widen the ratchet. At a public launch that is the shortest route from "good first impression" to "that baseline is only a number anyway".

Proposal: before launch, lift one coherent chunk of behaviour out of DeckNotifierdeck_provider_miauw.dart (23 lines) or deck_provider_ai.dart are candidates — into its own class or service, and lower the baseline to the new figure. Fifty lines of headroom is enough.

Found in the pre-publication test review, measured empirically. Relates to #518 (structural debt) but filed separately so it can be closed on its own. **Evidence:** in a throwaway worktree on clean HEAD, adding five empty methods to `lib/state/deck_provider_auto.dart` produces `DeckNotifier: 1312 lines (ceiling 1307)`. HEAD therefore sits at the ceiling with **zero** headroom. This was also observed in the live working copy: thirteen lines of unrelated work from a parallel session turned `make check-conventions` red with `1319 lines (ceiling 1307)`. The baseline has not been raised since `0e6fb84b`, so the ratchet is holding — but the error message reads "or deliberately raise the line in classSizeBaseline", which is exactly what someone under time pressure will do. **Why this matters now:** the first outside contribution that adds anything to the deck provider gets a red gate about class size that has nothing to do with their change, plus an invitation to widen the ratchet. At a public launch that is the shortest route from "good first impression" to "that baseline is only a number anyway". **Proposal:** before launch, lift one coherent chunk of behaviour out of `DeckNotifier` — `deck_provider_miauw.dart` (23 lines) or `deck_provider_ai.dart` are candidates — into its own class or service, and lower the baseline to the new figure. Fifty lines of headroom is enough.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
LibreKAT/Ocideck#630
No description provided.