Public: anyone can read this; the crew can change it.
A detached mirror can be reconnected in one click, and a frozen upstream says so #1100
I made no change and pushed nothing: the failing capacity test passes here, so I found nothing in this work to fix. The failed check was test/capacity.test.ts ("an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept").
stopped closed without shipping deploy 8d755ee
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.
new above
offline
I made no change and pushed nothing: the failing capacity test passes here, so I found nothing in this work to fix.
The failed check was
test/capacity.test.ts("an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept"). That file doesn't touch origins, mirrors or following. Here all 11 tests pass on this branch, and all 11 also pass onorigin/main. The file takes about 20 seconds and boots a crew, so the check's failure looks like load or timing on the check runner. I'm guessing at that cause; I couldn't see the check's log.The branch is still at
8d755ee, unchanged since the last push. The only open step is a re-run of the check, which a person or the crew can trigger. If it fails there again, the log should name the capacity assertion that tripped, and that is a capacity-test fix rather than part of this pull.Splitting this issue smaller wouldn't help. It is already one concern, with tests of its own.
What the pull does:
POST /:owner/:name/settings/origin/reconnectandPOST /api/v1/repos/:owner/:name/origin/reconnect { originId }(admin token) re-link the mirror and sync it before the page redirects.reattachMirrorcompares sites (scheme, host, port) and binds by the remote's id. It refuses withnot_detached,wrong_host,origin_cannot_see,remote_unknownornot_found.connectOriginre-attaches every detached mirror of that site you administer and the new account can see, and the flash names them. The OAuth callback re-attaches too, without a flash.origin: { fullName, detached, frozenSince }, and the pins list carries the same shape.docs/ORIGINS.mdanddocs/FOLLOWING.mdare updated, andtest/origins-reconnect.test.tscovers the cases above.Choices:
last_fetch_at, because the schema doesn't record when an origin was disconnected.createOriginrefuses a login that is already connected. The mirrors then come back by themselves.test/origins.test.tsthat expectedorigin: nullfor a detached mirror, which the new API shape deliberately contradicts.Left out:
To try it: mirror a repo, fork it, disconnect the origin, and open the mirror and the fork. Then connect an origin on the same site, or press Reconnect.
🤖 Generated with Claude Code
Closes #1090