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 }}
This repository was archived by the owner on Sep 29, 2026. It is now read-only.
The atomic-write fix in #22 guarantees parseable snapshots, but updateTags still performs an unlocked read-modify-write of the whole metadata document. Two independent writers that set different keys can both succeed while the later rename erases the earlier writer's key. PTY's own daemon also updates the same document.
This prevents downstream integrations from treating disjoint tag updates as independent.
Desired contract
Expose a store-applied metadata patch with an optional revision precondition:
The store must apply the patch to the current document inside one short internal critical section and assign the new revision. Callers should not hold locks.
A patch without ifRevision supports commutative per-key writes.
A no-op does not increment the revision or emit a change.
Change events identify the committed revision and act as invalidations; the snapshot remains authoritative.
This complements the session-incarnation protection in #158. Incarnation prevents acting on a replacement session. Revision prevents a stale metadata basis from overwriting a concurrent update.
Problem
The atomic-write fix in #22 guarantees parseable snapshots, but
updateTagsstill performs an unlocked read-modify-write of the whole metadata document. Two independent writers that set different keys can both succeed while the later rename erases the earlier writer's key. PTY's own daemon also updates the same document.This prevents downstream integrations from treating disjoint tag updates as independent.
Desired contract
Expose a store-applied metadata patch with an optional revision precondition:
The store must apply the patch to the current document inside one short internal critical section and assign the new revision. Callers should not hold locks.
ifRevisionsupports commutative per-key writes.ifRevisionsupports genuine read-modify-write operations.This complements the session-incarnation protection in #158. Incarnation prevents acting on a replacement session. Revision prevents a stale metadata basis from overwriting a concurrent update.
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile