diff --git a/.gitignore b/.gitignore index b0356165..b8183a08 100644 --- a/.gitignore +++ b/.gitignore @@ -407,3 +407,6 @@ billsplit/ios/ billsplit/macos/ billsplit/windows/ billsplit/linux/ + +# TypeScript incremental build cache - generated, never useful in a diff. +*.tsbuildinfo diff --git a/bucket_catch/packages/frontend/tsconfig.tsbuildinfo b/bucket_catch/packages/frontend/tsconfig.tsbuildinfo deleted file mode 100644 index b84b6e7e..00000000 --- a/bucket_catch/packages/frontend/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"root":["./src/App.tsx","./src/main.tsx","./src/types.ts","./src/components/DropZone.tsx","./src/components/GameCanvas.tsx","./src/components/ModeSelect.tsx","./src/components/PuzzleCanvas.tsx","./src/components/PuzzleResult.tsx","./src/components/ScoreScreen.tsx","./src/hooks/useBasketControl.ts","./src/hooks/useGameLoop.ts","./src/hooks/usePuzzleGameLoop.ts","./src/lib/fileIcon.ts","./src/lib/sliceImage.ts","./src/lib/uploadFiles.ts","./src/lib/zipDownload.ts","./vite.config.ts"],"version":"5.8.3"} diff --git a/docs/superpowers/evidence/usage-report-drop-import-barrel-2026-08-17.json b/docs/superpowers/evidence/usage-report-drop-import-barrel-2026-08-17.json new file mode 100644 index 00000000..67250087 --- /dev/null +++ b/docs/superpowers/evidence/usage-report-drop-import-barrel-2026-08-17.json @@ -0,0 +1,38 @@ +{ + "intent": "Make usage_report.py import _fmt_h from the module that actually owns it, instead of reaching it through _usage_report_render, and stop tracking a generated TypeScript build cache.", + "scope": [ + "usage_report.py:43 - one import line split in two", + ".gitignore - ignore *.tsbuildinfo", + "bucket_catch/packages/frontend/tsconfig.tsbuildinfo - removed from tracking (file left on disk)", + "Non-goal: any behaviour change; no other module touched" + ], + "changes": [ + "Split 'from _usage_report_render import _fmt_h, _render_report' into an import of _fmt_h from _usage_report_format and _render_report from _usage_report_render. After the previous commit's split, _fmt_h lives in the format module and the render module merely re-imports it for its own use in _methodology_section - so the old line made _usage_report_render a re-export barrel, which the brief explicitly rules out. The previous commit's message claimed no barrel existed; that claim was wrong and this commit makes it true.", + "git rm --cached on bucket_catch/packages/frontend/tsconfig.tsbuildinfo and added *.tsbuildinfo to .gitignore. It is a generated incremental-build cache that was tracked in a repo which otherwise blocks binaries, and it had been showing as dirty in every commit this session, forcing pre-commit to stash on each one." + ], + "verification": [ + { + "command": "pytest linux_configuration/tests/", + "result": "pass", + "evidence": "143 passed, unchanged from before the import change." + }, + { + "command": "python usage_report.py --date --top 1 --no-clipboard --no-update-state --quiet", + "result": "pass", + "evidence": "Generated a full report from today's real atop logs (28 samples). This is the check that matters for an import change: a wrong module path is a runtime ImportError that unit tests importing the modules directly would not necessarily surface." + }, + { + "command": "git check-ignore -v bucket_catch/packages/frontend/tsconfig.tsbuildinfo", + "result": "pass", + "evidence": "Reports '.gitignore:412:*.tsbuildinfo', so the new rule matches the file that was previously tracked." + } + ], + "risks": [ + "None for the import: _fmt_h is the same function object either way, and the module that defines it has no side effects at import time beyond two integer constants.", + "Untracking tsbuildinfo means a fresh clone builds without a warm incremental cache. That is the intended behaviour for a build artifact and costs one slower first `tsc -b`." + ], + "rollback": [ + "git revert the commit. usage_report.py returns to the single combined import (still functional, just routed through the barrel), and tsconfig.tsbuildinfo becomes tracked again.", + "After rollback, confirm pytest linux_configuration/tests still reports 143 passed and that usage_report.py still runs." + ] +} diff --git a/linux_configuration/scripts/periodic_background/system-maintenance/bin/usage_report.py b/linux_configuration/scripts/periodic_background/system-maintenance/bin/usage_report.py index 207cc042..3960ab60 100755 --- a/linux_configuration/scripts/periodic_background/system-maintenance/bin/usage_report.py +++ b/linux_configuration/scripts/periodic_background/system-maintenance/bin/usage_report.py @@ -33,6 +33,7 @@ import shutil import subprocess import sys +from _usage_report_format import _fmt_h from _usage_report_parsing import ( aggregate_atop, merge_gpu_aggs, @@ -40,7 +41,7 @@ from _usage_report_parsing import ( merge_windows, ) from _usage_report_pmon import aggregate_pmon -from _usage_report_render import _fmt_h, _render_report +from _usage_report_render import _render_report from _usage_report_types import _PMON_INTERVAL_S, GpuAgg, ProcAgg, _Progress, _Window _ATOP_LOG_DIR = Path("/var/log/atop")