Repository navigation
Move Content Time Forward on an Equal-Time Update, and Re-Check Other Buckets After the Prompt - #4196
Conversation
… Buckets After the Prompt An update whose file is not strictly newer than the remote content time now records forced_time, so a host holding the replaced bytes at that same timestamp reads them as older. Push lists the other buckets again after its confirmation prompt, so a title another bucket took during the prompt is refused rather than duplicated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nt-Time Docstring The post-prompt cross-bucket check runs only where a prompt was shown and a plan creates an item, so a --yes push or an updates-only push lists nothing extra. The content_time docstring says an update whose file is not strictly newer records forced_time, and the equal-time test moves beside its content-time siblings. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…ced_time Write Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The change still has an active documentation inconsistency in the overwrite-path contract: the docstring does not describe the strictly-newer local mtime behavior.
1 open issue
What changed in this PR
This PR hardens the secrets synchronization workflow by advancing content timestamps for equal-time updates and rechecking cross-bucket ownership after confirmation.
Changes:
- Advances content timestamps when local content is not strictly newer than the remote content.
- Rechecks other buckets after the push confirmation prompt.
- Adds regression tests and updates the synchronization documentation.
| File | Description |
|---|---|
| tests/test_secrets_sync.py | Adds regression tests for equal-time updates and titles claimed by another bucket during confirmation. |
| scripts/secrets_sync.py | Updates content-time handling and adds post-prompt cross-bucket ownership validation. |
| scripts/README.md | Documents the revised timestamp and bucket recheck behavior. |
Review effort: Lite
|
A recorded local strict-review pass covers head |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4196 +/- ##
========================================
Coverage 78.05% 78.05%
========================================
Files 42 42
Lines 15319 15319
========================================
Hits 11958 11958
Misses 3361 3361
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action performed
|
…#4194) ## Summary Promotes the 1Password secrets sync tool and its review fixes from `develop` to `main`. - #4165: adds `scripts/secrets_sync.py`. It syncs secret files between a home directory and 1Password through the `op` CLI, with one vault per bucket and one Document item per file. - #4193: fixes the three review findings deferred from #4165, so the tool can ship. - Staleness is judged by a content-time tag, so a mode-only retag no longer reads as newer content. - Push refuses a title another bucket already holds. - Pull refuses to replace a file another user owns. - It also adds stale-plan refusals on push, pull and archive, a named recovery for an update interrupted between its content and tag writes, and a re-time on pull for files the #4165 code wrote. - #4195: answers this promotion's review. Pull re-checks the remote item and the session after its prompt, a pulled file's mtime is set before the rename, and a selftest that leaves its scratch vault behind exits 2. - #4196: answers the promotion's second review round. An update at an equal content time moves the time forward, and push re-checks other buckets after its prompt. Native Windows verification of the tool stays tracked in #4188, which this promotion leaves open. Closes #4190 Closes #4191 Closes #4192 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
Answers two of the five findings the hosted review raised on the promotion's second round, #4194. The other three, two about a parent directory swapped for a link and one about
title_forlisting names through a link, are declined with evidence in their threads under the trust-boundary rule.forced_time, not that same time again. So a host still holding the replaced bytes at that timestamp reads them as older, and it can't push them back without--overwrite-newer.Secrets *buckets again after it. A title another bucket took during the prompt is then refused rather than duplicated.Verification
python3 tests/test_secrets_sync.py: 156 tests, OK. Both new cases also ran against develop's script and failed there..husky/pre-commithook are clean.Local review
The docstring finding this body listed is fixed in f19e84b and 4fa6b83. The docstring now states each write's content time, and the pass covering this head raised no findings.
🤖 Generated with Claude Code
Summary by CodeRabbit