Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

flow-runtime: prune empty per-target sets from the liveWriters registry

Closed Beginner friendly
#83 1 comment 0 reactions 0 assignees View on GitHub

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

area:holodeck review-finding

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

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 hyperdrive-technology/holodeck

All issues in hyperdrive-technology/holodeck

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.