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
Per-cycle mutable state (PR watermarks) is appended as durable memory and never superseded #326
Per-cycle mutable state is being appended as durable memory, and nothing supersedes it. The store accumulates stale cursors that compete with real lessons in recall and injection.
Live store (~/.config/opencode/memory), rows written by the dispatch automation:
2026-11-03: 92 of 131 rows are pr-watch/pr-claim watermarks
2026-11-04: 162 of 215 rows are pr-watch/pr-claim watermarks
2026-11-05: 66 of 94 rows are pr-watch/pr-claim watermarks
356 such rows in total; 854 rows in the store
Why GATE-3 does not collapse them: src/gate/gate.ts:159 sets OVERLAP_FLOOR = 0.9 for reworded near-duplicates. A new watermark differs from the previous one only in a SHA and a timestamp, so token-level jaccard lands well below 0.9 and the row stores clean as "novel". Every dispatch cycle therefore adds a row. The floor is correctly high to avoid false merges of prose; it simply cannot see that these are versions of one value.
Net effect: the store's largest single contributor is state that has exactly one valid value at a time, and the older values are actively wrong. This degrades the retrieval quality the plugin exists to provide.
Work
Decide the representation for mutable state. Options, in rough order of preference: a keyed/versioned row type where a write with the same key supersedes the previous row; a dedicated watermark API outside the memory store; or documentation that instructs memory_update with a stable selector for cursors.
Whatever is chosen, the recall path must never surface a superseded cursor.
Add a store-hygiene report (memory_status or the viewer) that flags a scope where the same prefix recurs N times without supersession, so this is visible before it reaches 356 rows.
Found while investigating why this repository's store grew so fast during the #315 work. Related: #316.
Decision (maintainer, 2026-11-08): fix in the dispatch automation, not the plugin. The watermark rows are per-cycle cursors, not durable memories — the automation should stop writing them to the store (or write them to its own state file). The plugin will not guess supersession keys for context rows: an automatic supersede rule on scope+type would silently retire legitimate rows, which is the worse failure. Cleanup of the existing 356 watermark rows is part of the automation fix.
Activity
abogartz commentedon Nov 8, 2026
Decision (maintainer, 2026-11-08): fix in the dispatch automation, not the plugin. The watermark rows are per-cycle cursors, not durable memories — the automation should stop writing them to the store (or write them to its own state file). The plugin will not guess supersession keys for context rows: an automatic supersede rule on scope+type would silently retire legitimate rows, which is the worse failure. Cleanup of the existing 356 watermark rows is part of the automation fix.