Conversation
roborev: Combined ReviewVerdict: Not ready to merge; 4 Medium-severity issues need fixes. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
|
I will rebase this after #278 goes in which has better review guidelines which will get the security review to chill out |
roborev: Combined ReviewVerdict: Not ready to merge; the combined reviews indicate multiple unresolved security issues (2 High, 4 Medium). High
Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
83ce22b to
7d9d6a9
Compare
roborev: Combined ReviewVerdict: Changes are not ready to merge due to one Medium-severity security issue. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: One medium-severity issue should be fixed before merge; no high or critical findings were identified. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: PR has 3 actionable issues (1 High, 2 Medium) that should be addressed before merge. High
Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: 3 Medium issues remain; no Critical or High findings were identified. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: 2 medium-severity issues need fixes before merge (no high/critical findings). Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewSummary verdict: Mostly solid, but one Medium issue should be fixed before merge. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: Two Medium issues should be addressed before merge; no High/Critical findings were reported. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: 3 Medium issues found (no Critical/High findings). CriticalNone. HighNone. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: No Medium, High, or Critical issues identified across the combined reviews. Consolidated Findings (Medium+)No findings at NotesSecurity reviews from both agents reported no issues. The only concerns raised were Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined ReviewVerdict: Changes are not yet ready to merge due to 5 unresolved Medium-severity issues in remap/auth/error-handling paths. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
|
"⏺ Summary of the 5 findings:
|
roborev: Combined ReviewVerdict: Changes are not clean; 2 medium-severity issues should be addressed before merge. Medium
Synthesized from 4 reviews (agents: gemini, codex | types: security, default) |
roborev: Combined ReviewVerdict: Mostly solid change set, but 3 Medium-severity issues should be addressed before merge. Medium
Synthesized from 4 reviews (agents: codex, gemini | types: security, default) |
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
Store patch_id (content-based hash from git patch-id --stable) at enqueue time so reviews can be matched across rebases and amends. Phase 1 — patch_id storage: - Add GetPatchID and GetCommitInfo git helpers - Add patch_id column to review_jobs (SQLite + PostgreSQL migrations) - Compute and store patch_id in handleEnqueue for single-commit reviews - Sync support: patch_id round-trips through push/pull, remapped git_ref/commit_id propagate via updated ON CONFLICT clauses - Bump PostgreSQL schema to v5 Phase 2 — post-rewrite hook + remap: - Add post-rewrite git hook calling roborev remap on rebase/amend - Add roborev remap CLI command: reads old/new SHA pairs from stdin, filters by matching patch-id, sends mappings to daemon - Add /api/remap daemon endpoint with transactional DB updates (COUNT check + commit creation + git_ref update in single SQLite tx) - Add Remap to daemon Client interface - Hook install/uninstall handles both post-commit and post-rewrite with append/upgrade/skip behavior via installOrUpgradeHook - Generalize hookNeedsUpgrade and add hookMissing for post-rewrite - Block-based hook removal anchored to generated markers with snippet-aware line matching (isRoborevMarker, isRoborevSnippetLine) Testing: - Unit tests for GetPatchID, migrations, EnqueueJob patch_id storage - Unit tests for RemapJobGitRef, handleRemap, remap CLI stdin parsing - Unit tests for installOrUpgradeHook (append/skip/upgrade/force) - Unit tests for removeRoborevFromHook (9 cases including edge cases) - Sync round-trip, running-job remap, remap-triggers-resync tests - Integration tests for full rebase and message-only amend flows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validate git SHAs at the CLI boundary in remap.go with a strict 40-char lowercase hex regex, preventing flag injection without needing `--` end-of-options (which breaks git show/log). Update .roborev.toml review guidelines to cover the post-rewrite hook and remap flow as local-to-local data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reject empty repo_path with 400 before calling GetMainRepoRoot, preventing fallback to daemon CWD which could target an unintended repo. Follows the same validation pattern as handleEnqueue and handleBatchJobs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor uninstallHookCmd to iterate both post-commit and post-rewrite hooks via removeRoborevFromHook, fixing a bug where early returns for missing/non-roborev post-commit hooks prevented post-rewrite cleanup. Update review_guidelines to note that SHAs resolved by git or validated at CLI boundaries are trusted internal data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update writeJSON calls in handleRemap to use new 2-argument signature (status code parameter was removed in the merged lint PR). Handle unchecked show.Wait() return values in GetPatchID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handleRemap now returns 400/404 instead of silently returning 200 with zero counts when the repo path is invalid or unknown. GetPatchID passes -c color.ui=false to git show to prevent ANSI codes from affecting patch-id computation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GetRepoByPath errors are now split: sql.ErrNoRows returns 404, other DB errors return 500. Added test for valid git repo not registered in the DB hitting the 404 path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handleRemap now applies MaxBytesReader (1MB) and rejects requests with more than 1000 mappings to prevent DoS via unbounded input. isRoborevSnippetLine now handles all historical hook formats: v0 (plain roborev invocation), v0.5 (early variable format), and v1 (PATH-first with if [ -z ] guard). Adds regression tests for each legacy format to prevent future regressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Internal command called only by the post-rewrite hook, not intended for direct user invocation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only print golangci-lint output when it finds issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hook install/upgrade now checks the shebang of existing hooks before appending. Non-shell hooks (Python, Ruby, etc.) get a clear error message instead of a silently broken file. Also updates review guidelines to suppress markerless-block and interpreter-mismatch findings (now handled). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
isShellHook now accepts all common POSIX-compatible shells, not just sh and bash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If git patch-id fails to start, the pipe reader is gone but git show may still be writing. Closing the pipe unblocks show so show.Wait() doesn't hang on large diffs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After removing old roborev content from a hook, a non-ENOENT re-read failure now aborts instead of silently writing fresh content (which would lose remaining user hook lines). Also adds review guideline suppressing symlink-in-hooks findings (local filesystem is not a trust boundary). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The remap oversized body test interpolated repoDir directly into a JSON string literal. On Windows, backslashes in paths (C:\Users\...) produce invalid JSON escape sequences, causing the decoder to fail with "invalid JSON" before hitting the MaxBytesReader limit. Use json.Marshal to properly escape the path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add test seam (hookReadFile) to exercise the defensive error path where os.ReadFile fails with a non-ENOENT error after removeRoborevFromHook succeeds during hook upgrade. The new test injects fs.ErrPermission and verifies the "re-read after cleanup" error is returned. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match the guard in installOrUpgradeHook: if os.ReadFile fails with a non-ENOENT error after removeRoborevFromHook, abort instead of silently falling through and overwriting user hook content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
A non-shell hook (e.g., Python) that mentions "roborev" in a comment would enter the upgrade path, where removeRoborevFromHook finds no marker block to remove and a shell snippet gets appended to the non-shell hook. Add isShellHook check in the upgrade branch of both installOrUpgradeHook and installPostRewriteHook to match the existing guard in the append branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
Summary
Adds rebase-aware review preservation so reviews survive
git rebaseandgit commit --amend.patch_id(content hash viagit patch-id --stable) at enqueue time to match reviews across rebasespost-rewritegit hook that callsroborev remapafter rebase/amend to update job refs/api/remapdaemon endpoint with proper error responses (400 for non-git paths, 404 for unknown repos, 500 for DB errors)roborev remapCLI command that reads old/new SHA pairs from stdin, filters by matching patch-id, and sends mappings to the daemonpost-commitandpost-rewritewith append/upgrade/skip behaviorpatch_idcolumn with index (schema v5)patch_idround-trips through push/pullrepo_pathvalidated before git resolutionGetPatchIDuses-c color.ui=falseto prevent user git config from affecting patch-id computationTest plan
go test ./...passesgo test -tags integration ./internal/daemon/— rebase and amend integration tests passroborev initinstalls post-rewrite hook alongside post-commitroborev install-hookappends to existing non-roborev hooks, upgrades outdated onesroborev uninstall-hookremoves both post-commit and post-rewrite snippetsroborev show <new-sha>finds the reviewgit commit --amend(message-only change)Generated with Claude Code