You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves the plugin-local P1 items from the BQAA preview readiness
tracker (google#1316) across seven review rounds. Framework-level terminal
agent/run error callbacks remain intentionally deferred to a separate
framework API change.
Tracing correctness:
- TraceManager keeps ID-only span records (no plugin-owned OTel spans
are created or exported; ambient trace IDs are still inherited) in
per-branch stacks keyed by InvocationContext.branch(), with
kind-checked pops, so concurrent ParallelAgent branches cannot pop
each other's spans. Tool spans additionally carry an operation
identity — the function-call ID when present, else a per-ToolContext
synthetic ID (the framework materializes absent IDs as "") — plus a
push-time parent, because ADK executes an event's function calls
concurrently within one branch.
Privacy boundary:
- JsonFormatter.redactTree walks raw containers with sensitive-key
redaction BEFORE any Jackson conversion and fails closed per leaf
("[UNSERIALIZABLE]"), and the assembled attributes tree passes
through it at the output boundary. Session state is redacted before
truncation so smartTruncate's whole-map textual fallback can never
expose embedded secrets.
Lifecycle and shutdown:
- Per-invocation lifecycle tokens are durable (captured by every append
continuation; immune to tombstone-cache eviction) and append admission
is atomic with finalization via the token's monitor.
- One absolute deadline bounds each shutdown operation end-to-end:
pending-task waits, every processor drain, and executor termination
share it; finalization is completion-ordered (cleanup runs before the
returned Completable completes, since RxJava's doFinally notifies
downstream first) with disposal covered by the same idempotent action.
- BatchProcessor teardown is ownership-transferred (ReentrantLock;
an in-flight flush past the deadline performs the teardown), appends
are bounded (get(timeout) plus LimitExceededBehavior.ThrowException so
Storage quota saturation cannot park append() for minutes), and the
final drop-stat snapshot is delivered at true teardown completion.
- Live StreamWriters are bounded by admission permits acquired BEFORE
construction (each writer owns an internal client and a non-daemon
append thread; MAX_LIVE_WRITERS <= closer queue capacity, so a
constructed writer can never lose its cleanup owner). Detached closes
run on a bounded plugin-owned closer service; at plugin shutdown the
unstarted queue drains to a bounded reclaim owner without
interrupting active closes. Rows refused at the cap are accounted
("writer_permit_exhausted"), alongside "after_close",
"shutdown_timeout", "writer_create_error", and "late_after_finalize".
Event contract:
- Synthetic adk_request_* function calls emit HITL_*_REQUEST (not
_COMPLETED); long-running calls emit pairable TOOL_PAUSED rows with
pause_kind and function_call_id; user-message handling inspects
FunctionResponse parts, routing HITL responses to HITL_*_COMPLETED
(with pair keys, content.result on both producer paths, Python
parity) and non-HITL responses to TOOL_COMPLETED with pair keys.
Adds the TOOL_PAUSED view and pair-key columns on TOOL_COMPLETED.
Tests: focused BQAA suite 173 passed (upstream baseline: 135); full
core main profile 1,629 passed / 0 failed / 24 skipped. New regressions
cover parallel-branch and concurrent id-less tool span ownership, zero
exported spans, nested and fail-closed redaction (attributes and
session state), atomic admission/finalization interleavings, durable
tokens across cache eviction, single-deadline multi-batch /
task-plus-drain / multi-processor shutdown bounds, completion-ordered
cleanup, blocked-append and blocked-close teardown ownership, writer
permit exhaustion, and shutdownNow-leftover reclaim.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments