Skip to content

fix(coding-agent): preserve live extension context when attaching handler abort signals #3817

Description

@Yeachan-Heo

Signed status

CONFIRMED / ACTIONABLE / OWNER: @Yeachan-Heo

Dev CI run https://github.com/Yeachan-Heo/gajae-code/actions/runs/30890523179 failed on exact merged dev commit ded5926ad3c538a680449d61c1d31ac508499b2e in test:@gajae-code/coding-agent:shard-3-of-8.

Exact failures

  • sdk-default-model-selection-e2e.test.ts: model.set executes every Q10-advertised selection and persists the public current readback retained initial-model instead of the selected reasoning-model.
  • sdk-host-wiring.test.ts: lifecycle teardown swallows dual owner failures... rejected instead of resolving.
  • sdk-host-wiring.test.ts: session_start swallows startup plus owner-release failure... rejected instead of resolving.
  • Evidence producer and final affected-path validation then failed closed as cascades.

Attribution

PR #3814 only changed TUI scheduler/test/changelog files. It triggered the coding-agent dependent shard and exposed, but did not cause, the failure.

All three failures reproduce at #3805 merge commit 0aa86a4c9537b2327145e09661de0aa85c95c16f and all pass at its parent 9477947f8. The regression is introduced by #3805's { ...ctx, signal } handler-context copy in ExtensionRunner:

  • spreading eagerly evaluates the live model getter, freezing the initial model for SDK model-control handlers;
  • the spread occurs outside the runner's handler error boundary, so a context getter failure rejects runner.emit() instead of being contained.

Repair lane

Replace eager value spreading with a property-descriptor-preserving per-handler context carrying its own abort signal. Add focused coverage for live getters and error containment, then validate the three exact failures plus runner timeout behavior and targeted coding-agent checks.

No CI rerun/cancel, merge, canonical fast-forward, main, release, or #3805 evidence mutation is authorized.

Signed-off-by: Bellman gaebal-gajae@users.noreply.github.com

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions