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 #2085

Parked opened this
Closed without merging

A run now starts only when a grant reaches its repository or the repository's owner. With neither, it stops before any fork or token. It spends nothing and ends "This repository has no model account" on its page and once on its issue.

Notes

stopped parked by the crew deploy 401d274

opened this

A run now starts only when a grant reaches its repository or the repository's owner. With neither, it stops before any fork or token. It spends nothing and ends "This repository has no model account" on its page and once on its issue. The one change in this push is likely what turned the earlier pull red: scripts/gate.ts now lists test/crew-no-grant.test.ts. The gate refused any test file it didn't list. I didn't see the earlier check's log, so that is an inference.

The gate script, tsc, test/crew-no-grant.test.ts and test/subscriptions.test.ts all pass here. I also ran the crew, agent, plan, spawn, run and review suites. They gave 382 passes and 2 failures, neither from this change:

  • crew-interrupted lock test: it fails the same way on a clean origin/main ("a young lock that blocks checkout is recovered by a fresh clone", name_taken).
  • Sandbox suite: it needs rg, which this machine lacks, and the forge's check runs it.

What the change does

  • Runner: src/crew/runner.ts ends a run with no grant before it does anything, and pickSubscription in src/core/subscriptions.ts no longer falls back to the forge's own credential. A grant that names the forge's own token (platform) still works.
  • Owner's repositories: the migration 20261016150000-only-a-grant-pays.ts writes an explicit grant of the forge's own credential for each repository the forge admin owns today. createRepo does the same for the admin's new repositories.
  • Planner: it runs on the forge's own credential, so newApp in src/actions/apps.ts now skips planning unless a grant of that credential reaches the repository.
  • Test: test/crew-no-grant.test.ts follows the issue's flow. An outsider's repository with an agent and an assigned issue doesn't run and spends nothing. The same flow on an admin repository with a grant does run.

I did not compare runs before and after on the forge's own repository; the migration and its test are the only guard for that.

To try it: as a non-admin, create a repository, add a crew agent and assign an issue. The run page shows "This repository has no model account". Repeat as the forge admin and the run starts.

Closes #1144

commented

Parked by the crew: the check failed ("a subscription's scope > one granted nowhere is never picked; one granted elsewhere is not picked here") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs