Skip to content

Permission-wait and subagent spans (CL-5170) - #308

Merged
TheGreatAxios merged 6 commits into
mainfrom
stack/w3b-cl-5170-perm-subagent
Aug 4, 2026
Merged

Permission-wait and subagent spans (CL-5170)#308
TheGreatAxios merged 6 commits into
mainfrom
stack/w3b-cl-5170-perm-subagent

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Stack

PerfTrace stack 3c/8 — base: stack/w2a-cl-5171-auto-spans

Linear

https://linear.app/abklabs/issue/CL-5170/permission-wait-and-subagent-spans

Summary

Add permission.wait and subagent spans so attribution can separate ask-gate idle and fanout cost from inference/tools.

Test evidence

  • Span wiring tests green
  • Review PASS

Merge note

Merge after CL-5171. Parallel with dump/rollup and OTEL settings.

@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown

CL-5170

@TheGreatAxios
TheGreatAxios force-pushed the stack/w2a-cl-5171-auto-spans branch from 1eb6a74 to ddb9c72 Compare August 4, 2026 16:21
@TheGreatAxios
TheGreatAxios force-pushed the stack/w3b-cl-5170-perm-subagent branch 2 times, most recently from 90e035b to e6cb5d9 Compare August 4, 2026 16:29
@TheGreatAxios
TheGreatAxios force-pushed the stack/w2a-cl-5171-auto-spans branch from ddb9c72 to c3442c6 Compare August 4, 2026 18:10
@TheGreatAxios
TheGreatAxios force-pushed the stack/w3b-cl-5170-perm-subagent branch from c40f4e8 to a28796d Compare August 4, 2026 18:10
@TheGreatAxios
TheGreatAxios force-pushed the stack/w2a-cl-5171-auto-spans branch from c3442c6 to 073d6de Compare August 4, 2026 22:42
Always end the wait span in finally when requestApproval throws.
Move the process-wide turn id into active-turn so clear() and turn
close both null the nesting slot used by gate and task spans.
Gate path with operator message free text must only land tool_id +
allow/deny enums on the span; reason stays operator-facing only.
Concurrent multi-observer setups overwrite the process-wide turn
parent used by permission.wait and subagent spans.
Start the exclusive subagent span before worktree setup and end it after
teardown so attribution includes prepare and cleanup, including prepare
failures that never reach run().
Bare return of finishWithWorktree ran the outer finally before teardown
settled. return await keeps cleanup inside the exclusive child wall.
@TheGreatAxios
TheGreatAxios force-pushed the stack/w3b-cl-5170-perm-subagent branch from 5b79189 to b01d246 Compare August 4, 2026 22:44
@TheGreatAxios
TheGreatAxios changed the base branch from stack/w2a-cl-5171-auto-spans to main August 4, 2026 22:44
@TheGreatAxios
TheGreatAxios merged commit d15010a into main Aug 4, 2026
2 checks passed
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