fix(test): ignore mtime-only changes in repo beads guard

The test guard was flagging false positives when SQLite shm/wal files
had their mtime updated from read-only operations (config loading, etc.)
without any actual content modification.

Now only reports when file size changes, which indicates actual content
modification rather than just file access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
dennis
2026-01-13 00:20:48 -08:00
committed by gastown/crew/dennis
parent 82a824ed92
commit c9cc1308d5
2 changed files with 6 additions and 8 deletions

View File

@@ -120,14 +120,11 @@ func diffSnapshots(before, after map[string]fileSnap) string {
if !b.exists {
continue
}
if b.size != a.size || b.modUnix != a.modUnix {
out += fmt.Sprintf("- %s: size %d → %d, mtime %s → %s\n",
name,
b.size,
a.size,
time.Unix(0, b.modUnix).UTC().Format(time.RFC3339Nano),
time.Unix(0, a.modUnix).UTC().Format(time.RFC3339Nano),
)
// Only report size changes (actual content modification).
// Ignore mtime-only changes - SQLite shm/wal files can have mtime updated
// from read-only operations (config loading, etc.) which is not pollution.
if b.size != a.size {
out += fmt.Sprintf("- %s: size %d → %d\n", name, b.size, a.size)
}
}
return out