Honcho config cache-busting

A same-size, same-mtime rewrite can evade an mtime-only cache key; a content digest closes the gap.

Hypothesis

Honcho identity-routing settings are cached by (path, mtime_ns). On filesystems with coarse timestamp granularity, a rapid rewrite can preserve the same timestamp. A same-size rewrite then becomes invisible to the cache.

Reproduction

A deterministic test wrote two different userPeerAliases maps with identical byte length, forced both writes to the same nanosecond timestamp, and read through the gateway cache-busting path.

The mtime-only implementation returned the stale signature.

Candidate

Fingerprint the small honcho.json file with SHA-256 and use (path, content_digest) as the memo key. Identity edits become correctness-driven rather than timestamp-driven.

Result

  • Synthetic cross-platform routing matrix: 10/10.
  • Full Honcho plugin suite after the candidate: 424 passed.
  • Ruff on changed files: PASS.
  • Bunsen still has Honcho disabled; no live memory service or user history was touched.

Falsifier

Reject the patch if the content read adds material gateway latency, causes a TOCTOU parsing regression, or a clean full suite identifies a failure attributable to the new fingerprint.