Engine restart silently freezes extended-API shapes (clients tail dead streams)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the in-memory shape state in apps/engine/src/engine.rs:47-61 and compare the /v1/shape handling at apps/engine/src/electric.rs:661-664 with extended-API stream maintenance across restart. Trace boot and shutdown behavior first. Done means an extended-API client can detect an unmaintained stream, or shape state is persisted and maintenance resumes after boot, as selected by the recovery plan.
Written by the indexing model from the issue text.
Description
Found during the production-readiness investigation.
Symptom / failure scenario: all shape state is in-memory (apps/engine/src/engine.rs:47-61); nothing re-registers shapes at boot. After an engine restart the shape/<id> streams still exist on the DS server, but no tailer maintains them — an extended-API client long-polling its feed keeps getting valid responses (historical data, then silence) while Postgres keeps changing. The shape is silently stale forever; no error is surfaced to the client, no detection exists server-side.
/v1/shape clients at least get a 409 must-refetch (apps/engine/src/electric.rs:661-664); extended-API clients get nothing.
Fix direction: short-term, make staleness detectable (e.g. engine epoch/generation stamped on streams or a control message on shutdown/boot so clients can detect an unmaintained feed). Real fix: persist the shape catalog and resume maintenance at boot (recovery epic).
🤖 Generated with Claude Code
- Dominant language
- Rust
- Stars
- 31
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from electric-sql/electric-circuits
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in electric-sql/electric-circuits
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 3 days
-
state:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/harper#4503 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 2 days