Do app:/user:-prefixed keys compose with temp:? (e.g. app:temp:x) — docs and splitter logic disagree
The state-key documentation (session/session.go:420-424, session/vertexai/vertexai.go:143) describes app:, user:, temp:, and no-prefix as the four state scopes, and temp: keys are documented as "scoped to the current invocation and must not reach storage."
The docs don't say whether these prefixes compose — i.e. whether app:temp:x means "app-scoped, but also ephemeral" or whether it's simply an app-scoped key whose name happens to be "temp:x".
The actual splitter logic (internal/sessionutils/utils.go:43-51, duplicated in session/database/service.go:539-547) treats it as the latter: app:/user: prefixes are stripped first, and the temp: check only applies in the unprefixed branch. So app:temp:x is persisted as app state under the key "temp:x", not discarded.
If that's intended — prefixes are single-level and don't compose — it'd be worth a one-line doc clarification saying so explicitly, since "temp: keys must not reach storage" reads (at least to me) as applying regardless of what other prefix precedes it. If it's not intended, this is the underlying code path worth looking at.
No security claim here either way — just flagging the ambiguity between the doc wording and the splitter's actual behavior.
Source: google/adk-go