Skip to content

fix(proposals): colliding propose_page no longer silently overwrites durable pages - #675

Merged
plind-junior merged 1 commit into
vouchdev:testfrom
kai392:fix/critical-issue-page-silent-overwrite
Jul 30, 2026
Merged

fix(proposals): colliding propose_page no longer silently overwrites durable pages#675
plind-junior merged 1 commit into
vouchdev:testfrom
kai392:fix/critical-issue-page-silent-overwrite

Conversation

@kai392

@kai392 kai392 commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • Root cause: approve() exempted every PAGE proposal from the artifact collision guard and routed any existing page id through update_page (vault-edit path from bug: vault_to_kb proposes page edits with wrong id — slugifies title instead of preserving existing page id #219). A same-title slug collision or malicious slug_hint silently wiped durable body and scope on approval, including under the starter trusted-agent auto-drain.
  • Fix: Page updates are opt-in via propose_page(..., update_existing=True). vault_to_kb sets the flag. Bare colliding propose_page raises the same "already exists" error claims always did. Not exposed on MCP/JSONL.
  • Impact: Accidental or malicious page collisions can no longer destroy approved knowledge. Vault edits keep working.

Test plan

  • Collision refuse / update_existing opt-in / deleted-target refuse
  • Vault-edit + delete-suite green locally
  • CI green

Risk / tradeoffs

  • Callers that relied on undocumented "id exists → update" for non-vault edits will now get a collision error (correct). Only vault_to_kb is the intentional update path.

@kai392
kai392 requested a review from plind-junior as a code owner July 30, 2026 20:02
@kai392
kai392 force-pushed the fix/critical-issue-page-silent-overwrite branch from 5449208 to d2a31c2 Compare July 30, 2026 20:02
@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance storage kb storage, migrations, schemas, and proposals sync sync, vault mirror, and diff flows tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 30, 2026
@kai392
kai392 force-pushed the fix/critical-issue-page-silent-overwrite branch 2 times, most recently from d8850fb to 7961464 Compare July 30, 2026 20:18
@kai392

kai392 commented Jul 30, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@kai392
kai392 force-pushed the fix/critical-issue-page-silent-overwrite branch from 7961464 to f2c2af0 Compare July 30, 2026 20:26
@github-actions github-actions Bot removed the docs documentation, specs, examples, and repo guidance label Jul 30, 2026
@kai392
kai392 force-pushed the fix/critical-issue-page-silent-overwrite branch from f2c2af0 to 27c5113 Compare July 30, 2026 20:41
Co-authored-by: Cursor <cursoragent@cursor.com>
@plind-junior
plind-junior merged commit 8e3c0a4 into vouchdev:test Jul 30, 2026
17 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 50-199 changed non-doc lines storage kb storage, migrations, schemas, and proposals sync sync, vault mirror, and diff flows tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants