feat(digest): vouch digest — read-only operator briefing (#324)#351
Open
dhgoal wants to merge 1 commit into
Open
feat(digest): vouch digest — read-only operator briefing (#324)#351dhgoal wants to merge 1 commit into
dhgoal wants to merge 1 commit into
Conversation
fold four viewports over an existing .vouch/ into one glance so an operator returning after a day or a week sees where to spend attention before opening the review queue: - pending proposals awaiting review, oldest proposed_at first (the same set as kb.list_pending, rendered as an actionable list) - approvals/rejections in a --since window, read from the authoritative audit.log.jsonl and titled from the decided/ record - active claims aged past --stale-days (the exact metrics/lint predicate) - citation-coverage movement over the window read-only by construction: it composes metrics.compute and store reads and never routes through propose_*/approve/reject, so the review gate is untouched and there is nothing to approve. no new on-disk state, no schema migration. --format text|json|markdown; the json shape is a documented, stable to_dict() schema. defaults to a 7d window since a digest is inherently "since last look". ships cli-only; a kb.digest mcp method is deferred to keep this one concern per pr.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This was referenced Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #324.
vouch metricsanswers "is the review gate healthy?" with aggregate gauges.vouch digestis its human-facing counterpart: named, oldest-first lists of what to act on now, folded into one glance for an operator returning to a kb after a day or a week.it composes four viewports over an existing
.vouch/, all derived from files that already exist on disk:store.list_proposals(PENDING), oldestproposed_atfirst (the same set behindkb.list_pending), shown as an actionable list rather than the countmetrics.pending_nowgives.audit.log.jsonlviaaudit.read_events, reusing the_APPROVE_RE/_REJECT_REmatching inmetrics.pyand titled best-effort from thedecided/record.last_confirmed_at or updated_at or created_at) is older than--stale-days, the exact predicate inmetrics._fill_corpus_metrics/vouch lint, listed oldest first.nowis reused verbatim frommetrics.computeso the digest never disagrees withvouch metrics;at window startis that same coverage restricted to the cohort of claims that already existed at the--sincecutoff (evaluated against the current source/evidence set — it shows how coverage moved as newer claims landed, not a historical snapshot, since vouch retains no past citation state). unbounded window → no baseline → delta is null.review gate & scope
read-only by construction. it calls
list_*/read_eventsand formats; it never routes throughpropose_*/approve/reject, so the review gate is untouched and there is nothing to approve. no new on-disk state, no schema migration —storage.pystays pure i/o and the compose logic lives in a newsrc/vouch/digest.py.tests/test_digest.py::test_digest_writes_nothingsnapshots every file's mtime+size and asserts a digest run creates/modifies nothing.surface
--sincereusesmetrics.parse_sinceverbatim (duration / iso date /all) but defaults to7dsince a digest is inherently "since last look".--stale-daysmirrorsmetrics.DEFAULT_STALE_DAYS.--limitcaps each list (default 10) so the briefing stays a briefing.--format jsonis a documented, stableto_dict()schema;markdownis pasteable into a standup note.shipped cli-only on purpose — the issue makes
kb.digestconditional ("if exposed over mcp…"), and the four-site registration is a separate concern; keeping this pr to one concern per CONTRIBUTING.compute_digest()+Digest.to_dict()are already factored so a follow-up can wire the mcp method with no rework.what breaks for an existing
.vouch/nothing. purely additive; a new read-only command over files that are already committed.
tests
tests/test_digest.py(15 tests): oldest-first pending ordering,--limitcapping whiletotalstays full, decision window-filtering (a 100d-old approval excluded from a 7d window) and all-history, the stale predicate (retired claims exempt), the coverage delta (null when unbounded; movement when a new uncited claim lands after the cutoff), empty-kb rendering, the stableto_dict()schema, bad-input errors, and the cli text/json/markdown paths.make checkgreen (pytest, mypy, ruff).