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:
committed by
gastown/crew/dennis
parent
82a824ed92
commit
c9cc1308d5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user