Repository navigation
Record the knowledge snapshot on every Direct review plan - #212
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5ec5cf166
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| knowledge_snapshot: str = "" | ||
| knowledge_tree_sha256: str = "" |
There was a problem hiding this comment.
Bump the Direct protocol version for the new fields
In a rolling or mixed-version deployment, get_capabilities() and each plan still advertise Direct 1.1.0 even though older 1.1 providers do not return these snapshot fields. A ReviewBot relying on the version handshake therefore cannot determine whether it can safely record the required knowledge provenance and may silently receive missing values. Increment DIRECT_API_VERSION and document the new contract version, as was done when the previous public Direct fields were introduced.
Useful? React with 👍 / 👎.
A review should record which knowledge it was served, so a finding can be traced to the exact rules that were active (the knowledge service now swaps snapshots at runtime). - DirectReviewPlan gains knowledge_snapshot (the activated snapshot id, "packaged", or "unverified") and knowledge_tree_sha256 (the manifest tree hash of a verified snapshot, else empty). Every document read under the plan's review_context_id comes from that same snapshot. Both fields default to empty, so existing callers are unaffected. - KnowledgeView.public_snapshot never exposes a development tree's absolute path. The old diagnostics value "unverified:/abs/path" leaked it into plans; diagnostics.knowledge_snapshot now uses the public form too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b5ec5cf to
c2fe833
Compare
PR 9 of the knowledge-service redesign: each Direct review plan now records which knowledge it was served.
DirectReviewPlan.knowledge_snapshot: the activated snapshot id,packaged, orunverified.DirectReviewPlan.knowledge_tree_sha256: the verified snapshot's manifest tree hash, or empty.review_context_idcomes from the same snapshot, so the review bot can record both values with each review.diagnostics.knowledge_snapshotvalue leaked a development tree's absolute path (unverified:/abs/path); it now uses the path-free public form.Commit hook approved; full suite and SPEC freshness pass locally.
🤖 Generated with Claude Code