Repository navigation
fix(fileservice): zero-fill gaps in write entries - #32778
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 084ef60cbae712079a241f76fe1750850a51c2f7
Assessment: approve
The shared write-entry reader now initializes exactly the gap bytes it returns, restoring the existing zero-fill contract without new state or backend-specific mechanisms. No actionable correctness or design defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Read both changed files, the linked issue and all three discussion entries; saved review-plan.md, change-map.json and discussion-assessment.json.
-
Fresh focused tests passed, including both stream modes and MemoryFS/LocalFS2 roundtrips. The exact-base reader control fails all four poisoned-buffer gap cases while contiguous controls pass.
-
Full fileservice package passed normally: 717 top-level passes, six skips, 298.149s.
-
Repository-pinned selected golangci-lint and molint checks passed; formatting, diff, clean-source and native loader audits passed.
-
validation-evidence.json maps commands, frozen source, exits and retained logs to check-run receipts.
Limitations:
-
Six existing package tests were skipped; details remain in package-tests.log.
-
The supplied CI snapshot still had broader UT/SCA/coverage/BVT checks pending; those were not counted as passes.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32777. A separate 4.2-dev change is needed as well.
What this PR does / why we need it:
FileService's
IOEntry.Offsetcontract says that gaps in a write are zero-filled. The entry reader previously advanced past the gap without initializing the returned bytes, so the result depended on the supplied read buffer. Clear exactly the gap portion before advancing; contiguous input keeps its existing path.Validation on CPU-only Linux with Go 1.27.1:
make static-check-selected STATIC_CHECK_PACKAGES=./pkg/fileservicepassed. The full fileservice package suite was not run.