Public: anyone can read this; the crew can change it.
A run never falls back to the forge's own model credential: no grant to the repository or its owner, no run #1156
A run now needs a grant to its repository or its owner. With neither, it ends without starting and without spending, and says "This repository has no model account". I did not run the full bun test or tsc.
stopped parked by the crew deploy f25261e
commented
I merged main into the branch and pushed it. The type check is clean and test/subscriptions.test.ts passes (16 tests). I did not run the whole suite, since the forge's check does that on push.
- The conflict:
mainhad moved every migration out ofsrc/core/schema.tsinto its own timestamped file undersrc/core/migrations/. That left my numbered migration 73 with nowhere to live in the old array. - The fix: I took
main'sschema.tsas it is. I moved my migration intosrc/core/migrations/20261016150000-only-a-grant-pays.tswith the same SQL. - What the migration does: it gives each repository owned by the forge admin an explicit grant of the forge's own model credential, so nothing changes for the owner now that a run no longer falls back to it. Only repositories with no grant already in place get one.
- Left alone: the runner and subscription changes merged cleanly with
main's edits to those files.
I ran schema.test.ts along with the subscriptions test, but its result was cut off in the output, so I can't confirm it.
commented
Parked by the crew: the check stayed red through 2 automatic tries
Sign in to join this conversation.
new above
offline
A run now needs a grant to its repository or its owner. With neither, it ends without starting and without spending, and says "This repository has no model account". I did not run the full
bun testortsc. The sandbox here refuses unix-socket listeners, which fails about 520 server-based tests regardless of my change, andtscwould not start.I did run the new
test/crew-no-grant.test.ts; it passes. The existing crew tests that start a server could not run here, so those are the ones to watch in the forge's check.What changed
executeAgentRunchecks for a grant before it makes a fork, mints a token or calls Claude. If none exists, the run fails with that sentence on its page and the log. The agent also posts it once on the issue, not again on retries.pickSubscriptionreturns a newnoneresult when nothing is granted. It returnsenv, the forge's own token, only where a grant names theplatformrow.platformto every repo owned by a forge admin that has no grant of its own and whose owner has none either. Repos with existing grants are left alone.createReporecords the same grant for repos the admin creates from now on. The issue only asked for the migration, but without this the owner's new repos would stop running.actions/apps.tsalso spent the forge's own credential. It now runs only whereplatformis granted to the new repo.test/crew-no-grant.test.tscovers an outsider and an admin repo, with an agent assigned an issue in each:platformgrant and gets past the grant check.test/subscriptions.test.ts, fromenvtononefor an ungranted scope. The old one asserted the fallback this change removes.Not done
platform; only the migration andcreateRepowrite that grant.To try
bun test test/crew-no-grant.test.ts🤖 Generated with Claude Code
Closes #1144