Remove file-budget guardrail

This commit is contained in:
2026-02-21 22:20:37 -08:00
parent 00170c6a75
commit 75c3b15792
8 changed files with 35 additions and 193 deletions

View File

@@ -88,7 +88,6 @@ bun run test:subtitle:dist # subtitle dist lane (currently placeholder)
Run guardrails locally before opening a PR:
```bash
bun run check:file-budgets:strict
bun run check:main-fanin:strict
bun run check:runtime-cycles:strict
```
@@ -112,10 +111,8 @@ Hotspot budget baselines (2026-02-22):
Troubleshooting guardrail failures:
- File budget hotspot failure: split logic by runtime/domain boundaries and keep orchestration facades thin.
- Main fan-in failure: move runtime imports behind `src/main/runtime/domains/*` or composer barrels.
- Runtime cycle failure: break bidirectional imports by extracting shared helpers into leaf modules.
- Optional broad-budget audit (legacy/global): run `bun run scripts/check-file-budgets.ts --strict --enforce-global`.
## Config Generation

View File

@@ -1,25 +1,18 @@
# File Size Budgets
# Maintainability Guardrails
Purpose: keep large modules from becoming maintenance bottlenecks.
Purpose: keep runtime composition boundaries maintainable.
## Current Budget
## Current Checks
- TypeScript source files in `src/` and `launcher/`
- Soft budget: `500` LOC
- Excludes generated bundle artifacts (for example `subminer`)
## Commands
- Warning mode (non-blocking): `bun run check:file-budgets`
- Strict mode (CI/local gate): `bun run check:file-budgets:strict`
- Custom limit: `bun run scripts/check-file-budgets.ts --limit 650`
- Main runtime fan-in (warning): `bun run check:main-fanin`
- Main runtime fan-in (strict): `bun run check:main-fanin:strict`
- Default main fan-in thresholds: `import lines <= 110`, `unique runtime paths <= 11`
- Runtime cycle check (warning): `bun run check:runtime-cycles`
- Runtime cycle check (strict): `bun run check:runtime-cycles:strict`
## Policy
- If file exceeds budget, prefer extracting domain module(s) first.
- Keep composition/orchestration files focused on wiring.
- Do not hand-edit generated artifacts; refactor source modules.
- Keep `src/main.ts` runtime import fan-in low by routing domain imports through `src/main/runtime/domains/*` and `src/main/runtime/registry.ts`.
- Avoid runtime import cycles by extracting shared helpers into leaf modules.

View File

@@ -64,3 +64,4 @@ Read first. Keep concise.
| `codex-task101-docs-archive-20260222T024156Z-hneu` | `codex-task101-docs-archive` | `Execute TASK-101 consolidate architecture docs and archive task-noise evidence` | `done` | `docs/subagents/agents/codex-task101-docs-archive-20260222T024156Z-hneu.md` | `2026-02-22T03:01:38Z` |
| `codex-fix-ci-20260222T025848Z-0xdl` | `codex-fix-ci` | `Inspect failing GitHub Actions PR checks and implement approved fix` | `done` | `docs/subagents/agents/codex-fix-ci-20260222T025848Z-0xdl.md` | `2026-02-22T03:25:40Z` |
| `opencode-task100-dead-code-prune-20260222T033155Z-qenz` | `opencode-task100-dead-code-prune` | `Execute TASK-100 dead-code prune and cleanup via writing-plans + executing-plans (no commit)` | `done` | `docs/subagents/agents/opencode-task100-dead-code-prune-20260222T033155Z-qenz.md` | `2026-02-22T04:00:41Z` |
| `codex-gh-fix-ci-20260222T054631Z-m4t8` | `codex-gh-fix-ci` | `Inspect failing GitHub Actions checks; propose fix plan before implementation` | `done` | `docs/subagents/agents/codex-gh-fix-ci-20260222T054631Z-m4t8.md` | `2026-02-22T06:11:15Z` |

View File

@@ -0,0 +1,26 @@
# Agent Log: codex-gh-fix-ci-20260222T054631Z-m4t8
- alias: codex-gh-fix-ci
- mission: Inspect failing GitHub Actions checks; propose fix plan before implementation.
- status: done
- last_update_utc: 2026-02-22T06:11:15Z
## Intent
- verify auth + resolve target PR/run
- collect failing check logs
- summarize root cause + propose fix plan
## Planned Files
- docs/subagents/INDEX.md
- docs/subagents/collaboration.md
- docs/subagents/agents/codex-gh-fix-ci-20260222T054631Z-m4t8.md
## Assumptions
- no branch PR; fallback to latest failed Actions runs on `main`
## Completed
- verified GH auth + inspected latest failed CI run on `main`
- removed `scripts/check-file-budgets.ts`
- removed `check:file-budgets*` npm scripts
- removed file-budget command from CI guardrail step
- updated active docs pages to stop referencing removed command

View File

@@ -89,3 +89,5 @@ Shared notes. Append-only.
- [2026-02-22T03:01:38Z] [codex-task101-docs-archive-20260222T024156Z-hneu|codex-task101-docs-archive] completed TASK-101: canonicalized runtime architecture wording in `docs/architecture.md`, trimmed duplicated architecture bullets in `docs/development.md`, converted `docs/structure-roadmap.md` to archival notice, `bun run docs:build` passed, and backlog TASK-101 finalized Done with AC/DoD evidence.
- [2026-02-22T03:32:21Z] [opencode-task100-dead-code-prune-20260222T033155Z-qenz|opencode-task100-dead-code-prune] starting TASK-100 via Backlog MCP + writing-plans/executing-plans; expected scope dead-code candidate report, safe removals, regression tests/gates, and backlog evidence updates.
- [2026-02-22T04:00:41Z] [opencode-task100-dead-code-prune-20260222T033155Z-qenz|opencode-task100-dead-code-prune] completed TASK-100 execution pass: removed confirmed dead imports/helpers/exports across Anki/core/renderer/provider modules, added dead-code report at `docs/reports/2026-02-22-task-100-dead-code-report.md`, verified build + core/config src tests + file-budget checks, and prepared Backlog finalization updates.
- [2026-02-22T05:46:31Z] [codex-gh-fix-ci-20260222T054631Z-m4t8|codex-gh-fix-ci] starting CI triage via gh-fix-ci skill; no branch PR found for `main`, falling back to latest failed GitHub Actions runs on `main` for root-cause summary + fix plan.
- [2026-02-22T06:11:15Z] [codex-gh-fix-ci-20260222T054631Z-m4t8|codex-gh-fix-ci] completed requested change: removed file-budget guardrail script + package scripts + CI invocation; retained main-fanin/runtime-cycle strict checks and updated active docs commands.