Skip to content

[core-split] Migrate component supervision + spawn supervisor to execution sidecar seam #1997

Closed

Description

@Xuepoo

Priority: P1 | Area: architecture | Labels: chore,P1,area:architecture | Milestone: v0.1.0 | Audit: bitty#1629 F7/F8 (CTX-1085 Slice C)

Summary

Migrate Core's two execution-supervisor-shaped implementations — the
component/ sidecar-process supervisor and plugin_runtime/spawn.rs —
onto the published bitty-execution sidecar-supervision contract
(SidecarPolicy::core_defaults, SidecarSupervisor trait, generation-
fenced typed cancel). This is the largest of the core-split residual
follow-ups and may be split further at implementation time.

Current state (evidence)

  • crates/bitty-runtime/src/component/policy.rs (CrashTracker,
    DeadlineStrikes), mod.rs (COMPONENT_BACKOFF_INITIAL = 1s,
    COMPONENT_BACKOFF_MAX = 30s, COMPONENT_CRASH_LIMIT = 5,
    COMPONENT_CRASH_WINDOW = 5min), broker.rs (effective_timeout,
    COMPONENT_REQUEST_DEFAULT_TIMEOUT = 30s, MAX = 300s): process
    lifetime + crash-recovery supervision policy duplicating
    bitty-execution's supervisor.rs / registry.rs concern.
  • crates/bitty-runtime/src/plugin_runtime/spawn.rs (SpawnRequest::validate,
    six-gate dispatch, spawn_process, kill_and_reap,
    drain_bounded_shared): kill/reap/drain/cancel mechanics overlapping
    bitty-execution registry.rs spawn/cancel/output-delivery.
  • bitty-execution#15 already publishes the contract mirror
    (SidecarGate, SidecarCrashTracker/SidecarDeadlineStrikes,
    cancel_sidecar + cancel_sidecar_typed with stale-generation fencing,
    KillScope::for_backend, SidecarIpcProtocol ownership marker) plus a
    doc-level migration table mapping every component/ + spawn.rs call
    site onto the seam, with 8 conformance probes.

Target state

  • Supervision policy + crash accounting + cancel/kill/reap mechanics route
    onto the execution seam; Core keeps the composition-root wiring only.
  • DIR-030 numbers adopted verbatim (backoff 1s/30s, 5 per 5min, 30s/300s
    timeouts, grace/shutdown/handshake/idle constants).
  • Component IPC wire v1 ownership stays bitty-network (carried today by
    Core component/); extraction moves the supervisor, not the protocol,
    unless the protocol move is separately scoped.

Acceptance criteria

  • Single supervision implementation (no parallel crash-tracker /
    backoff / kill-reap paths in Core).
  • All DIR-030 numbers preserved verbatim; behavior covered by the
    seam conformance tests + Core e2e.
  • just check + just ci-local green; Windows --target check green.
  • Docs synced (execution repo owns the contract; Core docs reference
    it).

Dependencies / blockers

  • bitty-execution#15 (sidecar contract) implemented; this issue consumes
    it. W-147 graph-gate follow-up (generalize the source-level fence to all
    four extension crates) is filed alongside and guards this migration.

Scheduling

Post-0.0.23 work. Land inside the 0.0.24 window (milestone stays v0.1.0).
No implementation until a CarryCtx task is claimed; this issue is the
立案 record only.

Activity

  1. added this to the v0.1.0 milestone on Oct 12, 2026
  2. added
    chore
    P1
    on Oct 12, 2026
  3. Xuepoo commented on Oct 12, 2026

    @Xuepoo
    ContributorAuthor

    Rescheduled to 0.0.25 (owner, 2026-10-12). Milestone stays v0.1.0. 0.0.x are all previews; undetermined items finish in 0.0.25. Split stands: fence-first PR may still go earlier with #2000's fence half; migration body lands here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1area:architecturechore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions