Posting this at the request of the review team, who hit the error while testing my app and asked for a fuller reproduction.
The short version: every declaration on my side checks out, the grant explicitly permits the scope I request, and the host still does not issue a storage token. The same code works when the storage backend is reached via anna-app dev --storage aps, and fails when the published binary runs under the Cloud Agent.
App: error-journal, id 183, version 0.1.2 (id 536) Executa: tool-sadi-error-journal-r483yxrw, id 1099, v0.3.3 (executa_version 379) CLI: v0.1.49 · Host: https://anna.partners
The error
Returned on every diagnose_error invoke in the reviewers’ session:
-32021: storage_token missing — host did not authorize storage for this invoke
Worth noting this is not a scope rejection. In an earlier round I saw:
-32029: storage_token does not permit scope='app'; allowed=['tool', 'user']
That one was my bug — I was requesting scope='app', which is not issued for plugin-side tokens. Fixed by switching to scope="user".
The current error is different in kind: no token was minted at all, which happens before my request’s scope is evaluated. So the question is not “why was my scope refused” but “why was no token issued for this invoke, when the grant permits it.”
Everything on my side, verified
1. The published binary declares user-scope capabilities
Extracted from the exact artifact uploaded for executa v0.3.3:
$ tar -xzf error-journal-0.3.3-linux-x86_64.tar.gz
$ echo '{"jsonrpc":"2.0","method":"describe","id":1}' | ./error-journal
version: 0.3.3
caps : ['aps.scope.user.read', 'aps.scope.user.write', 'llm.sample']
2. The plugin requests scope="user"
$ grep -n 'STORAGE_SCOPE' error_journal_plugin.py
33: STORAGE_SCOPE = "user"
275: res = reverse_rpc("storage/get", {"scope": STORAGE_SCOPE, "key": key}, invoke_id)
280: params = {"scope": STORAGE_SCOPE, "key": key, "value": value}
Every reverse RPC passes context.invoke_id from the parent invoke.
3. The platform’s stored manifest agrees
$ anna-app executa list --json | jq '.executas[0].manifest_cache.host_capabilities'
["aps.scope.user.read", "aps.scope.user.write", "llm.sample"]
4. host_capabilities is declared at the top level of manifest.json too
{
"schema": 2,
"host_capabilities": ["aps.scope.user.read", "aps.scope.user.write", "llm.sample"],
...
}
anna-app validate --strict passes.
5. The grant explicitly permits the scope I request
$ anna-app apps grants error-journal
bundled executa grants
error-journal:
sampling_grant: {"enabled":true}
storage_grant: {"enabled":true,"allowedScopes":["user","tool"]}
No missing grants warning. Sampling, which is granted the same way, works.
6. The Executa’s visibility is correct
$ anna-app executa status tool-sadi-error-journal-r483yxrw --json
{ "visibility": "app_bundled", "is_published": false,
"latest_version": { "version": "0.3.3", "id": 379 } }
The same code works through the local harness against real APS
$ anna-app dev --storage aps
storage backend aps (real nexus APS via /api/v1/storage/*)
Pasting the same Kubernetes error three times produces, on the third:
This is the 3rd time you have hit this in prod-cluster — first seen 20 August.
storage.set returns ok with an etag, incidents persist, and repeat detection works. Screenshot attached.
So the difference is not the code. It is the execution path: local harness → real APS works; published binary → Cloud Agent does not get a token.
Possibly related: apps status and apps grants disagree about latest
$ anna-app apps status error-journal
latest : v0.1.2 (id=536, published=—)
$ anna-app apps grants error-journal
"latest_version": "0.1.1",
"installed_version": "0.1.1",
"update_available": false
apps status reports v0.1.2 as latest; apps grants reports v0.1.1 as both latest and installed, with update_available: false.
I have never been able to install v0.1.2. Uninstalling and reinstalling from the Developer Console returns installed_version: 0.1.1 every time. submit-review confirmed under review: v0.1.2, and the review team confirmed they installed v0.1.2 — but from my side the runtime consistently reports 0.1.1.
Is the installable version derived from a different field than apps status reports? If the runtime resolves an older version than the review pins, that would explain a lot on both sides.
What would help
- Anything visible server-side about why a storage token was not minted for this invoke — a rejected precondition, a mismatch between the grant and the executa version, anything.
- Whether the storage grant is scoped to a particular installed app version. If the grant was enabled against v0.1.1 and the runtime resolves a different executa version, that could produce exactly this.
- Whether there is a supported way to force a newer cut version to become the installed one.
Happy to run any diagnostic, enable extra logging, or re-cut with changes if it helps isolate it. I have not changed anything since the review round, so the state is exactly as tested.