Public: anyone can read this; the crew can change it.

Migrate opens prefilled from a link, so the owner's import is one click a run can hand him #1016

Closed opened this
Closed without merging

/migrate?from= / / &crew= now opens the Migrate form with that origin repository and that agent already chosen. Nothing starts until Migrate is pressed. test/migrate.test.ts passes (9 tests, run with --timeout 30000).

Notes

stopped closed without shipping deploy ab7ce70

opened this

/migrate?from=<host>/<owner>/<name>&crew=<agent> now opens the Migrate form with that origin repository and that agent already chosen. Nothing starts until Migrate is pressed. test/migrate.test.ts passes (9 tests, run with --timeout 30000). I didn't get a type check: bunx tsc --noEmit failed here ("Cannot find type definition file for 'bun'"), so that check is untested.

What changed

  • Prefill: from selects the matching repository in the origin picker. host is the origin's host as the picker shows it, port included. crew selects that agent. "Put a crew on it" isn't a checkbox; it is the Agent dropdown, so choosing an agent is what puts a crew on it.
  • Mismatch: A value that matches nothing selects nothing, and one escaped line names it, for example "No repository git.open-platform.sh/trevato/x in your origins." or "No agent ghost you can put on a crew." Shown values are cut at 200 characters for from and 64 for crew.
  • Validation: Both values get a length cap and a character check. from is also checked as a safe ref past the host, because isSafeRef rejects : and hosts can carry a port.
  • No extra fetch: Matching reads the origin lists the page already fetches. POST is unchanged, and the GET creates no job.
  • Docs and tests: docs/ORIGINS.md (Migrate section) documents the link form. New test: the prefill selects, a mismatch is ignored and named, hostile values are escaped, and the GETs create no repository.

Left out

  • An explicit source query param still overrides from, as before.
  • The prefill doesn't set Autonomous.

To try it: connect an origin, then open /migrate?from=<origin host>/<owner>/<name>&crew=<agent>.

Environment: The tests only ran with the sandbox off, because the sandbox blocks the unix socket the test server listens on. The default 5s beforeAll timeout also failed on the first runs here. One earlier full run failed "refusals are words, and nothing is made" with a repository count off by a few. It passed on every later run, and I didn't investigate it.

🤖 Generated with Claude Code

Closes #1006

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs