flow-runtime: prune empty per-target sets from the liveWriters registry
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
The leak is in packages/flow-runtime/src/provider.ts, in liveWriters/writersOf and SignalWriter.retire(). Read how the per-bridge Map and its Sets are populated, then confirm that retire() leaves the empty Set behind. Make retire() remove the map entry once its Set is empty, and add a test that a bridge's registry is empty after close.
Written by the indexing model from the issue text.
Description
Raised by the Claude review of #80.
packages/flow-runtime/src/provider.ts (liveWriters / writersOf, SignalWriter.retire()): retire() deletes the writer from its target's Set but never removes the empty Set from the per-bridge Map. On a long-lived shared bridge whose documents keep changing signal.out targets (e.g. an editor session redeploying for hours), the map grows by one entry per distinct (connection, source) ever written. Bounded by distinct targets, so P3.
Fix: in retire(), after peers.delete(this), drop the map entry when the set is empty (keep the key string on the writer). Add a test that the registry for a bridge is empty after close.
🤖 Generated with Claude Code
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 10h 39m
- Merged PRs (30d)
- 38
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 hyperdrive-technology/holodeck
-
area:holodeck review-finding
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
hyperdrive-technology/holodeck#196 ·
Maintainers usually reply within 1 day
-
area:docs review-finding
Difficulty 1/5 Under an hour Newbie friendliness 70/100
hyperdrive-technology/holodeck#180 ·
Maintainers usually reply within 1 day
-
Flaky E3 test: native cut with no keydown (holodeck#123) in editing-ux-render.test.tsPossibly taken @dezlitz claimed this today. Openarea:holodeck review-finding
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hyperdrive-technology/holodeck#141 ·
Maintainers usually reply within 1 day
-
assetUrlProblem: data:image check uses the un-normalised URL, so ' data:image/png...' is rejectedOpenarea:holodeck review-finding
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
hyperdrive-technology/holodeck#104 ·
Maintainers usually reply within 1 day
-
agent area:holodeck good first issue priority:p2
Difficulty 1/5 Under an hour Newbie friendliness 72/100
hyperdrive-technology/holodeck#64 ·
Maintainers usually reply within 1 day
All issues in hyperdrive-technology/holodeck
Similar issues
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
iptv-org/iptv#55821 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel-labs/wterm#246 ·
Maintainers usually reply within 1 day
-
bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nearform/lastlight#452 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
fix(console): include PARTITIONED BY in generated table DDLPossibly taken @aubdiy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/polaris-tools#291 ·
Maintainers usually reply within 6 days