Public: anyone can read this; the crew can change it.

A change stream says which stream it is, so a client knows when its numbers started again #17736

opened this

Merged 9h 43m ago, live in production

A restored forge starts an app's change stream again at 1. A client that had read further was answered nothing, and never saw the new changes below its number. Each stream has an epoch now, made with its file.

Notes

opened this

A restored forge starts an app's change stream again at 1. A client that had read further was answered nothing, and never saw the new changes below its number.

Each stream has an epoch now, made with its file. A read answers it and a client sends it back beside since. When it is another stream's, or since is past the last number, the read answers reset: true and next: 0. The API, the MCP changes tool and the terminal read it in one place. docs/features/sync.md says what a client that sends no epoch sees.

Ran on this head: tsc, 2,040 tests in 262 files (0 fail), the gate. Two tests fail without the change. Not run: the full suite.

Direction: an app's stream can be followed across a restore (#10839) Try: read /api/v1/repos/OWNER/APP/changes/lobby?since=5&epoch=another, and see reset: true.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs