-
Notifications
You must be signed in to change notification settings - Fork 62
fix(vault-sync): surface deleted-citation error as VaultSyncError #548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: test
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,7 +51,7 @@ | |
| ClaimStatus, | ||
| PageStatus, | ||
| ) | ||
| from .proposals import propose_page | ||
| from .proposals import ProposalError, propose_page | ||
| from .storage import ( | ||
| ArtifactNotFoundError, | ||
| KBStore, | ||
|
|
@@ -464,10 +464,16 @@ def sync_vault( | |
| if direction in {"forward", "both"}: | ||
| try: | ||
| r = vault_to_kb(store, vault_dir, actor=actor) | ||
| except ArtifactNotFoundError as e: | ||
| except (ArtifactNotFoundError, ProposalError) as e: | ||
| # A vault edit referenced a claim/entity/source that no longer | ||
| # exists in the KB. That's a *real* conflict the user has to | ||
| # resolve in Obsidian, not a vouch bug; surface it cleanly. | ||
| # propose_page validates those ids and converts the miss to a | ||
| # ProposalError ("unknown claim/entity/source id"), not the raw | ||
| # ArtifactNotFoundError this used to catch — so the handler was | ||
| # dead and the ProposalError escaped as an uncaught traceback, | ||
| # bypassing the CLI's `except VaultSyncError` renderer. Catch | ||
| # both so it surfaces as the documented VaultSyncError. | ||
|
Comment on lines
+467
to
+476
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win do not classify every
🤖 Prompt for AI Agents
Comment on lines
468
to
+476
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win keep the new inline comment prose lowercase The added comment block uses sentence case ( as per path instructions: use lowercase prose in comments and review notes. 🤖 Prompt for AI AgentsSource: Path instructions |
||
| raise VaultSyncError(f"vault edit references unknown artifact: {e}") from e | ||
| combined.pages_proposed.extend(r.pages_proposed) | ||
| combined.pages_skipped_unchanged.extend(r.pages_skipped_unchanged) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
move this entry under
[Unreleased]This is a user-visible cli error change, but it is currently recorded under
## [1.4.0] — 2026-07-17. Move the bullet to the existing[Unreleased]section.as per coding guidelines: user-visible changes must be recorded in
CHANGELOG.mdunder[Unreleased]in the same pr; as per path instructions: do not silently omit user-visible changes.🤖 Prompt for AI Agents
Sources: Coding guidelines, Path instructions