fix(docs): name the in-repo resume helper and gate it, since a reachable path is not a current one - #370
Conversation
…ble path is not a current one The audit cron prompt spelled out its resume-arming command twice, both times naming an out-of-repo copy at ~/.taos-team/resume_arm_time.py. Since #354 the script derives its own location from __file__, so the in-repo file is the only copy that can be correct and any other is a second document that drifts. One did: those paths resolved for weeks to a checkout fifteen commits behind master, so the armed resume pair ran a pre-#354 script while every path involved still resolved successfully. Resolving a path proves a file is reachable, never that its contents are current. Both invocations now name scripts/resume_arm_time.py, and a test fails if any file under .claude/ or docs/ names the script at any other path. The scan reads files out of the repository rather than inspecting the filesystem it describes, so it holds in CI on a machine with no /home/jay at all. The test is verified against the pre-fix document, not only a synthetic fixture, and it asserts the scan reaches that document: a scan that read no files would report zero violations and read as a pass. Four of its seven cases exist to keep the fifth from being vacuous.
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 28 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by step-3.7-flash · Input: 109.5K · Output: 21.9K · Cached: 1.9M |
Closes
tsk-cdqsgy. Supersedes the blocked PR #363, which carried a changelog fragment describing a symlink performed on one filesystem and no repository change at all.What was wrong
.claude/audit-cron-prompt.mdspelled out its resume-arming command twice, both times naming an out-of-repo copy at~/.taos-team/resume_arm_time.py. Since #354 the script derives its own location from__file__, which makesscripts/resume_arm_time.pythe only copy that can be correct. Any other copy is a second document, and this one drifted.Resolving a path proves a file is reachable, never that its contents are current. That is the whole defect. Every path involved resolved successfully the entire time, which is exactly why nothing caught it.
The measurement, corrected
The card recorded the live box as 15 commits behind with the helper resolving to a pre-#354 script. Re-measured at the start of this work, that specific claim no longer holds, and the reason matters:
The live working copy is byte-identical to
origin/masterand does carry both_HELPER_PATH = os.path.realpath(__file__)and #369's worktree guard. It is current only because the main worktree holds uncommitted modifications to that file which happen to match master, over a HEAD that is 7 commits behind. Anygit checkoutorgit stashthere silently re-arms a pre-#354 script. So the operational exposure is real but is not what the card described, and it is not fixable from inside the repository, which is precisely why the durable fix is that no document names a path that can drift.The change
Both invocations now name
scripts/resume_arm_time.py, repo-relative, with a note stating that it is the only copy and why an out-of-repo one is not a convenience.tests/test_docs_name_in_repo_helper_path.pyfails if any file under.claude/ordocs/namesresume_arm_time.pyat any path other thanscripts/. It reads files out of the repository and never inspects the filesystem it describes, so it holds in CI on a machine with no/home/jayat all.Reconciling the count in both directions
The card said there were two references. Confirmed, and the discrepancy is worth recording because the obvious command disagrees:
git grep -creports 1. It counts matching lines, and that document is a single 15KB line.replace_allcovered exactly two, now 0, withscripts/resume_arm_time.pyappearing 2 times.resume_arm_time.pymentions carrying no path at all. Those correctly stay as they are, and the detector deliberately permits a bare mention, since it names the script without claiming a location.Proof it engages, rather than a suite count
A passing suite only ever shows a gate can detect the defect. Both properties are checked here.
It detects. The tree assertion was run against the real pre-fix document, not only a synthetic fixture, and it fails naming both occurrences:
It is invoked. CI's literal test step is
uv run pytest tests/ -q. That exact command collects all 7 cases. This is the property #368's gate lacked: it passed every test it shipped while nothing ever asked it to run.It is not vacuous. Four of the seven cases exist to stop the fifth from being empty. A detector that flagged everything would satisfy the positive fixture alone, so there are negative controls for the in-repo path, for bare mentions, and for
tests/test_resume_arm_time.py, whose own filename ends in the string being searched for. A tree scan that reached no files would report zero violations and read as a pass, so the scan asserts it found files and that it reaches the document that regressed.Verification
Left deliberately undone
The main worktree at
/home/jay/Development/taosmdis still 7 commits behind master with uncommitted work in it, including staged #315 work. Bringing it current is an operational action on someone else's checkout and is out of scope here, as the card states. It is worth doing, because the file that is currently correct is correct by accident.