Skip to content

fix: feed entity-salience reflex from claude-code's context hook; wire codex (#425)#459

Open
Tet-9 wants to merge 1 commit into
vouchdev:testfrom
Tet-9:fix/425-salience-reflex-codex-hook
Open

fix: feed entity-salience reflex from claude-code's context hook; wire codex (#425)#459
Tet-9 wants to merge 1 commit into
vouchdev:testfrom
Tet-9:fix/425-salience-reflex-codex-hook

Conversation

@Tet-9

@Tet-9 Tet-9 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description:

Fixes #425

Problem

The per-prompt KB-context hook (vouch context-hook, wired to claude-code's UserPromptSubmit) computed retrieval via build_context_pack but never fed the entity-salience reflex (#223) — salience.record_query was never called from the hook path, leaving the reflex permanently dormant for every claude-code session, even though compute_salience/attach_salience were fully implemented and working.

Fix

claude-code: build_claude_prompt_hook now calls salience.record_query when a session_id is present, wrapped so a salience failure can never break the hook's existing "never raises, never blocks the turn" contract.
codex: exposes UserPromptSubmit with the same {prompt, session_id, ...} payload and additionalContext response shape as claude-code, so the existing context-hook command now serves both hosts unmodified. Wired via a new hooks.json entry alongside the existing Stop (session capture) hook.
openclaw: no changes needed. Its context-engine slot (src/vouch/openclaw/context_engine.py) already calls record_query/attach_salience correctly on every assemble() — a separate, already-correct path from the one this PR fixes. Documented this explicitly in adapters/openclaw/install.yaml rather than leaving it unaddressed.
cursor: not wired. beforeSubmitPrompt is validation/block-only and cannot inject additionalContext — confirmed against Cursor's own docs, and there's an open, unresolved Cursor feature request asking for exactly this capability. Documented in adapters/cursor/install.yaml, per #425's own "explicitly tiered out if a host lacks the event" allowance.
Note: rather than adding a new auto-context command as literally described, this reuses the existing context-hook command for both hosts — it already does exactly what's needed, and duplicating it would've added unreviewable redundancy for no behavioral difference.

Testing

Added 3 regression tests in tests/test_hooks.py: salience recording actually happens with a session_id, is skipped safely without one, and a recording failure doesn't break the hook's real output
Added 2 tests in tests/test_install_adapter.py: codex's UserPromptSubmit hook installs correctly and doesn't duplicate on reinstall
Confirmed OpenClaw's existing 23 context-engine tests pass unchanged
Full suite: ruff check / mypy clean, pytest 121/121 relevant tests passing (full run: 1165/1166, the one failure is a pre-existing local GPG-agent environment issue unrelated to this change)
CHANGELOG.md updated under [Unreleased]

Summary by CodeRabbit

  • New Features

    • Added hybrid and semantic retrieval with optional graph expansion, explanations, salience, and project/agent scoping.
    • Added statistics, digests, synthesis, diffs, triage, expiration, provenance, theme, embedding, and maintenance tools.
    • Codex prompts now receive knowledge-base context.
  • Bug Fixes

    • Improved hook reliability and salience tracking.
    • Strengthened bundle validation, reference integrity, file safety, and health diagnostics.
  • Chores

    • Added scheduled dependency vulnerability scanning.
    • Removed the desktop application and its related documentation, configuration, and tests.

…e codex (vouchdev#425)

claude-code's UserPromptSubmit hook (context-hook / build_claude_prompt_hook)
computed retrieval via build_context_pack but never recorded the prompt into
the entity-salience reflex (vouchdev#223) -- salience.record_query was simply never
called from the hook path, leaving the reflex permanently dormant for every
claude-code session. Fixed additively: record_query now runs when a
session_id is present, wrapped so a salience failure can never break the
hook's real contract (never raises, never blocks the turn).

codex exposes UserPromptSubmit with the same {prompt, session_id, ...}
payload and additionalContext response shape as claude-code, so the
existing context-hook command now serves both hosts unmodified -- wired via
a new hooks.json entry alongside the existing Stop (session capture) hook.

OpenClaw needed no changes: its context-engine slot
(src/vouch/openclaw/context_engine.py) already calls
record_query/attach_salience correctly on every assemble() -- a separate,
already-correct code path from the claude-code/codex hooks.py one this
fixes.

cursor is not wired: its beforeSubmitPrompt hook is validation/block-only
and cannot inject additionalContext (confirmed against Cursor's docs; an
open Cursor feature request asks for exactly this, unresolved). Documented
in adapters/cursor/install.yaml rather than silently skipped.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR expands retrieval, embeddings, health diagnostics, bundle integrity, MCP and JSONL tools, session handling, and Codex prompt hooks. It adds security-audit automation and Vouch records, while removing the desktop application and several specification, configuration, and documentation files.

Changes

Core platform and integration changes

Layer / File(s) Summary
Prompt context and adapter wiring
src/vouch/hooks.py, adapters/codex/*, tests/test_hooks.py, tests/test_install_adapter.py
Prompt hooks record session salience, Codex invokes vouch context-hook, and adapter behavior is documented and tested.
Retrieval, indexing, and consistency checks
src/vouch/context.py, src/vouch/index_db.py, src/vouch/storage.py, src/vouch/health.py, tests/embeddings/*
Retrieval supports configured and hybrid backends, graph expansion, explanations, embeddings, provenance caches, safer persistence, and deeper lint/fsck checks.
Server, JSONL, and session tools
src/vouch/server.py, src/vouch/jsonl_server.py, src/vouch/sessions.py
MCP and JSONL surfaces add statistics, synthesis, compilation, review, maintenance, provenance, themes, trust wrapping, and session push handling.
Bundle import/export integrity
src/vouch/bundle.py
Bundle validation now checks safe paths, manifest hashes, source addressing, graph references, and write-time integrity.
Project records and automation
.github/workflows/*, .vouch/*, CHANGELOG.md, CONTRIBUTING.md, README.md, docs/superpowers/*
A non-blocking weekly dependency audit, Vouch records, documentation updates, and a multi-project review UI design record are added.
Desktop and specification removal
desktop/*, spec/*, migrations/README.md, .pre-commit-config.yaml
The Electron desktop application, its tests/configuration, pre-commit hooks, and multiple specification documents are removed or emptied.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

  • vouchdev/vouch#421 — Overlaps with the retrieval, context-pack, embedding, provenance, storage, and health changes.
  • vouchdev/vouch#43 — Shares the context-pack backend, explanation, and server integration changes.
  • vouchdev/vouch#75 — Shares manifest member hash verification in bundle imports.

Suggested labels: retrieval, ci

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.74% 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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main changes: salience recording in Claude Code's context hook and the Codex hook wiring.
✨ 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 ci github actions and automation cli command line interface adapters agent host adapters and install manifests openclaw openclaw integration mcp mcp, jsonl, and http surfaces storage kb storage, migrations, schemas, and proposals retrieval context, search, synthesis, and evaluation embeddings embedding-backed retrieval tests tests and fixtures size: XL 1000 or more changed non-doc lines labels Jul 10, 2026
@Tet-9 Tet-9 changed the base branch from main to test July 10, 2026 15:22
@github-actions github-actions Bot added size: S 50-199 changed non-doc lines and removed ci github actions and automation mcp mcp, jsonl, and http surfaces storage kb storage, migrations, schemas, and proposals retrieval context, search, synthesis, and evaluation embeddings embedding-backed retrieval size: XL 1000 or more changed non-doc lines labels Jul 10, 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: 8

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

577-590: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add hooks_path.is_file() assertion for consistency with existing tests.

The existing test_codex_t4_writes_hooks_json (line 534) asserts hooks_path.is_file() before reading. The new test reads hooks_path.read_text() directly — if the file is missing, the failure presents as a FileNotFoundError rather than a clear assertion message.

♻️ Suggested fix
     result = install("codex", target=tmp_path, tier="T4")
     hooks_path = tmp_path / ".codex" / "hooks.json"
+    assert hooks_path.is_file()
     data = json.loads(hooks_path.read_text(encoding="utf-8"))
🤖 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 577 - 590, Add an explicit
hooks_path.is_file() assertion in test_codex_t4_writes_user_prompt_submit_hook
before reading hooks_path, matching test_codex_t4_writes_hooks_json and
providing a clear failure when the file is missing.
src/vouch/context.py (1)

346-359: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Return type annotation is misleading — function always returns a dict.

build_context_pack is annotated -> ContextPack | dict[str, Any], but the body always calls pack.model_dump() and returns a dict[str, Any]. The ContextPack branch is never taken, so any caller doing isinstance(result, ContextPack) has dead code. If the union is kept for backward compatibility during a gradual migration, a brief comment explaining why would help future readers.

♻️ Suggested fix
-) -> ContextPack | dict[str, Any]:
+) -> dict[str, Any]:

If callers still depend on the union for type-checking during migration, alternatively add a comment:

 ) -> ContextPack | dict[str, Any]:
+    # Always returns a dict (model_dump). Union kept for caller
+    # type-compat during the migration off raw ContextPack returns.
🤖 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/context.py` around lines 346 - 359, Update the return annotation of
build_context_pack to dict[str, Any], matching its unconditional
pack.model_dump() return value, and remove any dead ContextPack type handling in
callers. If backward compatibility requires retaining the union, add a brief
comment documenting the migration rationale.
🤖 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 @.github/workflows/security-audit.yml:
- Around line 21-25: Move continue-on-error: true from the job definition to the
pip-audit audit step in the security workflow. Keep setup steps such as
checkout, Python configuration, and dependency installation blocking on failure,
while allowing only vulnerability findings from the audit command to be
non-blocking.

In @.vouch/captures/ec4b8842-f167-467e-a33c-dc87911c9e0e.jsonl:
- Around line 1-36: Remove the raw shell-history capture containing host paths,
account activity, repository details, and mutating commands; do not commit this
session record. Replace it with a sanitized, normalized artifact containing only
derived project facts, or redact sensitive metadata and command history before
committing.

In @.vouch/decided/20260707-092531-154cb163.yaml:
- Around line 41-45: Replace the placeholder decision_reason value "yes" with
the actual rationale for the rejected decision, preserving the existing schema
and YAML structure; use null only if the schema explicitly allows an absent
reason.

In @.vouch/decided/20260707-093005-05345f47.yaml:
- Around line 19-21: Redact the machine-local filesystem paths in the durable
session summary, including entries under /home/a/.claude and /tmp/claude-1000.
Replace them with repository-relative references where applicable, or remove
them if no portable equivalent exists.

In
@.vouch/pages/session-what-are-the-non-development-related-files-and-folde.md:
- Around line 36-38: Remove or sanitize the machine-specific `/home/a/...` and
`/tmp/...` entries in the session-record page, including the corresponding
entries at the additionally referenced section, replacing them with generic
placeholders or omitting them before committing.

In `@CONTRIBUTING.md`:
- Around line 128-130: Update the contribution requirements to require evidence
appropriate to the changed interface: request vouch-ui screenshots or screen
recordings for webapp changes, and terminal transcripts or equivalent evidence
for CLI output, hooks, or other non-webapp user-facing behavior.

In `@docs/superpowers/specs/2026-07-06-review-ui-multi-kb-design.md`:
- Around line 4-9: Update the status note to reference an immutable commit SHA
or release tag for the shipped implementation instead of the local vouch-ui path
alone, and explicitly label the unpushed feat/review-ui-multi-kb branch as
reference-only.

In `@src/vouch/server.py`:
- Around line 853-864: Remove the unused backfill parameter from
kb_reindex_embeddings and update its callers or, if the flag is required by the
API, pass it through to backfill_embeddings so it changes behavior. Ensure the
function signature, invocation, and related documentation consistently reflect
the chosen behavior.

---

Nitpick comments:
In `@src/vouch/context.py`:
- Around line 346-359: Update the return annotation of build_context_pack to
dict[str, Any], matching its unconditional pack.model_dump() return value, and
remove any dead ContextPack type handling in callers. If backward compatibility
requires retaining the union, add a brief comment documenting the migration
rationale.

In `@tests/test_install_adapter.py`:
- Around line 577-590: Add an explicit hooks_path.is_file() assertion in
test_codex_t4_writes_user_prompt_submit_hook before reading hooks_path, matching
test_codex_t4_writes_hooks_json and providing a clear failure when the file is
missing.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e2cd023b-a81e-466a-9c38-706e0284211e

📥 Commits

Reviewing files that changed from the base of the PR and between 5c98a3a and 4ad03d9.

⛔ Files ignored due to path filters (6)
  • desktop/docs/screenshots/browse.png is excluded by !**/*.png
  • desktop/docs/screenshots/dashboard.png is excluded by !**/*.png
  • desktop/docs/screenshots/dual-solve.png is excluded by !**/*.png
  • desktop/docs/screenshots/review.png is excluded by !**/*.png
  • desktop/package-lock.json is excluded by !**/package-lock.json
  • docs/banner.svg is excluded by !**/*.svg
📒 Files selected for processing (128)
  • .github/workflows/security-audit.yml
  • .pre-commit-config.yaml
  • .vouch/captures/1218169c-de25-48f4-bd93-70ff77d2fda2.jsonl
  • .vouch/captures/5720220c-b77c-4947-aeec-9d6ef91d70b8.jsonl
  • .vouch/captures/8a6df051-6c56-4d86-b0ed-66f6638ecfdc.jsonl
  • .vouch/captures/ec4b8842-f167-467e-a33c-dc87911c9e0e.jsonl
  • .vouch/claims/vouch-starter-reviewed-knowledge.yaml
  • .vouch/decided/20260707-092531-154cb163.yaml
  • .vouch/decided/20260707-093005-05345f47.yaml
  • .vouch/decided/20260707-093125-4d6972f9.yaml
  • .vouch/pages/edit-in-obsidian.md
  • .vouch/pages/reviewed-knowledge-store.md
  • .vouch/pages/session-what-are-the-non-development-related-files-and-folde.md
  • .vouch/schema_version
  • .vouch/sources/be7aec64b0fc803a33cb3d610f67ae95e636877db20231ef72440a7cbe6b69d2/content
  • .vouch/sources/be7aec64b0fc803a33cb3d610f67ae95e636877db20231ef72440a7cbe6b69d2/meta.yaml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • adapters/codex/hooks.json
  • adapters/codex/install.yaml
  • adapters/cursor/install.yaml
  • adapters/openclaw/install.yaml
  • desktop/.gitignore
  • desktop/CHANGELOG.md
  • desktop/LICENSE
  • desktop/README.md
  • desktop/docs/architecture.md
  • desktop/docs/reports/2026-06-26.md
  • desktop/electron-builder.yml
  • desktop/electron.vite.config.ts
  • desktop/package.json
  • desktop/resources/vouch/.gitkeep
  • desktop/scripts/dev-with-vouch.ts
  • desktop/scripts/gen-methods.ts
  • desktop/src/catalog/backend.json
  • desktop/src/catalog/methods.json
  • desktop/src/main/http-client.ts
  • desktop/src/main/index.ts
  • desktop/src/main/ipc.ts
  • desktop/src/main/jsonl-client.ts
  • desktop/src/main/kb-store.ts
  • desktop/src/main/supervisor.ts
  • desktop/src/main/tray.ts
  • desktop/src/main/types.ts
  • desktop/src/main/vouch-locator.ts
  • desktop/src/preload/index.ts
  • desktop/src/renderer/index.html
  • desktop/src/renderer/src/App.tsx
  • desktop/src/renderer/src/app.css
  • desktop/src/renderer/src/components/Diff.tsx
  • desktop/src/renderer/src/components/Drawer.tsx
  • desktop/src/renderer/src/components/EmptyState.tsx
  • desktop/src/renderer/src/components/MethodCard.tsx
  • desktop/src/renderer/src/components/MethodForm.tsx
  • desktop/src/renderer/src/components/Placeholder.tsx
  • desktop/src/renderer/src/components/Rail.tsx
  • desktop/src/renderer/src/components/StatusBar.tsx
  • desktop/src/renderer/src/components/Topbar.tsx
  • desktop/src/renderer/src/components/controls/index.tsx
  • desktop/src/renderer/src/components/results/Cards.tsx
  • desktop/src/renderer/src/components/results/JsonTree.tsx
  • desktop/src/renderer/src/components/results/Renderers.tsx
  • desktop/src/renderer/src/components/results/ResultView.tsx
  • desktop/src/renderer/src/components/results/atoms.tsx
  • desktop/src/renderer/src/global.d.ts
  • desktop/src/renderer/src/lib/VouchContext.tsx
  • desktop/src/renderer/src/lib/client.ts
  • desktop/src/renderer/src/lib/format.ts
  • desktop/src/renderer/src/lib/useOnOpen.tsx
  • desktop/src/renderer/src/lib/useVouchEvents.ts
  • desktop/src/renderer/src/main.tsx
  • desktop/src/renderer/src/views/Dashboard.tsx
  • desktop/src/renderer/src/views/DualSolve.tsx
  • desktop/src/renderer/src/views/GenericView.tsx
  • desktop/src/renderer/src/views/Review.tsx
  • desktop/src/renderer/src/views/blurbs.ts
  • desktop/src/renderer/src/views/registry.tsx
  • desktop/src/shared/ipc.ts
  • desktop/src/shared/methods.gen.ts
  • desktop/src/shared/methods.types.ts
  • desktop/test/catalog.test.ts
  • desktop/test/controls.test.tsx
  • desktop/test/gen-methods.test.ts
  • desktop/test/http-client.test.ts
  • desktop/test/jsonl-client.test.ts
  • desktop/test/method-card.test.tsx
  • desktop/test/method-form.test.tsx
  • desktop/test/method-gate.test.ts
  • desktop/test/smoke-jsonl.ts
  • desktop/test/vouch-locator.test.ts
  • desktop/tsconfig.json
  • desktop/tsconfig.node.json
  • desktop/tsconfig.scripts.json
  • desktop/tsconfig.web.json
  • desktop/vitest.config.ts
  • docs/superpowers/specs/2026-07-06-review-ui-multi-kb-design.md
  • migrations/README.md
  • spec/2026-05-21/README.md
  • spec/2026-05-21/SPEC.md
  • spec/2026-05-21/audit-vocabulary.md
  • spec/2026-05-21/methods.md
  • spec/2026-05-21/retrieval.md
  • spec/2026-05-21/review-gate.md
  • spec/2026-05-21/transports.md
  • spec/README.md
  • spec/audit-vocabulary.md
  • spec/methods.md
  • spec/retrieval.md
  • spec/review-gate.md
  • spec/transports.md
  • src/vouch/bundle.py
  • src/vouch/cli.py
  • src/vouch/context.py
  • src/vouch/embeddings/base.py
  • src/vouch/health.py
  • src/vouch/hooks.py
  • src/vouch/index_db.py
  • src/vouch/jsonl_server.py
  • src/vouch/server.py
  • src/vouch/sessions.py
  • src/vouch/storage.py
  • tests/embeddings/conftest.py
  • tests/embeddings/test_integration.py
  • tests/embeddings/test_search.py
  • tests/test_cli.py
  • tests/test_hooks.py
  • tests/test_install_adapter.py
💤 Files with no reviewable changes (87)
  • desktop/LICENSE
  • spec/retrieval.md
  • desktop/src/renderer/src/components/Placeholder.tsx
  • desktop/docs/reports/2026-06-26.md
  • desktop/test/catalog.test.ts
  • desktop/src/main/kb-store.ts
  • desktop/src/renderer/src/views/blurbs.ts
  • desktop/src/renderer/src/App.tsx
  • desktop/test/jsonl-client.test.ts
  • desktop/package.json
  • desktop/README.md
  • spec/README.md
  • spec/transports.md
  • desktop/test/http-client.test.ts
  • desktop/src/renderer/src/components/StatusBar.tsx
  • spec/methods.md
  • spec/2026-05-21/retrieval.md
  • desktop/src/renderer/src/components/EmptyState.tsx
  • desktop/src/renderer/index.html
  • desktop/src/renderer/src/lib/format.ts
  • migrations/README.md
  • spec/2026-05-21/methods.md
  • spec/2026-05-21/review-gate.md
  • desktop/src/main/supervisor.ts
  • desktop/src/renderer/src/components/Drawer.tsx
  • .pre-commit-config.yaml
  • desktop/src/renderer/src/global.d.ts
  • desktop/test/method-gate.test.ts
  • desktop/CHANGELOG.md
  • spec/2026-05-21/transports.md
  • desktop/scripts/dev-with-vouch.ts
  • spec/audit-vocabulary.md
  • desktop/src/main/ipc.ts
  • desktop/src/renderer/src/views/registry.tsx
  • desktop/src/main/types.ts
  • desktop/src/renderer/src/main.tsx
  • desktop/vitest.config.ts
  • spec/2026-05-21/README.md
  • desktop/src/renderer/src/views/Review.tsx
  • desktop/tsconfig.web.json
  • desktop/.gitignore
  • desktop/src/main/http-client.ts
  • desktop/test/method-card.test.tsx
  • desktop/src/renderer/src/components/MethodCard.tsx
  • desktop/src/renderer/src/components/Rail.tsx
  • desktop/test/controls.test.tsx
  • spec/review-gate.md
  • desktop/electron-builder.yml
  • desktop/src/renderer/src/app.css
  • desktop/src/catalog/backend.json
  • desktop/src/shared/methods.gen.ts
  • desktop/electron.vite.config.ts
  • desktop/test/vouch-locator.test.ts
  • desktop/src/renderer/src/components/Diff.tsx
  • spec/2026-05-21/SPEC.md
  • desktop/src/renderer/src/components/results/ResultView.tsx
  • desktop/scripts/gen-methods.ts
  • desktop/src/renderer/src/components/results/atoms.tsx
  • desktop/src/renderer/src/lib/VouchContext.tsx
  • desktop/src/main/tray.ts
  • desktop/src/renderer/src/components/MethodForm.tsx
  • desktop/src/renderer/src/components/results/JsonTree.tsx
  • desktop/tsconfig.node.json
  • desktop/src/renderer/src/lib/useOnOpen.tsx
  • desktop/test/method-form.test.tsx
  • spec/2026-05-21/audit-vocabulary.md
  • desktop/src/main/vouch-locator.ts
  • desktop/src/renderer/src/lib/client.ts
  • desktop/src/renderer/src/views/GenericView.tsx
  • desktop/tsconfig.scripts.json
  • desktop/src/shared/methods.types.ts
  • desktop/test/gen-methods.test.ts
  • desktop/tsconfig.json
  • desktop/src/catalog/methods.json
  • desktop/src/renderer/src/components/Topbar.tsx
  • desktop/src/renderer/src/lib/useVouchEvents.ts
  • desktop/docs/architecture.md
  • desktop/src/renderer/src/views/DualSolve.tsx
  • desktop/test/smoke-jsonl.ts
  • desktop/src/shared/ipc.ts
  • desktop/src/main/index.ts
  • desktop/src/preload/index.ts
  • desktop/src/renderer/src/components/results/Renderers.tsx
  • desktop/src/main/jsonl-client.ts
  • desktop/src/renderer/src/components/controls/index.tsx
  • desktop/src/renderer/src/components/results/Cards.tsx
  • desktop/src/renderer/src/views/Dashboard.tsx

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 8

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

577-590: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add hooks_path.is_file() assertion for consistency with existing tests.

The existing test_codex_t4_writes_hooks_json (line 534) asserts hooks_path.is_file() before reading. The new test reads hooks_path.read_text() directly — if the file is missing, the failure presents as a FileNotFoundError rather than a clear assertion message.

♻️ Suggested fix
     result = install("codex", target=tmp_path, tier="T4")
     hooks_path = tmp_path / ".codex" / "hooks.json"
+    assert hooks_path.is_file()
     data = json.loads(hooks_path.read_text(encoding="utf-8"))
🤖 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 577 - 590, Add an explicit
hooks_path.is_file() assertion in test_codex_t4_writes_user_prompt_submit_hook
before reading hooks_path, matching test_codex_t4_writes_hooks_json and
providing a clear failure when the file is missing.
src/vouch/context.py (1)

346-359: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Return type annotation is misleading — function always returns a dict.

build_context_pack is annotated -> ContextPack | dict[str, Any], but the body always calls pack.model_dump() and returns a dict[str, Any]. The ContextPack branch is never taken, so any caller doing isinstance(result, ContextPack) has dead code. If the union is kept for backward compatibility during a gradual migration, a brief comment explaining why would help future readers.

♻️ Suggested fix
-) -> ContextPack | dict[str, Any]:
+) -> dict[str, Any]:

If callers still depend on the union for type-checking during migration, alternatively add a comment:

 ) -> ContextPack | dict[str, Any]:
+    # Always returns a dict (model_dump). Union kept for caller
+    # type-compat during the migration off raw ContextPack returns.
🤖 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/context.py` around lines 346 - 359, Update the return annotation of
build_context_pack to dict[str, Any], matching its unconditional
pack.model_dump() return value, and remove any dead ContextPack type handling in
callers. If backward compatibility requires retaining the union, add a brief
comment documenting the migration rationale.
🤖 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 @.github/workflows/security-audit.yml:
- Around line 21-25: Move continue-on-error: true from the job definition to the
pip-audit audit step in the security workflow. Keep setup steps such as
checkout, Python configuration, and dependency installation blocking on failure,
while allowing only vulnerability findings from the audit command to be
non-blocking.

In @.vouch/captures/ec4b8842-f167-467e-a33c-dc87911c9e0e.jsonl:
- Around line 1-36: Remove the raw shell-history capture containing host paths,
account activity, repository details, and mutating commands; do not commit this
session record. Replace it with a sanitized, normalized artifact containing only
derived project facts, or redact sensitive metadata and command history before
committing.

In @.vouch/decided/20260707-092531-154cb163.yaml:
- Around line 41-45: Replace the placeholder decision_reason value "yes" with
the actual rationale for the rejected decision, preserving the existing schema
and YAML structure; use null only if the schema explicitly allows an absent
reason.

In @.vouch/decided/20260707-093005-05345f47.yaml:
- Around line 19-21: Redact the machine-local filesystem paths in the durable
session summary, including entries under /home/a/.claude and /tmp/claude-1000.
Replace them with repository-relative references where applicable, or remove
them if no portable equivalent exists.

In
@.vouch/pages/session-what-are-the-non-development-related-files-and-folde.md:
- Around line 36-38: Remove or sanitize the machine-specific `/home/a/...` and
`/tmp/...` entries in the session-record page, including the corresponding
entries at the additionally referenced section, replacing them with generic
placeholders or omitting them before committing.

In `@CONTRIBUTING.md`:
- Around line 128-130: Update the contribution requirements to require evidence
appropriate to the changed interface: request vouch-ui screenshots or screen
recordings for webapp changes, and terminal transcripts or equivalent evidence
for CLI output, hooks, or other non-webapp user-facing behavior.

In `@docs/superpowers/specs/2026-07-06-review-ui-multi-kb-design.md`:
- Around line 4-9: Update the status note to reference an immutable commit SHA
or release tag for the shipped implementation instead of the local vouch-ui path
alone, and explicitly label the unpushed feat/review-ui-multi-kb branch as
reference-only.

In `@src/vouch/server.py`:
- Around line 853-864: Remove the unused backfill parameter from
kb_reindex_embeddings and update its callers or, if the flag is required by the
API, pass it through to backfill_embeddings so it changes behavior. Ensure the
function signature, invocation, and related documentation consistently reflect
the chosen behavior.

---

Nitpick comments:
In `@src/vouch/context.py`:
- Around line 346-359: Update the return annotation of build_context_pack to
dict[str, Any], matching its unconditional pack.model_dump() return value, and
remove any dead ContextPack type handling in callers. If backward compatibility
requires retaining the union, add a brief comment documenting the migration
rationale.

In `@tests/test_install_adapter.py`:
- Around line 577-590: Add an explicit hooks_path.is_file() assertion in
test_codex_t4_writes_user_prompt_submit_hook before reading hooks_path, matching
test_codex_t4_writes_hooks_json and providing a clear failure when the file is
missing.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e2cd023b-a81e-466a-9c38-706e0284211e

📥 Commits

Reviewing files that changed from the base of the PR and between 5c98a3a and 4ad03d9.

⛔ Files ignored due to path filters (6)
  • desktop/docs/screenshots/browse.png is excluded by !**/*.png
  • desktop/docs/screenshots/dashboard.png is excluded by !**/*.png
  • desktop/docs/screenshots/dual-solve.png is excluded by !**/*.png
  • desktop/docs/screenshots/review.png is excluded by !**/*.png
  • desktop/package-lock.json is excluded by !**/package-lock.json
  • docs/banner.svg is excluded by !**/*.svg
📒 Files selected for processing (128)
  • .github/workflows/security-audit.yml
  • .pre-commit-config.yaml
  • .vouch/captures/1218169c-de25-48f4-bd93-70ff77d2fda2.jsonl
  • .vouch/captures/5720220c-b77c-4947-aeec-9d6ef91d70b8.jsonl
  • .vouch/captures/8a6df051-6c56-4d86-b0ed-66f6638ecfdc.jsonl
  • .vouch/captures/ec4b8842-f167-467e-a33c-dc87911c9e0e.jsonl
  • .vouch/claims/vouch-starter-reviewed-knowledge.yaml
  • .vouch/decided/20260707-092531-154cb163.yaml
  • .vouch/decided/20260707-093005-05345f47.yaml
  • .vouch/decided/20260707-093125-4d6972f9.yaml
  • .vouch/pages/edit-in-obsidian.md
  • .vouch/pages/reviewed-knowledge-store.md
  • .vouch/pages/session-what-are-the-non-development-related-files-and-folde.md
  • .vouch/schema_version
  • .vouch/sources/be7aec64b0fc803a33cb3d610f67ae95e636877db20231ef72440a7cbe6b69d2/content
  • .vouch/sources/be7aec64b0fc803a33cb3d610f67ae95e636877db20231ef72440a7cbe6b69d2/meta.yaml
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • adapters/codex/hooks.json
  • adapters/codex/install.yaml
  • adapters/cursor/install.yaml
  • adapters/openclaw/install.yaml
  • desktop/.gitignore
  • desktop/CHANGELOG.md
  • desktop/LICENSE
  • desktop/README.md
  • desktop/docs/architecture.md
  • desktop/docs/reports/2026-06-26.md
  • desktop/electron-builder.yml
  • desktop/electron.vite.config.ts
  • desktop/package.json
  • desktop/resources/vouch/.gitkeep
  • desktop/scripts/dev-with-vouch.ts
  • desktop/scripts/gen-methods.ts
  • desktop/src/catalog/backend.json
  • desktop/src/catalog/methods.json
  • desktop/src/main/http-client.ts
  • desktop/src/main/index.ts
  • desktop/src/main/ipc.ts
  • desktop/src/main/jsonl-client.ts
  • desktop/src/main/kb-store.ts
  • desktop/src/main/supervisor.ts
  • desktop/src/main/tray.ts
  • desktop/src/main/types.ts
  • desktop/src/main/vouch-locator.ts
  • desktop/src/preload/index.ts
  • desktop/src/renderer/index.html
  • desktop/src/renderer/src/App.tsx
  • desktop/src/renderer/src/app.css
  • desktop/src/renderer/src/components/Diff.tsx
  • desktop/src/renderer/src/components/Drawer.tsx
  • desktop/src/renderer/src/components/EmptyState.tsx
  • desktop/src/renderer/src/components/MethodCard.tsx
  • desktop/src/renderer/src/components/MethodForm.tsx
  • desktop/src/renderer/src/components/Placeholder.tsx
  • desktop/src/renderer/src/components/Rail.tsx
  • desktop/src/renderer/src/components/StatusBar.tsx
  • desktop/src/renderer/src/components/Topbar.tsx
  • desktop/src/renderer/src/components/controls/index.tsx
  • desktop/src/renderer/src/components/results/Cards.tsx
  • desktop/src/renderer/src/components/results/JsonTree.tsx
  • desktop/src/renderer/src/components/results/Renderers.tsx
  • desktop/src/renderer/src/components/results/ResultView.tsx
  • desktop/src/renderer/src/components/results/atoms.tsx
  • desktop/src/renderer/src/global.d.ts
  • desktop/src/renderer/src/lib/VouchContext.tsx
  • desktop/src/renderer/src/lib/client.ts
  • desktop/src/renderer/src/lib/format.ts
  • desktop/src/renderer/src/lib/useOnOpen.tsx
  • desktop/src/renderer/src/lib/useVouchEvents.ts
  • desktop/src/renderer/src/main.tsx
  • desktop/src/renderer/src/views/Dashboard.tsx
  • desktop/src/renderer/src/views/DualSolve.tsx
  • desktop/src/renderer/src/views/GenericView.tsx
  • desktop/src/renderer/src/views/Review.tsx
  • desktop/src/renderer/src/views/blurbs.ts
  • desktop/src/renderer/src/views/registry.tsx
  • desktop/src/shared/ipc.ts
  • desktop/src/shared/methods.gen.ts
  • desktop/src/shared/methods.types.ts
  • desktop/test/catalog.test.ts
  • desktop/test/controls.test.tsx
  • desktop/test/gen-methods.test.ts
  • desktop/test/http-client.test.ts
  • desktop/test/jsonl-client.test.ts
  • desktop/test/method-card.test.tsx
  • desktop/test/method-form.test.tsx
  • desktop/test/method-gate.test.ts
  • desktop/test/smoke-jsonl.ts
  • desktop/test/vouch-locator.test.ts
  • desktop/tsconfig.json
  • desktop/tsconfig.node.json
  • desktop/tsconfig.scripts.json
  • desktop/tsconfig.web.json
  • desktop/vitest.config.ts
  • docs/superpowers/specs/2026-07-06-review-ui-multi-kb-design.md
  • migrations/README.md
  • spec/2026-05-21/README.md
  • spec/2026-05-21/SPEC.md
  • spec/2026-05-21/audit-vocabulary.md
  • spec/2026-05-21/methods.md
  • spec/2026-05-21/retrieval.md
  • spec/2026-05-21/review-gate.md
  • spec/2026-05-21/transports.md
  • spec/README.md
  • spec/audit-vocabulary.md
  • spec/methods.md
  • spec/retrieval.md
  • spec/review-gate.md
  • spec/transports.md
  • src/vouch/bundle.py
  • src/vouch/cli.py
  • src/vouch/context.py
  • src/vouch/embeddings/base.py
  • src/vouch/health.py
  • src/vouch/hooks.py
  • src/vouch/index_db.py
  • src/vouch/jsonl_server.py
  • src/vouch/server.py
  • src/vouch/sessions.py
  • src/vouch/storage.py
  • tests/embeddings/conftest.py
  • tests/embeddings/test_integration.py
  • tests/embeddings/test_search.py
  • tests/test_cli.py
  • tests/test_hooks.py
  • tests/test_install_adapter.py
💤 Files with no reviewable changes (87)
  • desktop/LICENSE
  • spec/retrieval.md
  • desktop/src/renderer/src/components/Placeholder.tsx
  • desktop/docs/reports/2026-06-26.md
  • desktop/test/catalog.test.ts
  • desktop/src/main/kb-store.ts
  • desktop/src/renderer/src/views/blurbs.ts
  • desktop/src/renderer/src/App.tsx
  • desktop/test/jsonl-client.test.ts
  • desktop/package.json
  • desktop/README.md
  • spec/README.md
  • spec/transports.md
  • desktop/test/http-client.test.ts
  • desktop/src/renderer/src/components/StatusBar.tsx
  • spec/methods.md
  • spec/2026-05-21/retrieval.md
  • desktop/src/renderer/src/components/EmptyState.tsx
  • desktop/src/renderer/index.html
  • desktop/src/renderer/src/lib/format.ts
  • migrations/README.md
  • spec/2026-05-21/methods.md
  • spec/2026-05-21/review-gate.md
  • desktop/src/main/supervisor.ts
  • desktop/src/renderer/src/components/Drawer.tsx
  • .pre-commit-config.yaml
  • desktop/src/renderer/src/global.d.ts
  • desktop/test/method-gate.test.ts
  • desktop/CHANGELOG.md
  • spec/2026-05-21/transports.md
  • desktop/scripts/dev-with-vouch.ts
  • spec/audit-vocabulary.md
  • desktop/src/main/ipc.ts
  • desktop/src/renderer/src/views/registry.tsx
  • desktop/src/main/types.ts
  • desktop/src/renderer/src/main.tsx
  • desktop/vitest.config.ts
  • spec/2026-05-21/README.md
  • desktop/src/renderer/src/views/Review.tsx
  • desktop/tsconfig.web.json
  • desktop/.gitignore
  • desktop/src/main/http-client.ts
  • desktop/test/method-card.test.tsx
  • desktop/src/renderer/src/components/MethodCard.tsx
  • desktop/src/renderer/src/components/Rail.tsx
  • desktop/test/controls.test.tsx
  • spec/review-gate.md
  • desktop/electron-builder.yml
  • desktop/src/renderer/src/app.css
  • desktop/src/catalog/backend.json
  • desktop/src/shared/methods.gen.ts
  • desktop/electron.vite.config.ts
  • desktop/test/vouch-locator.test.ts
  • desktop/src/renderer/src/components/Diff.tsx
  • spec/2026-05-21/SPEC.md
  • desktop/src/renderer/src/components/results/ResultView.tsx
  • desktop/scripts/gen-methods.ts
  • desktop/src/renderer/src/components/results/atoms.tsx
  • desktop/src/renderer/src/lib/VouchContext.tsx
  • desktop/src/main/tray.ts
  • desktop/src/renderer/src/components/MethodForm.tsx
  • desktop/src/renderer/src/components/results/JsonTree.tsx
  • desktop/tsconfig.node.json
  • desktop/src/renderer/src/lib/useOnOpen.tsx
  • desktop/test/method-form.test.tsx
  • spec/2026-05-21/audit-vocabulary.md
  • desktop/src/main/vouch-locator.ts
  • desktop/src/renderer/src/lib/client.ts
  • desktop/src/renderer/src/views/GenericView.tsx
  • desktop/tsconfig.scripts.json
  • desktop/src/shared/methods.types.ts
  • desktop/test/gen-methods.test.ts
  • desktop/tsconfig.json
  • desktop/src/catalog/methods.json
  • desktop/src/renderer/src/components/Topbar.tsx
  • desktop/src/renderer/src/lib/useVouchEvents.ts
  • desktop/docs/architecture.md
  • desktop/src/renderer/src/views/DualSolve.tsx
  • desktop/test/smoke-jsonl.ts
  • desktop/src/shared/ipc.ts
  • desktop/src/main/index.ts
  • desktop/src/preload/index.ts
  • desktop/src/renderer/src/components/results/Renderers.tsx
  • desktop/src/main/jsonl-client.ts
  • desktop/src/renderer/src/components/controls/index.tsx
  • desktop/src/renderer/src/components/results/Cards.tsx
  • desktop/src/renderer/src/views/Dashboard.tsx
🛑 Comments failed to post (8)
.github/workflows/security-audit.yml (1)

21-25: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Limit continue-on-error to the audit step.

With this job-level setting, failures in checkout, Python setup, or pip install -e . are reported as successful, so the workflow can provide false assurance without performing an audit. Keep vulnerability findings non-blocking by moving continue-on-error: true to the audit step instead.

Suggested fix
   audit:
     name: pip-audit
     runs-on: ubuntu-latest
     timeout-minutes: 15
-    continue-on-error: true
     steps:
@@
       - name: audit
+        continue-on-error: true
         run: pip-audit --desc
🤖 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 @.github/workflows/security-audit.yml around lines 21 - 25, Move
continue-on-error: true from the job definition to the pip-audit audit step in
the security workflow. Keep setup steps such as checkout, Python configuration,
and dependency installation blocking on failure, while allowing only
vulnerability findings from the audit command to be non-blocking.
.vouch/captures/ec4b8842-f167-467e-a33c-dc87911c9e0e.jsonl (1)

1-36: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not commit raw shell-history captures with host metadata.

This record exposes absolute local paths, GitHub account activity, branch/remotes, and mutating commands such as gh pr merge. Redact or normalize session captures before committing; retain only derived project facts.

🤖 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 @.vouch/captures/ec4b8842-f167-467e-a33c-dc87911c9e0e.jsonl around lines 1 -
36, Remove the raw shell-history capture containing host paths, account
activity, repository details, and mutating commands; do not commit this session
record. Replace it with a sanitized, normalized artifact containing only derived
project facts, or redact sensitive metadata and command history before
committing.
.vouch/decided/20260707-092531-154cb163.yaml (1)

41-45: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Record a meaningful rejection reason.

status: rejected with decision_reason: 'yes' is semantically invalid and leaves consumers unable to explain the decision. Store the actual rationale, or use null only if the schema explicitly permits an absent reason.

🤖 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 @.vouch/decided/20260707-092531-154cb163.yaml around lines 41 - 45, Replace
the placeholder decision_reason value "yes" with the actual rationale for the
rejected decision, preserving the existing schema and YAML structure; use null
only if the schema explicitly allows an absent reason.
.vouch/decided/20260707-093005-05345f47.yaml (1)

19-21: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Redact machine-local paths before approving this record.

The durable session summary includes private filesystem locations under /home/a/.claude and /tmp/claude-1000. These paths are not portable and expose local environment metadata; normalize them to repository-relative references or omit them.

🤖 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 @.vouch/decided/20260707-093005-05345f47.yaml around lines 19 - 21, Redact
the machine-local filesystem paths in the durable session summary, including
entries under /home/a/.claude and /tmp/claude-1000. Replace them with
repository-relative references where applicable, or remove them if no portable
equivalent exists.
.vouch/pages/session-what-are-the-non-development-related-files-and-folde.md (1)

36-38: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Redact machine-specific paths before committing session records.

This page persists /home/a/... and /tmp/... paths, exposing local usernames, workspace locations, and scratchpad details in repository history. Normalize these paths to placeholders or omit them before generating the committed record.

Also applies to: 71-72

🤖 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 @.vouch/pages/session-what-are-the-non-development-related-files-and-folde.md
around lines 36 - 38, Remove or sanitize the machine-specific `/home/a/...` and
`/tmp/...` entries in the session-record page, including the corresponding
entries at the additionally referenced section, replacing them with generic
placeholders or omitting them before committing.
CONTRIBUTING.md (1)

128-130: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use evidence appropriate to the changed interface.

This requirement applies to CLI and other user-facing changes but only accepts a vouch-ui recording, which cannot demonstrate CLI output or hook behavior. Require webapp screenshots for webapp changes, and terminal transcripts or equivalent evidence for CLI changes.

As per coding guidelines, this section defines required PR contents for webapp, CLI-output, and user-facing behavior changes.

🤖 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 `@CONTRIBUTING.md` around lines 128 - 130, Update the contribution requirements
to require evidence appropriate to the changed interface: request vouch-ui
screenshots or screen recordings for webapp changes, and terminal transcripts or
equivalent evidence for CLI output, hooks, or other non-webapp user-facing
behavior.

Source: Coding guidelines

docs/superpowers/specs/2026-07-06-review-ui-multi-kb-design.md (1)

4-9: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Make the shipped reference reproducible.

SHIPPED currently points to ~/Dev/plind-junior/vouch-ui and an unpushed branch, so readers cannot resolve the exact implementation. Record an immutable commit or release reference, and mark the local branch as reference-only.

🤖 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 `@docs/superpowers/specs/2026-07-06-review-ui-multi-kb-design.md` around lines
4 - 9, Update the status note to reference an immutable commit SHA or release
tag for the shipped implementation instead of the local vouch-ui path alone, and
explicitly label the unpushed feat/review-ui-multi-kb branch as reference-only.
src/vouch/server.py (1)

853-864: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Relevant tool definitions ==\n'
rg -n "def kb_reindex_embeddings|def _h_reindex_embeddings|backfill_embeddings\(" src/vouch/server.py src/vouch/jsonl_server.py src/vouch/capabilities.py src/vouch/cli.py

printf '\n== Surrounding context in src/vouch/server.py ==\n'
sed -n '840,880p' src/vouch/server.py

printf '\n== Surrounding context in src/vouch/jsonl_server.py ==\n'
sed -n '1,260p' src/vouch/jsonl_server.py

printf '\n== Surrounding context in src/vouch/cli.py ==\n'
sed -n '1,260p' src/vouch/cli.py

Repository: vouchdev/vouch

Length of output: 1951


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Locate the JSONL mirror and tool registration ==\n'
rg -n "_h_reindex_embeddings|kb_reindex_embeddings|reindex_embeddings" src/vouch

printf '\n== Show only the relevant slices if found ==\n'
for f in src/vouch/server.py src/vouch/jsonl_server.py src/vouch/cli.py src/vouch/capabilities.py; do
  if rg -q "reindex_embeddings" "$f"; then
    echo "--- $f ---"
    sed -n '840,880p' "$f" 2>/dev/null || true
    sed -n '1,220p' "$f" 2>/dev/null || true
  fi
done

Repository: vouchdev/vouch

Length of output: 1951


Remove or wire the unused backfill flag. kb_reindex_embeddings accepts backfill but always calls backfill_embeddings(store, force=force), so the parameter is a misleading no-op.

🤖 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/server.py` around lines 853 - 864, Remove the unused backfill
parameter from kb_reindex_embeddings and update its callers or, if the flag is
required by the API, pass it through to backfill_embeddings so it changes
behavior. Ensure the function signature, invocation, and related documentation
consistently reflect the chosen behavior.

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 cli command line interface docs documentation, specs, examples, and repo guidance openclaw openclaw integration size: S 50-199 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(adapters): UserPromptSubmit hook — inject approved knowledge before the model answers

1 participant