Skip to content

Replace inspector hub with spawn inspection - #46

Merged
cevr merged 1 commit into
mainfrom
feat/inspection-api
Aug 31, 2026
Merged

cevr merged 1 commit into
mainfrom
feat/inspection-api

Conversation

@cevr

@cevr cevr commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Problem / Intent

Inspection must match actor ownership. One actor needs typed inspection at spawn time. Tools that load later need system-wide inspection without an extra Hub API.

Approach

Add typed inspect options to both spawn paths. Keep late registration on actor.system.inspect. Use one actor-owned dispatcher for ambient, spawn, task, and system inspection. Preserve ordered delivery and isolate inspector failures.

Comment thread src/actor.ts
const inspectorValue = makeInspectionDispatcher(localInspector, systemInspectors);
const serviceContext = Context.add(capturedContext, InspectorTag, inspectorValue);

// Actor-specific state

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Inspection ownership now follows this runtime path:
Machine.spawn / system.spawn
  -> createActor
     -> select spawn inspector or ambient inspector
     -> makeInspectionDispatcher
        -> actor inspector
        -> registered system inspectors

The dispatcher is placed in the captured Effect context. Task inspection and transition inspection use the same ordered path.

@cevr
cevr merged commit 483f9bd into main Aug 31, 2026
1 check passed
@cevr
cevr deleted the feat/inspection-api branch August 31, 2026 04:14
@github-actions github-actions Bot mentioned this pull request Aug 31, 2026
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