Skip to content

fix(proposals): promote claim/page status on approve - #586

Open
kurosawareiji7007-hub wants to merge 2 commits into
vouchdev:testfrom
kurosawareiji7007-hub:fix/approve-promote-status
Open

fix(proposals): promote claim/page status on approve#586
kurosawareiji7007-hub wants to merge 2 commits into
vouchdev:testfrom
kurosawareiji7007-hub:fix/approve-promote-status

Conversation

@kurosawareiji7007-hub

@kurosawareiji7007-hub kurosawareiji7007-hub commented Jul 29, 2026

Copy link
Copy Markdown

what changed

proposals.approve promotes claims from WORKINGACTIONABLE and pages from DRAFTACTIVE when the proposal still carries the propose defaults. vault-sync comment updated to match. regression covers propose → approve → kb_to_vault without hand-editing status.

why

approve wrote model defaults (WORKING / DRAFT), but vault sync (and provenance / synthesize) only treat ACTIONABLE+ / ACTIVE as live. fixtures and onboarding already force those statuses by hand — the gate itself did not (#583).

draft pages written outside the gate still stay out of the vault (test_kb_to_vault_skips_draft_pages).

validation

python -m pytest tests/test_vault_sync.py tests/test_capture_scope.py tests/test_dead_claim_refs.py -q
python -m ruff check src/vouch/proposals.py src/vouch/vault_sync.py tests/test_vault_sync.py
python -m mypy src/vouch/proposals.py src/vouch/vault_sync.py

Fixes #583

Summary by CodeRabbit

  • Bug Fixes

    • Approved claims now become actionable and approved pages become active automatically, even when they retain default draft statuses.
    • Approved knowledge is now correctly mirrored to the vault without requiring manual status updates.
  • Documentation

    • Clarified which claim statuses are included or excluded during vault synchronization.
  • Tests

    • Added coverage verifying approved claims and pages appear in the vault after synchronization.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kurosawareiji7007-hub, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 86e04165-c055-48c8-ac1b-bfb3b7a0e923

📥 Commits

Reviewing files that changed from the base of the PR and between 04b1fcb and 1b8fc91.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • src/vouch/proposals.py
  • src/vouch/vault_sync.py
  • tests/test_vault_sync.py

Walkthrough

Approval now promotes default claim and page statuses to their live states before durable creation. Vault synchronization documentation and regression coverage reflect and verify the resulting approved artifacts.

Changes

Approval status promotion

Layer / File(s) Summary
Normalize statuses during approval
src/vouch/proposals.py, CHANGELOG.md
Claim approval promotes WORKING or missing status to ACTIONABLE; page approval promotes DRAFT or missing status to ACTIVE.
Validate approved artifact synchronization
src/vouch/vault_sync.py, tests/test_vault_sync.py
Vault status documentation is clarified, and a regression test verifies approved claims and pages are mirrored by kb_to_vault.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: plind-junior, dripsmvcp, tet-9

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: promoting claim and page status on approval.
Linked Issues check ✅ Passed The PR implements the requested fix by promoting approved claims/pages to live statuses and adds regression coverage.
Out of Scope Changes check ✅ Passed The changes stay within the approval-status fix, documentation update, and regression test scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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 29, 2026
gate approval left WORKING/DRAFT defaults, so kb_to_vault and other
post-gate surfaces skipped freshly approved knowledge.

Fixes vouchdev#583
@kurosawareiji7007-hub
kurosawareiji7007-hub force-pushed the fix/approve-promote-status branch from 04fb8f6 to 04b1fcb Compare July 29, 2026 12:55
@kurosawareiji7007-hub

Copy link
Copy Markdown
Author

rewrote commit history to remove the Co-authored-by: Cursor trailer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@src/vouch/proposals.py`:
- Around line 786-788: Lowercase ordinary prose in the comments at
src/vouch/proposals.py lines 786-788 and 816-817, preserving enum identifiers
such as WORKING, DRAFT, ACTIONABLE, and ACTIVE. At src/vouch/vault_sync.py lines
162-165, lowercase “Gate-approved” and replace “Obsidian” with lowercase prose
such as “vault”; make no code changes.

In `@src/vouch/vault_sync.py`:
- Around line 162-165: Update kb_to_vault() to remove existing vault mirror
files whose artifacts are absent from the current live set, including retracted
claims and archived pages, while preserving current writes for live artifacts.
Add a sync-after-retraction regression test covering removal of the stale
markdown file, and revise the nearby lifecycle comment so it does not imply
deletion already occurs.
🪄 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: 861d0ed0-5815-4aac-967a-b8241765a65c

📥 Commits

Reviewing files that changed from the base of the PR and between 1fe8fb5 and 04b1fcb.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • src/vouch/proposals.py
  • src/vouch/vault_sync.py
  • tests/test_vault_sync.py

Comment thread src/vouch/proposals.py Outdated
Comment thread src/vouch/vault_sync.py Outdated
address coderabbit on vouchdev#586: lowercase comment prose, exclude archived
pages from the live vault set, and remove leftover claim/page markdown
when artifacts leave that set.
@kurosawareiji7007-hub

Copy link
Copy Markdown
Author

addressed coderabbit:

  • lowercase comment prose (enum ids kept uppercase)
  • kb_to_vault deletes claim/page mirrors that left the live set (retracted / archived), with regression coverage
  • no cursor trailer

ready for re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance 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.

1 participant