wiki-warehouse: wire /warehouse-audit into the warehouse's bin/audit.py#33
Merged
Conversation
The warehouse now ships bin/audit.py (integrity checker: re-hashes originals against doc_id, verifies paths, flags orphans/drift) plus a 7-test suite. Update the skill's /warehouse-audit to run it as the warehouse-side half (corrupt/missing/orphan/drift), keeping the vault-side pointer reconciliation (dangling/drifted/orphaned-in-warehouse) on the MCP path. Reference doc notes the two-half split. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3gQfyqFnxTqnm455xwPyX
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.
Summary
Follow-up to the wiki-warehouse skill. The warehouse repo (
Hefrock/knowledge-warehouse) now ships a real integrity tool + test suite, so the skill's/warehouse-auditis updated to use it rather than describe the checks in prose./warehouse-auditnow runs in two explicit halves:python bin/audit.py --json: re-hashes every stored original against itsdoc_id(catches silent swaps / bit-rot), verifies every manifest path resolves, and reportscorrupt/missing/orphan/drift.references/warehouse-schema.mddocuments the two-half split.What landed in the warehouse repo (separate, private)
bin/audit.py(the integrity checker) andtest/test_warehouse.py(stdlib, 7 tests) were added toHefrock/knowledge-warehouse. Verified end-to-end: a clean warehouse passes (exit 0); injected corruption (hash mismatch), a removed file, and a stray orphan file are each caught (corrupt/missing → exit 1; orphan → warning). CORRUPT is the load-bearing check — it's the one failure the whole content-hash design exists to detect.Test plan
bin/audit.pyverified on clean + tampered warehouses (corrupt/missing/orphan detection, correct exit codes).test/test_warehouse.py— 7/7 passing (intake content-hash identity, dedupe no-op, plaintext extraction, manifest; audit clean/corrupt/missing/orphan).🤖 Generated with Claude Code
https://claude.ai/code/session_01D3gQfyqFnxTqnm455xwPyX
Generated by Claude Code