fix(writeback): salvage pr-reviewer fixes orphaned by #244's merge#247
Conversation
|
CodeAnt AI is reviewing your PR. |
|
Warning Review limit reached
More reviews will be available in 11 minutes and 34 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request updates the writeback and sweep-drafts functionality across the CLI, server, and TypeScript SDK. Key changes include adding the sweep-drafts subcommand, refactoring workspace resolution to use token-based IDs, enforcing boolean validation on the success field in writeback ACKs, preventing path separators in sweep patterns, and safely initializing nil provider indexes. There are no review comments, so no additional feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Relayfile Eval ReviewRun: Passed: 4 | Needs human: 0 | Reviewable: 0 | Missing output: 0 | Failed: 0 | Skipped: 0 Human Review CasesNo reviewable human-review cases captured Relayfile output. |
Review verdict: APPROVE (bound to 89f9f65)Reviewer: claude-mount-cleanup (channel verdict first per run rules; head re-verified; cherry-picked bot commit reviewed as third-party code with authorship preserved). All five salvaged catches verified — each real, each tested, zero scope creep:
Independently verified at 89f9f65: Merge on full CI green + head still 89f9f65. 🤖 Generated with Claude Code |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
1 issue found across 9 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cmd/relayfile-cli/writeback_sweep.go">
<violation number="1" location="cmd/relayfile-cli/writeback_sweep.go:74">
P2: `sweep-drafts` no longer resolves positional `RelayWorkspaceID` values from catalog records, causing a regression for legacy workspace identifiers.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
| creds, err := loadCredentials() | ||
| tokenValue := resolveToken(*tokenOverride, creds) | ||
| workspaceID, err := resolveWorkspaceIDWithToken(firstArg(fs), tokenValue) |
There was a problem hiding this comment.
P2: sweep-drafts no longer resolves positional RelayWorkspaceID values from catalog records, causing a regression for legacy workspace identifiers.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmd/relayfile-cli/writeback_sweep.go, line 74:
<comment>`sweep-drafts` no longer resolves positional `RelayWorkspaceID` values from catalog records, causing a regression for legacy workspace identifiers.</comment>
<file context>
@@ -66,15 +66,16 @@ func runWritebackSweepDrafts(args []string, stdout io.Writer) error {
}
- creds, err := loadCredentials()
+ tokenValue := resolveToken(*tokenOverride, creds)
+ workspaceID, err := resolveWorkspaceIDWithToken(firstArg(fs), tokenValue)
if err != nil {
return err
</file context>
|
Fixed the valid bot finding from cubic: Changed: Verification run locally:
|
|
✅ pr-reviewer applied fixes — committed and pushed Fixed the valid bot finding from cubic: Changed: Verification run locally:
|
|
Reviewed PR #247 and made one additional fix: Validation run:
All passed. |
|
Reviewed PR #247 and made one additional fix: Validation run:
All passed. |
|
Fixed one validated issue in the PR: Validated stale bot findings in the checkout: SDK test exclusion and Local checks run:
|
|
Fixed one validated issue in the PR: Validated stale bot findings in the checkout: SDK test exclusion and Local checks run:
|
|
Reviewed PR #247 and fixed one validated CLI breakage: Validation run locally:
|
|
Reviewed PR #247 and fixed one validated CLI breakage: Validation run locally:
|
|
Reviewed PR #247 and fixed one real CLI breakage: Validated stale bot findings against the current checkout; the referenced SDK/package and mountfuse/core issues were already resolved or no longer applied. Verification run:
|
|
Reviewed PR #247 and fixed one real CLI breakage: Validated stale bot findings against the current checkout; the referenced SDK/package and mountfuse/core issues were already resolved or no longer applied. Verification run:
|
User description
Summary
agent-relay-code[bot]pushed963ba4e("apply pr-reviewer fixes for #244") to the #244 branch ~5 minutes after the squash merge, orphaning five real catches on a dead branch. This PR cherry-picks that commit onto current main (reconciled with #246's comments), drops the bot's bookkeeping churn (trajectory files, package-lock noise), and keeps everything substantive. Bot authorship preserved on the commit.The five catches (each with its own test, all the bot's)
SweepWritebackDraftsInput/ResponseandAckWritebackDraftDispositionwere added totypes.tsin fix(writeback): draft rename-at-ack + classification-exempt residue sweep (#242) #244 but never exported fromindex.ts, making them unreachable to package consumers.successtofalse— an ack body without the field dead-lettered the op. In production this would have made the rename-at-ack faucet look broken (acks "failing") while the bug was in the handler contract. Now 400s, which aligns the implementation with the OpenAPI spec'srequired: [success]. (TestWritebackAckRejectsMissingSuccess)relayfile writeback sweep-draftsnow resolves the workspace from the token claims via the pre-existingresolveWorkspaceIDWithTokenwhen no positional arg/local catalog record exists — exactly the rw_7ccfea89 ops case the sweep is staged for. (TestWritebackSweepDraftsUsesTokenWorkspaceWithoutPositionalArg)reconcileAckedDraftLocked— workspaces from legacy snapshots could panic on index write. (TestAckWithExternalIDInitializesLegacyNilProviderIndex)/or\are invalid input, not silent non-matches. (TestSweepRejectsPatternsWithPathSeparators)Plus the
writebackusage error now mentionssweep-drafts.Verification
go vet ./...clean;go test ./internal/relayfile/ ./internal/httpapi/ ./cmd/relayfile-cli/greentsc --noEmitclean; vitest 188/188 (bot's new type-surface tests included).trajectories/*bookkeeping,package-lock.jsonversion-drift churn🤖 Generated with Claude Code
CodeAnt-AI Description
Fix writeback sweep and ack handling, and expose the related SDK types
What Changed
successvalues instead of treating them as a failed ack, and legacy workspaces with no provider index no longer fail during ack reconciliation./or\are now rejected as invalid input instead of being treated as silent non-matches.sweep-draftsas a valid subcommand.Impact
✅ Fewer writeback ack failures✅ Easier draft sweeping from token-based workflows✅ Clearer invalid pattern errors💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Release note (for the upcoming cut)
Catch (2) is a corrective behavioral break: ack bodies omitting
success(or sending a non-boolean) now receive 400 instead of being silently treated assuccess: false. Any out-of-tree caller relying on the implicit default was already broken — their acks were dead-lettering ops — but the 400 is new surface and belongs in the release notes for the #244+#246+#247 cut. (Flagged by claude-mount-cleanup in review.)