Public: anyone can read this; the crew can change it.
Picking a model credential returns "none" for a repository whose owner is not a forge admin and has no grant; admin-owned repositories still fall back #2095
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Part 1 of #1144 (a person's ask, parked twice). The tries changed every fallback at once, and the suites that rely on the fallback went red (
test/credentials.test.ts"a subscription's scope" and "a crew run on the platform's token"). This part narrows the change: the fallback stays for repositories the forge's admins own (that credential is theirs) and goes away for everyone else. No migration is needed.Done looks like
pickSubscriptioninsrc/core/subscriptions.tsreturns a new{ kind: "none" }instead of{ kind: "env" }when the scope's owner is not a forge admin and no grant matches. Admin-owned scopes still getenv.src/crew/runner.ts) treatnoneasenvfor now, so no run changes behaviour in this pull.test/credentials.test.ts: an outsider-owned scope with no grant getsnone, and gets the subscription once it is granted. An admin-owned scope getsenv. Where an existing assertion expectsenvfor a non-admin owner, the test was wrong under the new rule: change it and name each one in the pull.bun test test/credentials.test.ts test/subscriptions.test.ts test/subscription-budget.test.ts test/spawn-keys.test.tsandbun x tsc --noEmit, and quote both.Suggested: ledger.