Skip to content

chore(release): prepare 1.4.0#517

Merged
plind-junior merged 5 commits into
mainfrom
chore/release-1.4.0
Jul 17, 2026
Merged

chore(release): prepare 1.4.0#517
plind-junior merged 5 commits into
mainfrom
chore/release-1.4.0

Conversation

@plind-junior

@plind-junior plind-junior commented Jul 17, 2026

Copy link
Copy Markdown
Member

promotes test to main and prepares the 1.4.0 release: version bumped in all four sites (pyproject.toml, openclaw.plugin.json, package.json, src/vouch/init.py — the parity test ties them), changelog section dated 2026-07-17.

headline change since 1.3.0: vouch install-mcp <host> is a one-command setup — it bootstraps the kb when no .vouch/ is discoverable (#516), with the staging-host exemption (kb_bootstrap: false for claude-desktop), env-override-proof preflight, and clean failure paths. also promotes the coderabbit merge-gate + pr-bot hardening (#508, #514) and the stop-hook answer capture that was in the tree but missing from the 1.3.0 wheel.

after merge: tag v1.4.0 on main and release.yml publishes vouch-kb to pypi via trusted publishing; the github release gets the changelog section as its body.

full gate green on this branch: pytest (excl. embeddings), mypy 99 files, ruff, and the openclaw manifest version-parity test; vouch --version self-reports 1.4.0 (the 1.2.0 regression class).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • vouch install-mcp <host> now bootstraps a missing knowledge base automatically; use --no-init to skip.
    • Claude Code setup now installs five hooks.
  • Improvements
    • Knowledge base search now uses a unified, smarter strategy with better fallback behavior.
    • Default backend behavior now respects the configured setting when no backend is specified.
  • Bug Fixes
    • Improved audit/decision ordering for approve/reject/expire to prevent inconsistent history.
    • Fixed demo image building.
  • Documentation / Release
    • Updated installation, agent, and browser review instructions; release version is 1.4.0.

a fresh project's `vouch install-mcp claude-code` used to exit 0 with
"0 failed", create no .vouch/, and print no warning. every installed
hook then no-oped silently forever (they are all wired `|| true`), the
mcp server exited 2, and nothing anywhere told the user to run
`vouch init` — the only diagnostic that exists (`vouch status`) is
itself muffled by `|| true` in the sessionstart hook. reproduced on the
released pypi 1.3.0.

install-mcp now probes discover_root(target) before writing adapter
files: no kb found means it runs the same bootstrap as `vouch init`
(shared `_bootstrap_kb` helper, so the two paths cannot drift — same
starter seed through the normal approved path, same index rebuild, same
audit event), making install a one-command setup. `--no-init` opts out
and a loud stderr warning then names the remedy. a kb discovered above
the target is reported ("Using existing KB at …") instead of being
shadowed by a second one. unknown hosts keep the clean adapter error
and never plant a kb as a side effect.

hardening from review: staging-dir hosts opt out via a new manifest key
`kb_bootstrap: false` — claude-desktop sets it, because its target is a
paste-ready staging dir and a kb planted at an arbitrary cwd (often
$HOME for a user-global host) would become the ambient capture target
for every child project via upward discovery. the preflight passes
`respect_env=False` to discover_root so a shell-exported VOUCH_KB_PATH
neither suppresses a needed bootstrap nor fakes a "no kb" state (it is
surfaced as a stderr note instead), and a bootstrap failure exits as a
clean click error naming --no-init rather than a traceback.

docs follow the new story: the readme's step 1 is one command, the
adapter readme states the manual path's `vouch init` prerequisite,
install.sh's nudges and docs/INSTALL_FOR_AGENTS.md steps 2/4 teach the
one-command flow, and the redundant review-ui blocks in the readme's
step 4 are collapsed into one option list.
coderabbit review on #516: the new source comments now follow the
lowercase-prose convention, and install.sh's next-steps line says
"project hosts create .vouch/ if missing" since staging-dir hosts
(claude-desktop) opt out via kb_bootstrap: false.
fix(cli): install-mcp bootstraps the kb when .vouch/ is missing
bump the version in all four sites (pyproject.toml,
openclaw.plugin.json, package.json, src/vouch/__init__.py) and date the
changelog section.

headline: install-mcp is now a one-command setup — it bootstraps the kb
when no .vouch/ is discoverable (#516) — plus the coderabbit merge-gate
and pr-bot hardening that landed on test since 1.3.0.
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c6a39ec6-33a0-4525-852e-4dc45bc7cfcf

📥 Commits

Reviewing files that changed from the base of the PR and between 5043e13 and 3f5bb7a.

📒 Files selected for processing (2)
  • src/vouch/cli.py
  • tests/test_install_adapter.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/vouch/cli.py
  • tests/test_install_adapter.py

Walkthrough

vouch install-mcp now bootstraps missing project KBs by default, supports --no-init, honors adapter policies, and handles discovery and failures explicitly. CLI tests, onboarding documentation, release notes, and version metadata were updated for v1.4.0.

Changes

Install-MCP knowledge-base bootstrap

Layer / File(s) Summary
Centralized bootstrap and install flow
src/vouch/cli.py
Shared KB initialization now handles seeding, templates, indexing, and audit logging; install-mcp adds automatic bootstrap, opt-out behavior, error handling, and existing-KB reporting.
Manifest policy and root discovery
src/vouch/install_adapter.py, adapters/claude-desktop/install.yaml, src/vouch/storage.py
Adapters declare whether installation may bootstrap a KB, Claude Desktop disables it, and root discovery can bypass VOUCH_KB_PATH.
Integration validation
tests/test_install_adapter.py
Tests cover bootstrap, opt-out, aliases, staging hosts, overrides, failures, idempotency, ancestor KBs, and unknown hosts.
Onboarding and release updates
README.md, adapters/claude-code/README.md, docs/INSTALL_FOR_AGENTS.md, install.sh, CHANGELOG.md, package.json, pyproject.toml, src/vouch/__init__.py, openclaw.plugin.json
Documentation and installer guidance describe the one-command workflow, while release metadata is updated to 1.4.0.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant install_mcp
  participant AdapterManifest
  participant KBDiscovery
  participant BootstrapKB
  User->>install_mcp: Run install-mcp host
  install_mcp->>AdapterManifest: Read kb_bootstrap policy
  install_mcp->>KBDiscovery: Discover target or ancestor KB
  install_mcp->>BootstrapKB: Initialize missing KB when enabled
  BootstrapKB-->>install_mcp: Return initialized store and seed results
  install_mcp-->>User: Complete wiring or report actionable error
Loading

Possibly related PRs

  • vouchdev/vouch#516: Directly overlaps with the install-mcp auto-bootstrap implementation, manifest gating, root discovery, and integration tests.
  • vouchdev/vouch#151: Relates to the Claude Code adapter and install-mcp wiring workflow.
  • vouchdev/vouch#356: Intersects with the CLI initialization path reused by the shared bootstrap helper.

Suggested labels: mcp

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes this release-prep changeset and matches the 1.4.0 version bump and changelog update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-1.4.0

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 cli command line interface adapters agent host adapters and install manifests openclaw openclaw integration storage kb storage, migrations, schemas, and proposals packaging packaging, build metadata, and make targets tests tests and fixtures size: M 200-499 changed non-doc lines ci: passing ci is green labels Jul 17, 2026

@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: 3

🧹 Nitpick comments (1)
tests/test_install_adapter.py (1)

958-973: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

exercise failure after .vouch has been created.

replacing _bootstrap_kb throws before any mutation, so this test cannot catch a half-created kb that makes the next invocation skip bootstrap. inject failure from seeding, index rebuilding, or audit logging and assert that no incomplete discoverable kb remains.

🤖 Prompt for 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.

In `@tests/test_install_adapter.py` around lines 958 - 973, Update
test_cli_install_mcp_bootstrap_failure_is_clean_error to inject the OSError from
a post-creation bootstrap step such as seeding, index rebuilding, or audit
logging rather than replacing _bootstrap_kb before mutation. After the failed
install, assert that no incomplete discoverable .vouch knowledge base remains
and that a subsequent invocation does not incorrectly skip bootstrap, while
preserving the existing clean-error assertions.
🤖 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/cli.py`:
- Around line 3993-3999: Update the warning message in the surrounding .vouch
discovery branch to state only that no project knowledge base was found, and
explain that installed hooks and the MCP server depend on whether the
VOUCH_KB_PATH environment override is exported. Remove the unconditional claim
that they will do nothing.
- Around line 198-205: Make KB bootstrap atomic around the initialization flow
in src/vouch/cli.py lines 198-205: stage or track newly created .vouch state,
and remove only that new bootstrap state if seed_starter_kb, template seeding,
health.rebuild_index, or audit_mod.log_event fails. Update
tests/test_install_adapter.py lines 958-973 to inject a failure after .vouch
creation and verify a retry performs complete bootstrap rather than reusing
partial state.
- Around line 200-203: Update the bootstrap flow in the CLI around
seed_starter_kb and template generation so all initial sources, claims, and
pages are submitted and written through proposals.approve() rather than direct
store.put_* calls. Reuse the existing approved-proposal path for both the
starter knowledge base and non-default template while preserving the current
approved_by identity.

---

Nitpick comments:
In `@tests/test_install_adapter.py`:
- Around line 958-973: Update
test_cli_install_mcp_bootstrap_failure_is_clean_error to inject the OSError from
a post-creation bootstrap step such as seeding, index rebuilding, or audit
logging rather than replacing _bootstrap_kb before mutation. After the failed
install, assert that no incomplete discoverable .vouch knowledge base remains
and that a subsequent invocation does not incorrectly skip bootstrap, while
preserving the existing clean-error assertions.
🪄 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: 7d313872-9b8d-49bc-a2d0-6442deb10b65

📥 Commits

Reviewing files that changed from the base of the PR and between ee1fe2a and 5043e13.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • README.md
  • adapters/claude-code/README.md
  • adapters/claude-desktop/install.yaml
  • docs/INSTALL_FOR_AGENTS.md
  • install.sh
  • openclaw.plugin.json
  • package.json
  • pyproject.toml
  • src/vouch/__init__.py
  • src/vouch/cli.py
  • src/vouch/install_adapter.py
  • src/vouch/storage.py
  • tests/test_install_adapter.py

Comment thread src/vouch/cli.py
Comment thread src/vouch/cli.py
Comment on lines +200 to +203
seed = seed_starter_kb(store, approved_by=_whoami())
template_result: SeedResult | None = None
if template != DEFAULT_TEMPLATE:
template_result = TEMPLATES[template](store, approved_by=_whoami())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
ast-grep outline src/vouch/onboarding.py \
  --items all \
  --match 'seed_starter_kb|_starter_source|_starter_claim|_starter_page|TEMPLATES' \
  --view expanded

rg -n -C3 'proposals\.approve\s*\(' src/vouch

Repository: vouchdev/vouch

Length of output: 2120


🏁 Script executed:

#!/bin/bash
sed -n '1,220p' src/vouch/onboarding.py
printf '\n---\n'
rg -n -C3 'approve\(|approve\s*\(' src/vouch/onboarding.py src/vouch/proposals.py src/vouch/lifecycle.py

Repository: vouchdev/vouch

Length of output: 10771


🏁 Script executed:

#!/bin/bash
grep -nE 'def seed_starter_kb|def _starter_source|def _starter_claim|def _starter_page|proposals\.approve|approve\(' -n src/vouch/onboarding.py
sed -n '70,160p' src/vouch/onboarding.py

Repository: vouchdev/vouch

Length of output: 3284


🏁 Script executed:

#!/bin/bash
sed -n '70,160p' src/vouch/onboarding.py

Repository: vouchdev/vouch

Length of output: 2973


🏁 Script executed:

#!/bin/bash
sed -n '1,260p' src/vouch/storage.py
printf '\n---\n'
rg -n -C2 'def put_source|def put_claim|def put_page|def approve\(' src/vouch/storage.py src/vouch/proposals.py

Repository: vouchdev/vouch

Length of output: 10630


🏁 Script executed:

#!/bin/bash
sed -n '340,620p' src/vouch/storage.py

Repository: vouchdev/vouch

Length of output: 12252


route bootstrap writes through proposals.approve()
src/vouch/cli.py:200-203seed_starter_kb() writes sources, claims, and pages directly via store.put_*(), so vouch init bypasses the review gate. keep bootstrap writes on the approved proposal path.

🤖 Prompt for 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.

In `@src/vouch/cli.py` around lines 200 - 203, Update the bootstrap flow in the
CLI around seed_starter_kb and template generation so all initial sources,
claims, and pages are submitted and written through proposals.approve() rather
than direct store.put_* calls. Reuse the existing approved-proposal path for
both the starter knowledge base and non-default template while preserving the
current approved_by identity.

Sources: Coding guidelines, Path instructions

Comment thread src/vouch/cli.py
coderabbit review on #517. a failure after .vouch/ became discoverable
(seed, index rebuild, audit) used to strand a half-created kb that made
every rerun skip bootstrap — the original silent-no-op bug reborn.
install-mcp now rmtrees the partial .vouch/ it just created before
surfacing the error (safe: discover_root had just confirmed it did not
exist), pinned by a test that fails the index rebuild and asserts the
rerun bootstraps from scratch.

the --no-init warning also stops overclaiming: with VOUCH_KB_PATH
exported at runtime the hooks would use the override, so the wording
now scopes the "will do nothing" claim to the no-override case.
@plind-junior

Copy link
Copy Markdown
Member Author

@coderabbitai fixed in 3f5bb7a: install-mcp now removes the partial .vouch/ it just created when bootstrap fails after the dir became discoverable (safe — discover_root had just confirmed it did not exist), pinned by a new test that fails the index rebuild, asserts no discoverable kb remains, and asserts the rerun bootstraps from scratch. the --no-init warning also scopes its "will do nothing" claim to the no-VOUCH_KB_PATH case.

on the seeding finding: same position as on #516seed_starter_kb writing via store.put_* is pre-existing vouch init behavior that this release promotes unchanged; it is the human-initiated bootstrap of the kb itself, not an agent write path, and every agent-facing surface still lands in proposals.*. routing the seed through file-then-approve is a behavior-preserving onboarding.py refactor for its own pr, not a release blocker.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@plind-junior Thanks — the cleanup-on-failed-bootstrap behavior and its regression coverage address the partial-KB concern. The narrowed --no-init warning also correctly avoids overstating behavior when VOUCH_KB_PATH is set.

Understood on starter seeding: it remains the existing, human-triggered vouch init bootstrap path, while agent-facing writes continue through proposals.*. Treating any file-then-approve restructuring as a separate onboarding refactor is reasonable and non-blocking for this release.

🐇 ✅


✏️ Learnings added
Learnt from: plind-junior
URL: https://github.com/vouchdev/vouch/pull/517

Timestamp: 2026-07-17T06:08:33.035Z
Learning: In the Vouch Python CLI, `seed_starter_kb` may write directly through `store.put_*` during the human-initiated `vouch init` knowledge-base bootstrap. This is distinct from agent-facing write paths, which must continue to land in `proposals.*`; routing starter seeds through file-then-approve is separate onboarding refactor work rather than a release blocker.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@plind-junior
plind-junior enabled auto-merge July 17, 2026 08:05
@plind-junior
plind-junior disabled auto-merge July 17, 2026 08:06
@plind-junior
plind-junior merged commit 74abc8e into main Jul 17, 2026
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adapters agent host adapters and install manifests ci: passing ci is green cli command line interface docs documentation, specs, examples, and repo guidance openclaw openclaw integration packaging packaging, build metadata, and make targets size: M 200-499 changed non-doc lines storage kb storage, migrations, schemas, and proposals tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant