feat(sync): propagate delayed session closures

Open
#1,259 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Chain unit 2 of 4 under umbrella #1192, explicitly blocked on PR #1250 (the core closure slice) — read that PR first to find the sync outbox and manifest-chunk code this builds on. Start from the existing outbox mutation path and the point where a remote manifest chunk is fetched, then locate where a missing chunk currently drops the mutation. Done looks like delayed closure mutations replay idempotently with a recovery path for missing chunks, plus new tests covering delayed propagation and recovery.

Written by the indexing model from the issue text.

Description

priority:medium status:approved type:feature

🔍 Problem Description

Closing a session locally does not surely propagate the closure to synchronized recas when a sync target is unavailable or its manifest chunk does not exist yet. This can leave a remote session open after the local closure.

💡 Proposed Solution

Propagate delayed session-closure mutations idempotently through the existing sync outbox. When a required remote manifest chunk is missing, recover it without duplicating mutations. Addtest coverage for delayed propagation and recovery.

📦 Affected Area

Sync (multi-instance)

🔄 Alternatives Considered

No response

📎 Additional Context

Parent umbrella: #1192. This is chain unit 2 of 4; it depends on PR#1250, the core closure slice. It excludes openCode archive-to-idle detection and archive lifecycle hardening.

Dominant language
Go
Stars
7.1k
Forks
729
Avg merge
11h 47m
Merged PRs (30d)
284

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Gentleman-Programming/engram

All issues in Gentleman-Programming/engram

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.