Skip to content

wiki-warehouse: wire /warehouse-audit into the warehouse's bin/audit.py#33

Merged
Hefrock merged 1 commit into
mainfrom
warehouse-audit-tool
Jul 19, 2026
Merged

wiki-warehouse: wire /warehouse-audit into the warehouse's bin/audit.py#33
Hefrock merged 1 commit into
mainfrom
warehouse-audit-tool

Conversation

@Hefrock

@Hefrock Hefrock commented Jul 19, 2026

Copy link
Copy Markdown
Owner

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-audit is updated to use it rather than describe the checks in prose.

  • /warehouse-audit now runs in two explicit halves:
    • Warehouse sidepython bin/audit.py --json: re-hashes every stored original against its doc_id (catches silent swaps / bit-rot), verifies every manifest path resolves, and reports corrupt / missing / orphan / drift.
    • Vault side — the existing MCP reconciliation (dangling / drifted / orphaned-in-warehouse), since only that half can see the vault notes.
  • references/warehouse-schema.md documents the two-half split.

What landed in the warehouse repo (separate, private)

bin/audit.py (the integrity checker) and test/test_warehouse.py (stdlib, 7 tests) were added to Hefrock/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.py verified 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).
  • Skill doc change only in this PR; the scripts live in the warehouse repo.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D3gQfyqFnxTqnm455xwPyX


Generated by Claude Code

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
@Hefrock
Hefrock merged commit e17f471 into main Jul 19, 2026
4 checks passed
@Hefrock
Hefrock deleted the warehouse-audit-tool branch July 19, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants