Repository navigation
fix(dashboard): proportionate stale-copy remedy; bare --dry-run no longer writes (#67) - #73
Merged
Merged
Conversation
added 3 commits
August 11, 2026 23:30
…e --dry-run writes)
…nger writes (#67) check_stale_version() advertised `--sync` as the fix for a stale copy, but --sync is scoped from the canonical's own location rather than the working directory, so it rewrites every discovered sibling (measured: 26 files / 25 repos, 7 creates in repos that do not gitignore the path, 1 git-tracked target). The warning now leads with `cp <canonical> <this copy>` and offers the portfolio path only as --sync --dry-run with its scope stated. Separately, --dry-run was consulted only inside the --sync branch, so on its own it fell through to a full scan and wrote dashboard.html + dashboard_history.jsonl. It is now an error (exit 2) that writes nothing — refusing rather than no-opping, so the caller can tell 'nothing to do' from 'flag ignored'. New TestCliRemedyProportionality (3 cases, 208 -> 211). Both defect tests driven RED against the pre-fix scanner; the third is a presence control. Twins byte-identical. DASHBOARD_VERSION 2.10.5 -> 2.10.6. Closes #67
rmsharp
added a commit
to rmsharp/methodology
that referenced
this pull request
Sep 17, 2026
…cide the sync commit cap, then P7 S180's receipt (self 7, S179 scored 8) and fork Learning KJ5HST#73: a read-only phase is read-only only if git status says so. Gates in a clone of 04fccc5: 10/10, results c86e8ef9b42b, tests-sh-passed 311 at 3 receipts. Next: the operator decides plan item (18), then P7 in wsfct's own repository. Co-Authored-By: Claude Opus 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.
Closes #67 — both defects, each reproduced before and after against a real scratch portfolio rather than argued from the diff.
Defect 1 — a remedy disproportionate to the finding
check_stale_version()answered "this one copy is old" withRe-sync: python3 <canonical> --sync. But--syncis scoped from the canonical's own location, not the working directory, so it rewrites every discovered sibling — the issue measured 26 files across 25 repos, including 7 creates in repos that do not gitignore the path and 1 where the file is git-tracked. An adopter following a one-line instruction verbatim dirties eight unrelated repositories.The warning now leads with the safe per-project action and states the portfolio path's blast radius inline:
--syncitself is unchanged — this is a message fix, not a behavior change. Worth being explicit that the issue's headline number is therefore still true after its own fix: the tool no longer recommends the portfolio-wide write, but running it still does exactly what it did.Why this is more than tidiness. A remedy nobody can safely run is one mechanism behind an ignored warning. The issue records this staleness line riding ~28 consecutive handoffs in one adopter without being acted on. The measurement was never the missing part — the tool re-derived it correctly every session; the actionable remedy was.
Defect 2 — a flag named
--dry-runthat writes--dry-runwas consulted only inside the--syncbranch, so on its own it fell through to a full scan and wrotedashboard.htmland appended todashboard_history.jsonl. Measured, old vs new, in a throwaway repo:It is now an error. Refusing rather than silently no-opping is deliberate: a no-op leaves the caller unable to tell "nothing to do" from "flag ignored" — the same unreadable-signal class as defect 1.
--sync --dry-runstill previews exactly as before; the refusal sits after the--syncbranch.Tests
New
TestCliRemedyProportionality(3 cases; unit suite 208 → 211). Subprocess-driven by necessity — importing the module cannot reachmain()'s argument handling, so an import-based test would assert nothing about either defect while looking like coverage.Both defect tests were driven RED against the pre-fix scanner (swapped in from
origin/main) and the failing run read, not assumed:The control passing in the same RED run is what proves the two failures were specific rather than a broken harness. It is load-bearing in the other direction too: without it, a scanner that refused every invocation would satisfy the dry-run test and look fixed.
The stale-warning test deliberately asserts a property rather than a string — if
--syncappears on any line of the warning,--dry-runmust appear on that same line — so it keeps holding if the wording is reworded.Scope deliberately not taken
The issue also suggests
--sync-selfand a--yes/scope gate on--sync. Both change the CLI contract rather than fix a defect, and thecpline already supplies the per-project remedy with no new surface area, so they are left for a separate deliverable. Recorded as deliberate in the ledger entry and the handoff receipt so it does not read later as an oversight — but the 26-file blast radius is a real follow-up, not noise.Verification
python3 -m unittest tools.test_methodology_dashboard— 211/211bash bin/tests.sh— 114/114, 0 failedpython3 bin/check-links— OK (83 links / 21 files)python3 bin/check-handoff --all— OK (9 receipts, fences balanced)tools/andstarter-kit/twins byte-identical;DASHBOARD_VERSION2.10.5 → 2.10.6--syncremedy; the only hits are frozendocs/planningrecords, left verbatim per the v2.7.1 precedent.The scanner is
bin/_manifest.py-TRACKED, so adopters receive both fixes viabin/sync.