Files
zlareb1 fbad73fe24 Critical-review polish: dangling ref, helper extraction, on-demand docs
Three independent findings from a fresh self-review:

1. **`PR_PERF_TABLE.md:3` referenced a deleted file.** The
   sample-output template said "_Companion to
   `PERFORMANCE_GAINS.md`_", but `PERFORMANCE_GAINS.md` was
   removed in the slim-down round (`3ab7611e82b`). A future
   Claude reading the canonical per-PR template would chase a
   dangling reference. Drop the parenthetical; the rest of the
   sentence stands on its own.

2. **`_common_prefix` was a private helper in `build_commit_diff.py`
   with no test coverage.** It's a generic 5-line longest-common-
   prefix function used to rank SHA-typo suggestions. Move it to
   `_common.py` (rename: drop the leading underscore — it's now
   part of the shared API surface), import it from
   `build_commit_diff`, and add 5 unittest cases covering
   no-overlap / partial-overlap / identical / one-is-prefix /
   empty-input edges. A regression here would silently degrade
   suggestion quality without raising. Test count: 18 → 23.

3. **`diff` and `noise` subcommands weren't mentioned in
   `rebuild.sh`.** They're on-demand by design (you don't run
   them every pipeline pass), but a reader scanning the
   orchestrator's bottom would miss the broader skill surface.
   Add a 4-line trailing comment listing the on-demand
   subcommands so the CLI surface is discoverable from
   `rebuild.sh` alone.

Smoke parity: `cumulative_gains.tsv` md5 unchanged at
`e5a27e01008ef7e23597ee041f68103b`; `#99651` row bit-identical;
all 23 unit tests pass; SHA-typo path still ranks `fdf46xxx`
suggestions with `fdf46ee1` first.
2026-05-06 10:17:39 +00:00
..