perf(server): overlap OpenCode setup and trace reply recovery (#18367)

Overlap eligible OpenCode GitHub and assigned MCP preparation. Trace deferred reply discovery and recovery, and forward the native GitHub transport recorder.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip authored and GitHub committed 2026-10-30 15:21:05 -05:00
1 parent e54354d9d3
commit f53db0c70f
12 files changed
+138 -26

No files matched your search

+13 -1
View File
@@ -254,6 +254,17 @@ It does not extend an earlier execution attempt or include time waiting for
the background worker to run. Retries have separate roots. A check that finds
no eligible work can end without a restore child.
`task.response_presentation` owns recovery of an already committed native reply.
It starts a separate linked root because deferred presentation can run after the
execution attempt and workspace finalization have ended. Worker discovery for
a specific run and worker checks include candidate reads under
`response.resolve`. Each discovery or check owns its root; direct recovery and
its worker check share one root when nested. `response.transaction`
includes the recovery transaction; `response.transaction.entry` measures entry
into its callback, including connection acquisition. These spans retain only the
same hashed run ID and never capture reply content. A successful task status is
separate from the time the reply is saved.
These spans exist before provider dispatch, including setup failures. Preparation phases have
only the existing `paperclip.task.run.run_id` attribute: the first 12 hexadecimal
characters of the run UUID's SHA-256 hash. Failed operations set error status
@@ -641,7 +652,8 @@ Without an OTLP endpoint, tracing remains silent and does not export data.
The run link in Honeycomb matches `task.provider_session` for native runs, `task.run` for legacy adapters,
`task.execution_attempt` for server preparation and settlement, and
`task.workspace_finalization` for deferred native copyback. It retains the exact hashed run-ID and service filters and groups by trace ID. The URL builder uses Honeycomb’s supported `in` operator for the four root names; see the [query specification](https://github.com/honeycombio/honeycomb-mcp#query-specification-for-run_query). This changes only the query link. The operator endpoint gate and span attribute allowlist remain unchanged.
`task.workspace_finalization` for deferred native copyback and `task.response_presentation`
for committed native reply recovery. It retains the exact hashed run-ID and service filters and groups by trace ID. The URL builder uses Honeycomb’s supported `in` operator for the five root names; see the [query specification](https://github.com/honeycombio/honeycomb-mcp#query-specification-for-run_query). This changes only the query link. The operator endpoint gate and span attribute allowlist remain unchanged.
The canonical lifecycle is: