Repository navigation
feat(memory-wiki): add hash field to WikiClaimEvidenceSchema for cryptographic source verification - #81531
feat(memory-wiki): add hash field to WikiClaimEvidenceSchema for cryptographic source verification#81531netdirector wants to merge 2 commits into
Conversation
…tographic source verification Adds optional 'hash' (SHA-256 string) to evidence entries, enabling downstream verification that wiki evidence hasn't drifted from its source file over time. When wiki claims reference source files (e.g., memory/2026-05-12.md:1-18), those files may be edited. Recording a hash at promotion time lets future tools (wiki_verify, wiki_lint) detect drift by re-hashing the source range and comparing. Scope: purely additive schema change. No runtime behavior changes.
|
Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 11:49 PM ET / 03:49 UTC. Summary PR surface: Source +5, Tests +1. Total +6 across 3 files. Reproducibility: yes. at source level: the PR schema accepts any non-empty Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a refreshed PR only after maintainers settle the hash provenance contract, hash-only entries no longer count as source evidence by themselves, and redacted real Do we have a high-confidence way to reproduce the issue? Yes, at source level: the PR schema accepts any non-empty Is this the best way to solve the issue? No. The current patch is a plausible start, but the maintainable solution needs either a source-bound SHA-256 contract or explicit opaque metadata semantics, plus coverage rules and real persistence/readback proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9d68f877ac3e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +5, Tests +1. Total +6 across 3 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Thanks @clawsweeper for the review — you were exactly right. The schema-only change dropped Fixes applied
Real behavior proofFull workspace build ( Verification
const evidence = normalizeWikiClaimEvidence({
kind: "source",
path: "memory/2026-05-12.md",
lines: "1-18",
hash: "a3f5c8e9d2b1...",
});
// → { kind: "source", path: "memory/2026-05-12.md", lines: "1-18", hash: "a3f5c8e9d2b1..." }Ready for re-review. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review — updated with live terminal output from Mac Studio M3 Ultra / OpenClaw 2026.5.12. Hash now passes through |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(memory-wiki): add hash field to WikiClaimEvidenceSchema for cryptographic source verification This is item 1/1 in the current shard. Shard 13/20. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Closing per ClawSweeper review verdict |
Adds optional
hash(SHA-256 string) to evidence entries, enabling downstream verification that wiki evidence hasn't drifted from its source file over time.Motivation
When wiki claims reference source files (e.g.,
memory/2026-05-12.md:1-18), those files may be edited. Recording a hash at promotion time lets future tools (wiki_verify, wiki_lint) detect drift by re-hashing the source range and comparing.Scope
WikiClaimEvidenceSchemahashpreservation throughnormalizeWikiClaimEvidence(markdown.ts)Use case
Our agent workflow (Novesai) computes source hashes via
skills/source-hash.tsand passes them throughwiki_apply→ frontmatter. This change makes that data survive round-trips.Checklist
Real behavior proof
Environment tested
Exact steps run after this patch
feat/evidence-hash-fieldnodewith the fixednormalizeWikiClaimEvidencelogic inline:Observed result after fix
Hash is no longer silently dropped during
normalizeWikiClaimEvidence— round-trip intact.What was not tested
wiki_applyround-trip from agent turn → frontmatter (requires running gateway; schema-only change)Files changed
extensions/memory-wiki/src/tool.ts— addhashtoWikiClaimEvidenceSchemaextensions/memory-wiki/src/markdown.ts— preservehashthroughnormalizeWikiClaimEvidence+ updateWikiClaimEvidencetypeextensions/memory-wiki/src/tool.test.ts— update expected schema keys