Summary
opencode-github-sync 3.0.1 rewrites every exported session shard on each push even when the OpenCode session itself has not changed.
The shard currently sets:
Because that value changes on every export, the JSON payload changes, the .json.gz bytes change, and Git sees the shard as modified.
With autoPushOnIdle enabled this can generate repeated commits touching many or all session shards even when no session data changed.
Environment
opencode-github-sync: 3.0.1
- OpenCode Desktop / CLI: 1.18.30
- Node.js: 24.x
- Windows 11
Reproduction
- Enable session sync.
- Ensure there is at least one eligible session.
- Run
opencode-sync push.
- Make no changes to the session.
- Run
opencode-sync push --dry-run or another normal push.
Observed: the session shard is reported as modified again.
In a test with 11 eligible sessions, an unchanged export could show all 11 .json.gz shards as modified purely because export metadata was regenerated.
Expected result
If the underlying session and related rows did not change, exporting the same session again should produce identical shard bytes and Git should stay clean.
Tested fix
Using the session's own stable update timestamp instead of wall-clock export time makes repeated exports deterministic:
exportedAt: Number(sessionRow.time_updated ?? 0),
After that change, running opencode-sync push --dry-run twice with no session changes reports Already up to date on the second run.
Suggested regression test
- Export a session to a shard.
- Export the same unchanged session again.
- Assert the shard bytes are identical.
- Assert the second sync has no Git diff.
Related: #2 is a separate session-import data-loss issue.
Summary
opencode-github-sync3.0.1 rewrites every exported session shard on each push even when the OpenCode session itself has not changed.The shard currently sets:
Because that value changes on every export, the JSON payload changes, the
.json.gzbytes change, and Git sees the shard as modified.With
autoPushOnIdleenabled this can generate repeated commits touching many or all session shards even when no session data changed.Environment
opencode-github-sync: 3.0.1Reproduction
opencode-sync push.opencode-sync push --dry-runor another normal push.Observed: the session shard is reported as modified again.
In a test with 11 eligible sessions, an unchanged export could show all 11
.json.gzshards as modified purely because export metadata was regenerated.Expected result
If the underlying session and related rows did not change, exporting the same session again should produce identical shard bytes and Git should stay clean.
Tested fix
Using the session's own stable update timestamp instead of wall-clock export time makes repeated exports deterministic:
After that change, running
opencode-sync push --dry-runtwice with no session changes reportsAlready up to dateon the second run.Suggested regression test
Related: #2 is a separate session-import data-loss issue.