Repository navigation
Description
Status 2026-09-30 (audited against main f345d27)
Blocker still there:followCapability.service.ts:137-139returnsno_grantwithout anapp_grantsrow, no app spec inseedOxyApplicationsSpecs.tsrequests follow scopes, and the SDK has no path to ask for them. Second gap: device-flow finalize (authSession.service.ts:787) skips the grant for trusted apps even when a scope needs consent (OAuth/authorize,auth.ts:2572, doesn't). The first half of this body is retracted in the comments; sign-in has since been rewritten (#1412, #1422) — re-check whether those sessions get anauth_sessionsrow.
#809's authorization model is built on the OAuth authorization record. First-party Oxy apps do not create one, so every follow call from Mention, Syra or Mercaria will 403 for real users.
Verified against the code, not inferred:
auth_sessionsrows are created by exactly one route —POST /auth/session/create— and linked to a session by exactly one other,POST /auth/session/authorize/:sessionToken. Both are the QR / Commons-approval / OAuth authorize flow. (grep 'insert(authSessions)'returns a single non-test hit.)- The device-first path mints a session from
{deviceId, deviceSecret, accountId}and writes asessionsrow that has no application column at all — every column listed, there is none. resolveFollowCapabilityjoinsauth_sessions.authorized_session_id → sessions.session_id. For a device-first session no such row exists, so it returnsno_application, and every route on/v2/followsand/v2/follow-targetsrefuses.
The three shipped integrations are correct code against an unreachable API. Each was verified in a real browser on the anonymous path — none of the agents had Oxy credentials, and the signed-in path is precisely the one that cannot work.
Two gaps, and the second is the harder one
1. A device-first session records no application. The client knows which application it is (OxyProvider takes a registered clientId), so the identity exists — it is simply not persisted. Note the mint is deliberately public and carries no bearer, and its own comment says it "can be initiated from any registered cross-apex origin over normal CORS" — so on web the origin is a server-derived signal that already maps to a registered application, which is the right shape (derived, not stated by the caller). Native has no Origin, so that alone is not a complete answer.
2. There is no consent moment. follows:write and follows:context:write are USER_CONSENT_REQUIRED_SCOPES — they always require the user to be asked, even for a trusted first-party application, and that rule is the point of #810 rather than an inconvenience. A device-first app has no authorize screen, so there is no app_grants row and nowhere the user was asked.
An in-app SDK consent sheet — shown the first time an application needs a consent-required scope, writing the grant on accept — fits the ecosystem's existing shape, where interactive sign-in is already an in-app modal rather than a redirect. That is a design proposal, not a decision.
What must NOT be the fix
Letting a service credential write to the follow graph. A service token proves which application is calling but not that any user asked it to, and every part of this design refuses that — it is why the capability is derived from a session in the first place.
Blast radius
Server-side everything is live and correct: migrations applied, routes mounted and answering 401 unauthenticated, the outbox worker merged (off by default). The published SDK and button are correct. Three app integrations are merged or open. None of it can be exercised by a signed-in user until this is answered.
Activity
NateIsern commentedon Aug 4, 2026
Correction: the central claim of this issue is WRONG
A real signed-in session in production disproves it. Syra's console:
That string is the third branch of
requireRegistrar— reached only forno_grant.no_applicationproduces "This session was not created through an application authorization", and that is not what a real user sees.So the session did resolve to an application. An
auth_sessionsrow exists and links to it, the application is active, and my reasoning above — that device-first sessions cannot resolve to an application at all — is false.How I got it wrong: I traced writers of
auth_sessions.authorized_session_id, found one route, observed that the device-first mint is a different route, and concluded the two never meet. I never tested it against a real session. The console output above is one line of evidence and it beats the whole chain of reasoning.The actual blocker
resolveFollowCapabilityreturnsno_grantonly when noapp_grantsrow exists at all for that (user, application). A row that exists but lacks a scope produces a different, later error naming the scope (Missing scope: follow-targets:register).So: the user has never granted this application anything in the follow family — which is correct behaviour, not a bug.
follows:write,follows:context:writeand the rest areUSER_CONSENT_REQUIRED_SCOPES(#810), so they are never auto-approved, not even for a trusted first-party application. Nothing has asked the user yet.That makes this much smaller than described above, and it is a wiring problem rather than an architectural one:
applications.scopesmust include the follow family — that is its ceiling, and migration 0015 widened the CHECK precisely so it could.What stands from the original text
Only the last section. Server-side is live and correct, and no signed-in user can follow anything yet. The reason is consent that has never been requested, not a session that cannot carry an application.
Retitling accordingly.
[-]The follow graph is unreachable from every first-party app: device-first sessions resolve to no capability[/-][+]No first-party app has requested follow consent, so every follow call 403s with no_grant[/+]NateIsern commentedon Aug 4, 2026
Exact diagnosis, traced end to end
Two records are needed and they come from two different flows, only one of which a first-party app runs:
auth_sessions+authorized_session_id(which application)POST /auth/session/create→POST /auth/session/authorize/:sessionTokenapp_grants(what the user consented to)POST /auth/oauth/authorizeonly (recordAppGrant, one call site)resolveFollowCapabilityneeds both. First-party apps get the first and never the second, so every call returnsno_grant— which is exactly the error in production.Note what this is not: not a broken session model, not a missing column, not device-first being incompatible. The application identity works. The consent record has simply never been created, because nothing has asked.
Two halves to the fix, and one of them is not code
1. Registration (operational). An application's
scopesare its ceiling, and each app's row must list the follow family before any grant can include it. Migration 0015 widenedapplications_scopes_checkprecisely so those values are accepted. Official apps are database rows, not code, so this is a console change per application — not something a deploy does.2. A consent path (design decision).
follows:writeandfollows:context:writeareUSER_CONSENT_REQUIRED_SCOPES(#810): never auto-approved, not even for a trusted first-party application. That rule is the point rather than an obstacle, so the fix cannot be to exempt them.Two candidates:
(a) is the recommendation. The ecosystem deleted the
/ssobounce for session RESTORE, which happens on every cold boot; a one-time consent for a new permission family is a different thing, and a redirect there is what users expect from a permission prompt. Inventing a parallel consent path to avoid it would trade a well-tested flow for a weaker guarantee, on the exact surface where the guarantee is the feature.Until then
Everything fails closed, verified in Syra: the target never resolves, the button stays disabled, nothing is written and no follow is silently lost. The registration memo clears on failure by design, so each screen view retries — roughly four failed calls per view — which will show in oxy-api logs as 403 volume before the fix lands.
NateIsern commentedon Aug 4, 2026
The scope set for step 1, and why a partial one fails in a confusing way
Whoever adds the follow family to an application's registration needs all of these, not the write ones alone:
follows:readfollows:writefollows:context:writefollow-targets:registerfollows:manageis deliberately not in that list: it is acting on another application's behalf, which no first-party app should hold.Why omitting
follows:readproduces the worst failure, from Mention's grid: the screen seeds every chip from one batchedlistFollows({kind:'oxy.topic'})sweep, which is a read. Without it the grid cannot distinguish "not followed" from "not asked yet", so the chips stay inert by design rather than rendering a wrong state — which is the correct behaviour and also the least diagnosable one. A grant covering onlyfollows:writeandfollow-targets:registeryields a screen that looks broken and does not point at scopes.The same applies to any surface that renders state before a press: the read is what makes the control truthful, so it is not optional even for an app that only ever intends to write.
github-actions commentedon Nov 30, 2026
This issue has been inactive for 60 days. It will be closed in 14 days unless there is new activity.