NEARBuilders / NEARBuilders/everything-dev

v2-platform: 09 hot-swap lifecycle prototype — in-flight requests, teardown, ESM disposal

Open
#277 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ready-for-agent
Dominant language
TypeScript
Stars
5
Forks
6
Avg merge
1m
Merged PRs (30d)
1

Description

Parent

#274 (v2 platform services spec)

What to build

A runnable hot-swap lifecycle prototype that answers wayfinder ticket 10 before the OTA runtime is implemented: a two-plugin host where one remote is swapped mid-traffic, repeatedly. The prototype must answer, with measurements: what happens to in-flight requests (drain vs shadow-flip), whether plugin scope teardown is clean or leaks (DB pools, intervals, subscriptions), whether a partial swap (only remotes whose URLs changed) avoids connection doubling, what must be explicitly dropped for old ESM graphs to become collectible, and whether rollback can re-import cached last-good URLs safely. Candidate design to test: shadow-flip with partial swap. Lives on a prototype branch per repo convention; the answer folds into the OTA runtime ticket.

Acceptance criteria

  • A swap of one remote mid-traffic loses zero in-flight requests (or the prototype proves which strategy guarantees it)
  • Repeated swaps (10+) show no leaked DB connections, handlers, or retained old module graphs (measured, not asserted)
  • Partial swap (only changed URLs re-imported) is validated against full-graph swap
  • Rollback to last-good config recovers a deliberately broken swap
  • A written findings doc records the chosen lifecycle strategy with the measurements behind it

Blocked by

  • None (can start immediately — parallel frontier ticket).

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading parent #274 and the repository's prototype-branch convention; no source file or test entry point is named. Build the two-plugin host described here, then measure repeated swaps, partial versus full graph swaps, rollback, and cleanup, recording the lifecycle choice and findings in a document.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.