review: tighten comments + unsafe SAFETY note#7
Merged
Conversation
Whole-repo comment pass (/code /code-rs /code-py): drop the edit-narration tail in resolveScope's godoc and the restated-code comment in _abs; add the missing SAFETY invariant (/code-rs rule 5) on lookup_user's non-null passwd dereference. The rest of the tree was already within budget.
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.
Whole-repo comment/style pass over sandbox
main(/codeGo,/code-rsRust,/code-pyPython). The tree was audited file-by-file; it came back already within budget, so this PR is deliberately small.Changes
, as before.edit-narration tail fromresolveScope's godoc; the sentence is complete without it._abs; the three-line body (Path coerce → absolute passthrough → join undermanifest.root) is self-evident./code-rsrule 5) onlookup_user's non-null passwd dereference:pwis non-null (checked) and, withNSS_LOCKheld, points to a validpasswdwhosepw_diris a NUL-terminated string it owns. The other unsafe blocks already carry their invariant (guard comments onkill_group/signal_pid, theNSS_LOCKnote ongetpwnam, theF_GETFL/F_SETFLnote onset_nonblocking, theopenptySAFETY block).Audit result
Across ~95 source files the pass found only these three items — two removable comments and one genuine unsafe-justification gap. Declaration layout, logging idioms, context propagation, error handling, and English-only were all clean; no manufactured churn.
Gates
cargo fmt --check✓,clippy --all-targets -D warningson macOS ✓ and in arust:1-slimLinux container (incl. vsock/tokio-vsock) ✓,cargo test✓ (10 passed).go build/vet✓,golangci-lint runonGOOS=linuxandGOOS=darwin✓ (0 issues),golangci-lint fmt --diff✓.ruff check✓,pytest✓ (4 passed, Python 3.12 venv with both SDK packages editable-installed).