Deprecate AgentScope.Continuation and migrate call sites to ContextContinuation#11951
Deprecate AgentScope.Continuation and migrate call sites to ContextContinuation#11951mcculls wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4041cbed27
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
More details
The migration is behaviorally faithful: resume()/release() in ScopeContinuation are the new primary implementations with activate()/cancel() delegating to them, the (AgentScope) resume() cast is safe (both return paths give ContinuableScope or NoopScope), and ContinuableScopeManager's explicit installLegacyContextManager() call is correctly wired in Agent bootstrap, native-image activation, and all test bases. Two SQS test classes covering the non-legacy path are intentionally @Disabled pending the broader migration (APMLP-829).
📊 Validated against 23 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 4041cbe · What is Autotest? · Any feedback? Reach out in #autotest
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
09dab12 to
ed5b5ef
Compare
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
78879d6 to
55ebf56
Compare
…ntinuation AgentScope.Continuation was a bridging interface that extended both TraceScope.Continuation (public API) and ContextContinuation (modern context API). It is now @deprecated — internal call sites migrate to ContextContinuation directly. Key changes: - AgentScope.Continuation marked @deprecated - AgentTraceCollector.register/removeContinuation now accept ContextContinuation - AgentTracer.captureActiveSpan()/captureSpan() static methods return ContextContinuation (implementations still return AgentScope.Continuation for Tracer interface compat) - ScopeContinuation gains resume()/release() for the ContextContinuation contract - State, ConcurrentState, Wrapper, VirtualThreadState, AdviceUtils, TPEHelper all migrated from AgentScope.Continuation to ContextContinuation/ContextScope - ~85 instrumentation files updated: field types use ContextContinuation, activate()→resume(), cancel()→release(), scope types use ContextScope Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
55ebf56 to
f26db87
Compare
What Does This Do
Motivation
AgentScope.Continuation mixes a legacy public-API contract with the modern context API, forcing internal code to depend on a bridging type it doesn't need. Moving internal call sites onto ContextContinuation directly clears the path to eventually removing the legacy interface, without changing behavior.
Additional Notes
This is a mechanical migration with no intended behavior change — AgentScope.Continuation remains available (deprecated) for public API / Tracer interface compatibility. No release note required.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]