Repository navigation
Closed
Labels
area:devtoolsDevtools and repo control-plane toolingphase:architectureArchitecture and design spinetype:featNew feature
Description
Parent
Part of #401. Pattern application from #429. Complements #419 (oversized contract suites).
Problem
Polylogue has several modules and tests that grew past sustainable size: pipeline_probe.py (1,468 LOC), proof/runners.py (1,339 LOC), several test files at 2,000+ LOC. #419 splits the worst offenders, but nothing prevents the next file from accreting in the same shape.
A YAML budget + lint catches accretion on the first commit that crosses a ceiling.
Target
# docs/plans/file-size-budgets.yaml
defaults:
source_loc_ceiling: 800
test_loc_ceiling: 1200
per_package:
devtools/:
source_loc_ceiling: 1000 # devtools modules tend to be larger
tests/unit/:
test_loc_ceiling: 1200
exceptions:
- path: devtools/pipeline_probe.py
ceiling: 1500
until: "#419"
reason: "tracked split into pipeline-probe sub-modules"
- path: polylogue/proof/runners.py
ceiling: 1500
until: "#421"
reason: "tracked split into per-evidence-family runners"
- path: tests/unit/sources/test_source_laws.py
ceiling: 2500
until: "#403"
reason: "tracked split per #403"devtools verify-file-budgets walks every file, looks up the ceiling (specific exception → per-package default → global default), fails on any file over budget.
Exceptions name a sunset issue. When the issue closes, the exception fails the lint until it is removed.
Why this matters
- Catches accretion early. A new module that grows past 800 LOC fails the next commit.
- Documented exceptions. The list of "tolerated big files" is auditable, not folk memory.
- Pairs with refactor(tests): split oversized contract suites #419. refactor(tests): split oversized contract suites #419 splits the existing offenders; this issue prevents the regression.
Acceptance criteria
docs/plans/file-size-budgets.yamlexists with defaults + the current realistic exceptions.devtools/verify_file_budgets.pyexists, runs in under 1s, reports overages with file:line cite of the file (not line of the lint).- Wired into
devtools verify --quick. - Exceptions are short-circuited when their
untilissue closes; lint fails on stale exceptions.
Related
- feat(devtools): make architectural cohesion executable #429 — pattern source.
- refactor(tests): split oversized contract suites #419 — splits existing oversized contract suites.
- feat(devtools): evidence-driven structural specification — cross-cut manifest, witness, dashboard #432 — evidence-driven structural specification (sibling pattern).
- chore: track post-renewal consolidation and architectural cohesion #401 — post-renewal consolidation umbrella.
Metadata
Metadata
Assignees
Labels
area:devtoolsDevtools and repo control-plane toolingphase:architectureArchitecture and design spinetype:featNew feature
Activity
feat(devtools): make architectural cohesion executable (Phase 1 of #429…
feat(devtools): file-size budgets per package and module
feat(devtools): file-size budgets per package and module
feat(devtools): test-ownership manifest with import-resolution
feat(devtools): file-size budgets per package and module
feat(devtools): test-ownership manifest with import-resolution
feat(devtools): migration-completeness manifest
feat(devtools): file-size budgets per package and module (#442)
feat(devtools): test-ownership manifest with import-resolution
feat(devtools): test-ownership manifest with import-resolution (#450)
feat(devtools): migration-completeness manifest
feat(devtools): migration-completeness manifest (#451)
chore: delete one orphan re-export shim (#452)
feat(devtools): verify-cross-cuts lint (Phase 1 of #432)
feat(devtools): verify-cross-cuts lint (Phase 1 of #432) (#457)
feat(devtools): make architectural cohesion executable (Phase 1 of #429…
feat(devtools): file-size budgets per package and module (#442)
feat(devtools): test-ownership manifest with import-resolution (#450)
feat(devtools): migration-completeness manifest (#451)
chore: delete one orphan re-export shim (#452)
feat(devtools): verify-cross-cuts lint (Phase 1 of #432) (#457)