feat(review): add applicable code suggestions #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/review-suggestions-v16"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Pleroma hardening
Testing
A full
services/repository/filespackage run also encountered the sandbox's unrelatedTestGetDiffPreviewprocess restriction (operation not permitted); focused suggestion tests and the complete suggestion integration suite pass./oc review
Addressed both OpenCode P2 findings:
5c85e34f3b). Added an integration regression test.c7399227b1). Added LF-majority, CRLF-majority, and tie unit coverage.Verification:
go test -tags 'sqlite sqlite_unlock_notify' ./services/repository/files -run '^Test(SuggestionCommitIdentityRespectsEmailPrivacy|SuggestionRangePreimage|SuggestionLines|SpliceLines)$' -count=1go test -tags 'sqlite sqlite_unlock_notify' ./services/gitdiff -count=1/oc review
OpenCode Review
Execution completed for
pleroma/forgejo-customatc7399227b1ee(job #48).Rating: 5/5
The PR adds GitHub-style review suggestions: a ```suggestion fenced block with a server-rendered before/after preview in code comments, plus single and batch apply that commits to the PR head branch (fork-aware) with author/committer attribution and Co-authored-by trailers. Verification at head
c739922: both previously reported P2s are fixed and covered by tests — pending-review comments no longer render or accept apply controls (SuggestionDiffs and resolveSuggestionEdit both gate on review state, with render and rejection integration tests), and apply now preserves the file's dominant line ending with LF on ties (unit coverage for LF/CRLF/tie). Independent checks: all touched Go packages build and vet cleanly; markdown, gitdiff, files, models/issues, services/pull and router unit tests pass; the complete new suggestion integration suites (render, single apply, batch, overlap, fork, quota, permissions, closed/merged/AGit gating) pass under sqlite; ESLint clean and webpack build succeeds. Security review confirms CSRF via the web route group, sign-in and repo assignment, comment-to-PR binding, head-branch write via CanMaintainerWriteToBranch, quota charged to the head-repo owner, LFS/binary/oversize rejection, exact preimage guards for multi-line writes, sound overlap and batch-limit handling, and archived-repo/closed-PR fail-closed behavior. Remaining observations (a no-op suggestion toolbar button when editing a code comment from the Conversation tab, uncached per-comment git check-attr during render, rare concurrent-apply race surfacing as a 500) are polish-level and non-blocking. Ready to merge.No findings were reported.
Production-ready: both prior P2 findings verified fixed at head with regression coverage; builds, vet, unit tests, integration suites, lint and frontend build all pass locally; security and data-integrity gating on the new apply path is sound. No blocking or medium-impact defects found.
No companion fix was needed because the fresh review found no fixable findings.
Last reviewed commit:
c7399227b1ee/oc rerun
/oc fix latest
/oc fix latest
/oc fix latest