Skip to content

docs(build-an-oracle): document the can option on mintInvocation - #47

Merged
ig-shaun merged 1 commit into
mainfrom
docs/ora-364-ucan-claim-granted-ability
Jul 22, 2026
Merged

docs(build-an-oracle): document the can option on mintInvocation#47
ig-shaun merged 1 commit into
mainfrom
docs/ora-364-ucan-claim-granted-ability

Conversation

@youssefhany-ixo

Copy link
Copy Markdown
Collaborator

Documents the new opts.can on rtCtx.ucan.mintInvocation, added in ixoworld/qiforge#235. Refs ORA-364.

Why

The docs showed only the default (can: '*'), which is an over-claim against every real delegation. A claim resolves against a grant only when the granted ability is '*', equals the claim, or is a prefix/* covering it — so a '*' claim is satisfiable only by a '*' grant. An oracle delegated memory/* claiming '*' gets a 401, which is the production bug this change came out of.

Changes

reference/runtime-context.mdx

  • mintInvocation signature updated with can?: string
  • describes both opts.can and opts.skipCache
  • warning with the coverage rule + a correct example

develop/identity-and-auth.mdx

  • the walkthrough example now passes an explicit ability
  • capability-table row updated
  • new "Claim only what you were granted" section: the three coverage cases, a ❌/✅ pair showing the over-claim failing, and the service-first rollout order (service accepts narrow + '*' → oracle claims narrow → service tightens), since reversing the first two steps 401s every call

Both pages stay code-first — rule, example, failure mode, no protocol theory.

`rtCtx.ucan.mintInvocation` now takes `opts.can` — the ability the invocation
claims, defaulting to `'*'`. The docs showed only the default, which is an
over-claim against every real delegation: a claim resolves against a grant only
when the granted ability is `'*'`, equals the claim, or is a `prefix/*` covering
it, so a `'*'` claim is satisfiable ONLY by a `'*'` grant. Oracles delegated
`memory/*` or `sandbox/*` must claim that ability explicitly.

Adds a "Claim only what you were granted" section covering the coverage rule,
the failure mode, and the service-first rollout order — services match the
invocation's `can` by strict equality, so claiming a narrow ability before the
service registers it 401s every call.

Refs ORA-364
@mintlify

mintlify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ixoworld 🟢 Ready View Preview Jul 22, 2026, 11:07 AM

@mintlify

mintlify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ixoworld 🟡 Building Jul 22, 2026, 11:06 AM

@ig-shaun
ig-shaun merged commit f973658 into main Jul 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants