feat: noise-filter the health sync dashboard + repo_cleanup hygiene nudge#42
Merged
Merged
Conversation
…udge The startup health table printed raw porcelain — ~1,000 lines of regenerated dataset artifacts burying the handful of real dirty files. Route every repo's porcelain through the existing heart.noise classifier in one batched call: MOD/UNTR now count real drift only, a NOISE column carries the artifact count, and the dirty listing shows real files with noise collapsed to a one-line summary (health --all restores the raw view; classifier failure degrades to the old output with a note). Also: noise_globs gains the classes the 2026-07-09 /repo_cleanup sweep found slipping through (*.npy, tracer_*.json, point_dataset*.csv, *dataset.json, versioned *summary_v*.json), and the dashboard ends with a hygiene nudge when the /repo_cleanup audit stamp (~/.cache/pyauto/repo_cleanup_last_audit.json) is missing or older than PYAUTO_CLEANUP_NUDGE_DAYS (default 7). Closes #41. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The venv-startup
healthtable printed rawgit status --porcelainper repo — ~1,000 lines of regenerated dataset artifacts burying the ~5 real dirty files. This routes every repo's porcelain through the existingheart.noiseclassifier (one batched call, within the <10s budget): MOD/UNTR count real drift only, a NOISE column carries the artifact count, real files are listed with noise collapsed to a one-line summary.health --allrestores the raw view; classifier failure degrades gracefully to the old output.Also closes the cadence loop for
/repo_cleanup: the dashboard ends with a "Hygiene:" nudge when the sweep's audit stamp (~/.cache/pyauto/repo_cleanup_last_audit.json) is missing or older thanPYAUTO_CLEANUP_NUDGE_DAYS(default 7).Closes #41.
API Changes
Additive on the python side:
heart.noisegainssplit_lines()(line-level split, codes intact) and a--batch <dir> --real-out <dir>CLI mode;classify_dirty()is reimplemented on top with unchanged behaviour. The dashboard's table format changes (new NOISE column,~flag, real-only dirty listing) — anything parsinghealthoutput visually gains a column.noise_globsadditions mean the census now classifies*.npy/tracer_*.json/point_dataset*.csv/*dataset.json/*summary_v*.jsonas noise.See full details below.
Test Plan
pytest tests/— 223 passed (22 in test_noise.py incl. new split/batch/glob tests)~one-liners; real drift (5 modified.pyin autolens_workspace_test) listedhealth --allreproduces the raw listing--batchdegrades to raw counts +(noise classification unavailable)noteFull API Changes (for automation & release notes)
Added
heart.noise.split_lines(porcelain_lines, noise_globs)— (real_lines, noise_lines) with porcelain codes intactheart.noise.run_batch(in_dir, real_out, config)+ CLIpython -m heart.noise --batch <dir> --real-out <dir>— per-repo counts on stdout (name\treal_mod\treal_untr\tnoise), real-only porcelain per file; no sidecar writtenhealth --all— full raw dirty listing (dispatcher routes leading-dash args to sync)PYAUTO_HEART_HOME— override the Heart checkout used for classificationPYAUTO_CLEANUP_NUDGE_DAYS— hygiene-nudge threshold (default 7)noise_globs:*dataset.json,*tracer_*.json,*point_dataset*.csv,*.npy,*summary_v*.jsonRemoved
heart.noise --name/--outsidecar mode unchanged (now validated manually instead of argparserequired=, same errors).Migration
~flag;health --allgives the previous listing.🤖 Generated with Claude Code