plans/correct-state-machines-pr8-evidence.md
PR8-B0 is the image-generation inventory at PR6 commit
e3703a162543878f6abd4bd38d9978f7124ba3ba, before this migration.
| Boundary | PR8-B0 inventory |
|---|---|
| Admission and mutation glue | useGenerateImage.start and .cancel each read and call raw remote.dispatch (four semantic boundary entries); enqueue receipt was treated as the public start result |
| Subscription/ref-counting glue | No image-specific registry; renderer used the shared distributed-machine subscription |
| Promise/waiter registries | ImageGenerationService.active retained provider promises and abort controllers; there was no authoritative request-completion registry |
| Effect callback correlation | createCommandRunner detached a generate(...).then(success, failure) callback; correlation depended on the job invocation captured by that callback |
| Deletion/cancellation guards | ImageGenerationService.deletionFences, resetFenceCount, begin/endAppDeletion, begin/endReset, plus cancellation by provider request ID |
| Form/dialog reset logic | ImageGeneratorDialog reset prompt/theme/target on accepted close and closed when start() returned a job ID; correctness depended on start() meaning admission |
| Raw dispatch call sites | Two renderer calls, represented by four access/call inventory entries in boundary_inventory.test_support.ts |
| Initiator routing | Presentation stored job-to-window routes but could fall back to an unrelated visible window |
| Terminal retention | Terminal actor jobs retained for 30 minutes; no bounded authoritative completion payload store |
PR8-P1 is the inventory on
refactor/image-generation-operation-settlement.
| Boundary | PR8-P1 inventory |
|---|---|
| Admission and mutation glue | Public useGenerateImage uses two shared useMachineMutation instances and completion-aware request(); admission and settlement are separate |
| Subscription/ref-counting glue | Each prepared request owns a RemoteSubscriptionLease; release is tied to authoritative settlement, refusal, or failure |
| Promise/waiter registries | One authoritative OperationRegistry (64 unresolved, 128 retained terminal payloads); no image-specific promise/waiter map was added |
| Effect callback correlation | One exhaustive GenerateImage handler in the reusable one-shot handler map; every accepted effect emits one correlated terminal event |
| Deletion/cancellation guards | The actor key uses KeyedAdmissionGate through destructive commit; the provider service keeps its app/reset fences as a non-actor resource barrier and aborts provider work |
| Form/dialog reset logic | Existing accepted-close behavior is unchanged, but start() returns a job ID only after authoritative admission; refusal/transport failure returns null, preserving prompt and dialog |
| Raw dispatch call sites | Zero in the public hook/component façade. Two calls remain inside useImageGenerationRequestActor.dispatchRequest, the explicit completion-aware protocol-v1 adapter |
| Initiator routing | Presentation, operation waits, and cancellation authority are scoped to the captured initiating window session; no generic route registry or unrelated-window fallback |
| Terminal retention | Actor projections retain terminal jobs for 30 minutes; authoritative outcomes retain at most 128 settled payloads, independently of the 64 pending-operation capacity |
cancelled outcome. Actor, machine, host, and
app-deletion disposal use typed disposed outcomes; manager teardown uses
the owning host disposal cause. Renderer/window release detaches observation
but does not replace a host-owned terminal outcome.remoteOperation, the operation wait handler, and the request adapter restores
the PR6 transport shape without data migration.createCompletionAwareActor as the raw-dispatch compatibility
boundary. They are inventoried and do not leak into migrated mutations.OperationRouteRegistry, saga/workflow layer, generated binding, protocol
envelope change, persistence, or app-run migration was introduced.