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
Store Secret Sync Metadata in Item Fields, Not 1Password Tags #4276
scripts/secrets_sync.py stores each item's sync metadata as 1Password tags:
MODE_PREFIX = "mode:" holds the file mode, for example mode:0600.
CONTENT_PREFIX = "mtime:" holds the content time to the microsecond, for example mtime:2026-01-02T03:04:05.123456Z.
Both are written where the plan's tags are built, from mode_tag() and content_tag().
1Password treats tags as an account-wide facet, not as per-item metadata. Every distinct tag value appears in the app's sidebar tag list, for every vault and every member of the account. Because the mtime: value is unique per item and changes on each content update, a bucket of N secrets adds about N new sidebar tags. Each content change then adds another. The mode: tags are low-cardinality, but they still show up as tags nobody uses to organize items.
The maintainer reports the tag list is now dominated by mtime: entries after the per-prefix buckets were added.
Expected
Sync metadata is stored on the item itself, where it is invisible in the tag list. A custom section on the item, for example a sync section holding mode and mtime text fields, keeps both values readable by op item get --format json and leaves tags to the user.
Done looks like
secrets_sync.py reads and writes mode and content time from item fields, not from tags.
A one-time migration moves existing mode: and mtime: tags into the fields and removes the tags. It is idempotent, so a second run writes nothing.
The tests in tests/test_secrets_sync.py that assert on mode: and mtime: tags are updated, and a test covers the migration path.
After migration, the account's tag list holds no mode: or mtime: tags.
Backlog burndown question, 2026-11-19. The issue's done-when asks for a one-time migration in code that moves existing mode: and mtime: tags into item fields. That collides with the standing rule recorded in #4210: a one-off is detected and reported, and its fix is not coded. Which applies here?
Options
Detect and report, no migration code (recommended).secrets_sync.py reads and writes the metadata from item fields only. Where it finds an item still carrying a mode: or mtime: tag, it reports the item and prints the command that strips those tags, for the maintainer to run once. This follows State That a One-Off Is Detected and Reported, Never Corrected by Code #4210. The first sync after the change rewrites each item's fields from the local file, so no tag value needs carrying over.
Code the idempotent migration the issue asks for, as an exception to State That a One-Off Is Detected and Reported, Never Corrected by Code #4210. One code path moves the tag values into fields and removes the tags, with a test. The tag list is cleaned with no hand step, but the code stays in the script after the one run it exists for.
Effect on work in flight: none. No branch touches scripts/secrets_sync.py today.
Maintainer's answer, 2026-11-19 (backlog burndown). Code both halves.
The fix:secrets_sync.py stops writing sync metadata as tags and reads and writes it from item fields.
The cleanup: hundreds of existing mode: and mtime: tags are not cleared by hand, so the cleanup is coded too. It is a throwaway script, run once and then discarded. It does not stay in the repository's tooling after its one run. Running it writes to the 1Password account, so the run itself is the maintainer's to start or approve at the time.
Released (2026-11-24): PR #4427 merged to develop at 5e71f88; branch and worktree cleaned up, so this claim holds no files. The issue closes on promotion; the live cleanup run (in the PR body) is owed to the maintainer.
Backlog burndown claim (away run 2026-11-24, round 4, refill group H): branch burndown/secrets-sync-item-fields, issue #4276.
Predicted files:
scripts/secrets_sync.py, where the plan builds mode: and mtime: tags (MODE_PREFIX, CONTENT_PREFIX, mode_tag(), content_tag()), every read of them, and the selftest probes of the op tag behaviors.
tests/test_secrets_sync.py, the cases asserting on mode: and mtime: tags.
Scope follows the maintainer's answer above: the fix reads and writes the metadata from item fields only, and the tag cleanup is a throwaway script that is not committed and that only the maintainer runs.
Any other group needing one of these files waits for this branch to merge.
Activity
ptr727 commentedon Nov 20, 2026
Backlog burndown question, 2026-11-19. The issue's done-when asks for a one-time migration in code that moves existing
mode:andmtime:tags into item fields. That collides with the standing rule recorded in #4210: a one-off is detected and reported, and its fix is not coded. Which applies here?Options
secrets_sync.pyreads and writes the metadata from item fields only. Where it finds an item still carrying amode:ormtime:tag, it reports the item and prints the command that strips those tags, for the maintainer to run once. This follows State That a One-Off Is Detected and Reported, Never Corrected by Code #4210. The first sync after the change rewrites each item's fields from the local file, so no tag value needs carrying over.Effect on work in flight: none. No branch touches
scripts/secrets_sync.pytoday.ptr727 commentedon Nov 20, 2026
Maintainer's answer, 2026-11-19 (backlog burndown). Code both halves.
secrets_sync.pystops writing sync metadata as tags and reads and writes it from item fields.mode:andmtime:tags are not cleared by hand, so the cleanup is coded too. It is a throwaway script, run once and then discarded. It does not stay in the repository's tooling after its one run. Running it writes to the 1Password account, so the run itself is the maintainer's to start or approve at the time.This is now work.
ptr727 commentedon Nov 24, 2026
Released (2026-11-24): PR #4427 merged to develop at 5e71f88; branch and worktree cleaned up, so this claim holds no files. The issue closes on promotion; the live cleanup run (in the PR body) is owed to the maintainer.
Backlog burndown claim (away run 2026-11-24, round 4, refill group H): branch
burndown/secrets-sync-item-fields, issue #4276.Predicted files:
scripts/secrets_sync.py, where the plan buildsmode:andmtime:tags (MODE_PREFIX,CONTENT_PREFIX,mode_tag(),content_tag()), every read of them, and theselftestprobes of theoptag behaviors.tests/test_secrets_sync.py, the cases asserting onmode:andmtime:tags.scripts/README.md, thesecrets_sync.pysection describing the mode and content-time tags and whatselftestmeasures. Passed from the parked validate-task.yml Lint Steps Fail a Release on a Transient Docker Hub Error #1727 group, which has no commits ahead oforigin/develop.Scope follows the maintainer's answer above: the fix reads and writes the metadata from item fields only, and the tag cleanup is a throwaway script that is not committed and that only the maintainer runs.
Any other group needing one of these files waits for this branch to merge.
Store Secret Sync Metadata in Item Fields, Not 1Password Tags (#4427)