test: close the per-file coverage gaps for the scoping surface
Every subject-extractor row of the invariants carrier table is exercised with a matching and a foreign-keyed carrier; the HMR re-apply seed path (sessions of agents that predate the plugin are marked started) is pinned; the scoped tool-provider disposal, plural restrict() validation, singular scopeHost absentee, tool-subagent passthrough, stale-stage drop, and disposing-parent spawn (INACTIVE_EFFECT, no orphan) each gain their test. Two genuinely defensive branches carry justified v8-ignore markers.
This commit is contained in:
@@ -203,6 +203,8 @@ export function startInProcessRun(
|
||||
try {
|
||||
unlink = request.parent.ctx.effect(() => () => handle.dispose())
|
||||
} catch (error: unknown) {
|
||||
// Fire-and-forget: start() must rethrow synchronously; the child's
|
||||
// teardown (stop → unregister → detach) reaches quiescence on its own.
|
||||
void handle.dispose()
|
||||
throw error
|
||||
}
|
||||
|
||||
@@ -184,6 +184,9 @@ export function attachStructuredRuntime(childCtx: Context, schema: StructuredOut
|
||||
if (decision.kind === 'accept') captured = { value: staged.value }
|
||||
return decision
|
||||
} finally {
|
||||
/* v8 ignore next -- defensive false branch: a concurrent re-stage
|
||||
* would need a second capture call INSIDE the first's post-execute
|
||||
* chain */
|
||||
if (pending === staged) pending = undefined
|
||||
}
|
||||
}, { prepend: true })
|
||||
|
||||
Reference in New Issue
Block a user