toolspace › registry › Muninn verify_patch
Muninn verify_patch
Semi-formal patch verification with outcome tracking. Sends a unified diff plus context to a Claude model with a structured premises/trace/regression-check template, stores the verification result in memory, and exposes review/stamp helpers for post-merge calibration.
Install
install-manifest install https://raw.githubusercontent.com/oaustegard/muninn-utilities/main/manifests/verify-patch/muninn-verify-patch.v0.4.json
manifest JSON · source · docs · issues · homepage
Security
| Kill switch | manual Manual procedure: — |
|---|---|
| Smoke contract | shell timeout 5s |
Scopes
-
anthropic.messageswrite anthropic-api-key (full account)Sends the patch + context + structured prompt to the Anthropic Messages API and reads the verdict. Per-call cost depends on patch size and selected model.
-
turso.libsqlread, write turso-token (single database)Persists the verification record (patch hash, verdict, tracking_id) and later stamps it with merge outcome. Reads via review_verifications to surface the recent prediction ledger.
-
net.outboundread, write api.anthropic.com, *.turso.ioapi.anthropic.com for model invocation; *.turso.io for memory writes.
Data boundary
Reads
turso.libsqlsensitivity: medium
Transmits
-
api.anthropic.com persistent-30d
model invocation for structured review
env.ANTHROPIC_API_KEYinput.patchinput.contextinput.description
-
*.turso.io persistent-indefinite
persist verification record and outcome stamp
env.TURSO_TOKENcomputed.verdictcomputed.tracking_id
Persists
—
Tool-local retention: 365 day(s).
Actions
-
verify_patch write
Run a structured semi-formal review on a unified diff and persist the verdict for later calibration. ·
anthropic.messagesturso.libsqlnet.outbound- Goal
- Get a structured review of a patch with persisted outcome tracking.
- Inputs
patch (req: unified diff text), context (optional), description (optional), model (default claude-sonnet-4-6)- Outputs
{tracking_id, verdict, model, raw_response}- Errors
auth_invalid, model_unavailable, storage_failed- Example
verify_patch patch='--- a/x.py\n+++ b/x.py\n...' context='function foo signature' description='fix off-by-one'
-
stamp_verification write idempotent
Record the actual outcome (merged/rejected/reverted) for a prior verification, enabling calibration analysis. ·
turso.libsql- Goal
- Close the loop on a prediction.
- Inputs
tracking_id (req), outcome (req: merged|rejected|reverted), note (optional)- Outputs
{stamped: bool, new_id: str}- Errors
tracking_id_not_found, storage_failed- Example
stamp_verification tracking_id='abc123' outcome='merged'
Environment
ANTHROPIC_API_KEY |
Anthropic API key. Used to invoke the Claude model that performs the structured review (sonnet-4-6 by default; configurable per call). Read indirectly via the orchestrating-agents skill's claude_client; verify_patch itself does not reference os.environ for this name. required · secret: yes · obtain |
|---|---|
TURSO_TOKEN |
Turso database token. Used to persist verification predictions and outcomes for calibration analysis. Read indirectly via the remembering library (`from scripts import remember, recall, supersede`). required · secret: yes · obtain |
TURSO_URL |
Turso database URL. Read indirectly via the remembering library. required · secret: no · obtain |
Verify & cost
| Install fee | 0¢ |
|---|---|
| Monthly fee | 0¢ |
| Usage model | per-call |
Runtime
runtime: python-module · install method: preinstalled · entrypoint: python -m muninn_utils.verify_patch
Read-and-reason utility, not a write/execute one. The model is invoked via the orchestrating-agents skill's `claude_client.invoke_claude` (uses ANTHROPIC_API_KEY). Verification results are persisted via the remembering library (uses TURSO_TOKEN, TURSO_URL) so the prediction can later be compared to actual merge outcome via `stamp_verification(tracking_id, outcome)`. The outcome ledger feeds calibration analysis (review_verifications) — over time, this surfaces patterns of overconfident verdicts.
Tags: verificationpatch-reviewcalibrationanthropicmemory
License: MIT
Last fetched 2026-06-18T09:09:17Z (live)