fix(vault-sync): surface deleted-citation as VaultSyncError - #564
Conversation
propose_page converts missing claim/entity/source ids to ProposalError, so the except ArtifactNotFoundError handler was dead and the error escaped as a traceback past the CLI renderer. catch ProposalError when its cause is ArtifactNotFoundError; other proposal failures get a neutral vault-edit-rejected message so they are not mislabelled.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughForward vault synchronization now wraps ChangesVault sync error handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_vault_sync.py`:
- Around line 343-367: Strengthen test_cli_sync_deleted_citation_is_clean_error
by asserting the CLI error rendering is exactly one line, not merely
traceback-free. Normalize result.output as needed and compare it against the
documented expected Error: message while preserving the existing unknown
artifact and unknown claim id checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 815951f9-f772-4ea8-978b-1f3adf88bcfb
📒 Files selected for processing (3)
CHANGELOG.mdsrc/vouch/vault_sync.pytests/test_vault_sync.py
strengthen the CLI regression to the documented Error: contract from vouchdev#547 so a multiline non-traceback rendering can no longer pass.
What changed
sync_vault's forward-pass handler now catches theProposalErrorthatpropose_pageraises for a deleted citation (missing claim/entity/source id, withArtifactNotFoundErroras__cause__), and converts it to the documentedVaultSyncError. other proposal failures get a neutralvault edit rejectedmessage so they are not mislabelled as unknown artifacts.Why
Fixes #547.
propose_pageconverts lookup misses toProposalError, so the oldexcept ArtifactNotFoundErrorhandler was dead andvouch syncprinted an uncaught traceback instead of the CLI's one-lineError:renderer. prior attempt #548 was closed after CodeRabbit requested changes (changelog under the wrong section; everyProposalErrorlabelled as unknown artifact; comment casing) — this addresses all three.What might break
nothing on disk. existing
.vouch/layouts andkb.*methods are unchanged. only the exception type surfaced bysync_vault/vouch sync --direction forwardfor these failure modes changes (traceback → cleanVaultSyncError).VEP
n/a — bugfix, no surface change.
Tests
make checkpasses locally (lint + mypy + pytest) — 1766 passed, 50 skippedCHANGELOG.mdupdated under## [Unreleased]regression coverage:
VaultSyncErrormatchingunknown artifactProposalError→vault edit rejected, notunknown artifactError:with no tracebackSummary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
Error:message without tracebacks, with clearer “unknown artifact” details.Tests