You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Judge secrets_sync Staleness by Content Time So a Retag Cannot Hide a Newer Local Copy #4190
scripts/secrets_sync.py judges staleness by comparing a local file's mtime with the remote item's updated_at. A retag, which is a mode-only push, moves updated_at forward without changing the content.
So on a second host that holds a newer, unpushed copy of the same file:
pull reads the local copy as older than the remote one, and pull --yes overwrites it.
A later push from that host skips the file as stale.
How to Reproduce
With the fake op in tests/test_secrets_sync.py: push a file from one temporary home, edit the same title in a second temporary home so its mtime is later, then retag the item from the first home. Pull into the second home with --yes. The newer local content is replaced.
Fix Direction
The review pass recommends recording each pushed file's content time in a second tag, mtime:<iso>, and judging staleness against that tag rather than updated_at. A retag then leaves the content time alone. An item with no such tag needs a stated rule, such as falling back to updated_at.
Scope
Reachable only when two hosts hold the same title. Fix before the tool is used from a second host.
Deferred from #4165 by the maintainer's decision, where a local strict-review pass raised it.
Answered by the maintainer, 2026-11-15. Push records the content time in an mtime:<UTC ISO> tag, and a retag keeps it. An item with no such tag reads as its updated_at, and its next push adds the tag. Pull sets each written file's mtime to the item's content time, so both sides compare on one clock.
Activity
ptr727 commentedon Nov 15, 2026
Answered by the maintainer, 2026-11-15. Push records the content time in an
mtime:<UTC ISO>tag, and a retag keeps it. An item with no such tag reads as itsupdated_at, and its next push adds the tag. Pull sets each written file's mtime to the item's content time, so both sides compare on one clock.Judge secrets_sync Staleness by Content Time, Refuse Cross-Bucket Tit…