Skip to content

docs: design — live in-place hot-reload (processor + metadata) + conduit run --dev (§4)#2601

Merged
devarismeroxa merged 2 commits into
mainfrom
design/live-in-place-hot-reload
Jul 13, 2026
Merged

docs: design — live in-place hot-reload (processor + metadata) + conduit run --dev (§4)#2601
devarismeroxa merged 2 commits into
mainfrom
design/live-in-place-hot-reload

Conversation

@devarismeroxa

Copy link
Copy Markdown
Contributor

What

Design doc for v0.17 execution-plan §4 (hot-reload) + §3 (dev verb). Roadmap: Phase 1 (Developer Experience Core). Design only — no implementation yet. Opening for Tier-1 design sign-off before code, mirroring how #2588's design landed as #2596 first.

The scope decision (made in review)

In-place-class changes must apply without restarting the pipeline — the real §4, not the always-restart shortcut (rejected). Invariant-safety line:

  • Live-swappable in place: processor config + pipeline Name/Description — no position/ack/connection state, so a swap at a clean record boundary can't skip a position, lose an ack, or drop a record.
  • Restart-class (existing ApplyPlanLive): source/dest connector settings, DLQ (live destination w/ ack semantics), all topology. Live swap of these is invariant-1/2/3 territory → deferred to Phase 2 with the chaos harness.

Core new work

A live, at-a-record-boundary ProcessorNode swap in pkg/lifecycle/stream, built on the existing ControlMessage/InjectControlMessage idiom (already used to stop sources in-band). Open-new-before-teardown-old so a bad edit never drops the pipeline. ApplyPlanLiveInPlace decides: all-swappable diff → in place; anything restart-class → delegate to ApplyPlanLive. Dev-mode (run --dev + pipelines dev alias) is a consumer.

Grounding + rigor

Every mechanism claim verified against the tree: ApplyPlanLive/StopAndWait, ProcessorNode.Run, nodeBase.Receive, connectorService.Update (store-only), buildNodes, and #2236 (superseded). Includes:

  • Failure-mode table (bad-Open keeps old, idle-pipeline swap, mid-swap crash, ensure-running recovery, atomic-save, file-delete).
  • Invariant (1–7) analysis of the live swap.
  • Honest new-crash-surface accounting: store commit is the single source of truth; node swaps are in-memory/non-durable → crash always resumes consistent. Gated by a targeted mid-swap fault test (full chaos suite remains a Phase 2 gate, not claimed).

Adversarial self-review (done inline; the async review agents stalled on infra)

Three lenses run against the code. Caught and fixed a real bug in an earlier draft: ApplyPlanLive's !running branch imports without starting, so dev needed an explicit ensure-running step or pipelines would silently stay down after a failed apply / on a new file. Also corrected the DLQ classification (restart-class, not trivial metadata) and grounded the swap mechanism in the actual Receive/control-message design.

Risk tier

Design doc for Tier-1 work. Requesting DeVaris sign-off on the design before I implement PR1.

PR plan

  • PR1 (Tier 1, engine): swap primitive + interruptible wait + liveSwappable/LiveEligible classification + ApplyPlanLiveInPlace + unit/property/mid-swap-fault tests. Fault test gates merge.
  • PR2 (Tier 2, surface): run --dev + runtime watcher + ensure-running + pipelines dev alias + --json + docs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B3cLokwNJYLLBpdyt3cgGr

…conduit run --dev

Design doc for v0.17 execution-plan §4 (hot-reload) + §3 (dev verb). Roadmap:
Phase 1 (Developer Experience Core).

Scope decided in review: in-place-class changes apply WITHOUT restarting the
pipeline (the real §4, not the always-restart shortcut). Invariant-safety line:
- Live-swappable in place: processor config + pipeline Name/Description (no
  position/ack/connection state).
- Restart-class via existing ApplyPlanLive: connector settings, DLQ, all topology
  (position/ack/connection state; live swap deferred to Phase 2 with the chaos
  harness).

Core new work is a live, at-a-record-boundary ProcessorNode swap in
pkg/lifecycle/stream, building on the existing ControlMessage/InjectControlMessage
idiom; dev-mode is a consumer. Grounded against ApplyPlanLive, StopAndWait,
ProcessorNode.Run, nodeBase.Receive, connectorService.Update, and the community
prior art #2236 (superseded). Includes failure-mode + invariant (1-7) analysis and
an honest accounting of the new crash surface (store commit is source of truth;
node swaps in-memory), gated by a targeted mid-swap fault test.

PR plan: PR1 (Tier 1, engine: swap primitive + classification + apply decision +
fault test), PR2 (Tier 2, surface: run --dev + watcher + alias). Not yet
implemented; opening for Tier-1 design sign-off.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3cLokwNJYLLBpdyt3cgGr
@devarismeroxa
devarismeroxa requested a review from a team as a code owner July 13, 2026 04:27
…ed PR1/PR2 acceptance criteria

- Data-safety section: the swap drops zero events (control-signal trigger +
  backpressure + one-config-per-record boundary); DLQ only ever receives Nacks,
  never swap artifacts; the only exposure is crash-mid-swap -> at-least-once
  duplicates (never drops).
- Batching/windowing guard as committed PR1 deliverables: invariant comment at the
  swap site + a contract test pinning the non-buffering Process model + a
  precondition on the future batching design (flush-first or restart-class).
- Expanded the PR plan into detailed, testable PR1 (engine) and PR2 (surface)
  acceptance-criteria checklists.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B3cLokwNJYLLBpdyt3cgGr
@devarismeroxa

Copy link
Copy Markdown
Contributor Author

Tier-1 design sign-off from DeVaris (maintainer). Approved to implement. PR1 (engine) begins on feat/live-inplace-engine.

@devarismeroxa
devarismeroxa merged commit 00c749a into main Jul 13, 2026
6 checks passed
@devarismeroxa
devarismeroxa deleted the design/live-in-place-hot-reload branch July 13, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant