fix(repo): restore CLAUDE.md, emptied by a truncating version-bump edit - #7517
Conversation
open(f,"w") truncates before the inner open(f).read() runs, so four merges (v0.5.1288-1291) shipped a 0-byte CLAUDE.md. Restored from 40214c5 with the version line advanced to 0.5.1291.
|
Warning Review limit reached
Next review available in: 1 minute 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 ignored due to path filters (1)
📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
CLAUDE.md— the project-instruction file loaded into every agent session — has been 0 bytes onmainsince v0.5.1288, across four merges (#7499, #7501, #7514, #7509).Cause
A version-bump edit written as a single expression:
Python evaluates the outer
open(..., "w")before the argument, so the file is truncated to zero length first; the inner.read()then returns"",.replace()is a no-op on it, and the write stores an empty string. Nothing errors: the bump looks like it worked, andgit commitfaithfully records a 254-line deletion.It went unnoticed because a version bump is the one edit nobody re-reads, and the four merges that carried it were each reviewed for their own diff.
Fix
Restored verbatim from
40214c50f(last intact copy, 32,056 bytes) with only the**Current Version:**line advanced 0.5.1287 → 0.5.1291 to matchCargo.toml. Byte-identical to its last good state otherwise — verified by diffing against that blob.The safe form, used earlier in the same session, binds the read to a variable first:
No code change;
Cargo.tomlwas never affected (its bumps used the read-then-write form throughout, which is why the workspace version is correct at 0.5.1291).