Cloud: recover completed repository attachments
Leo asked for “this kind of recovery” when attaching a repository to a Cloud chat.
A completed clone now persists its result until the chat attachment is recorded. Retrying after a record failure reuses that saved result even when the seed job has expired, and attachment recording clears the job atomically.
Follow-up 4 to #30361. A regression test injects record failure, shuts down the fake seed socket, and verifies retry records the completed clone without another start or status call. Attachment recording clears the saved job in the same projection transaction.
Repository discovery also retains pages already fetched if authentication expires on a later page. An unsafe installation link is omitted without hiding the repositories; disconnected state is tracked separately so it cannot falsely complete the Connect GitHub wait. Fake socket tests check that partial catalog and the actual pending clone progress before completion, addressing the recovery review follow-ups.
Validation: Rust fleet checks pending; formatting and static prepush pass.
Agent session: agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
A completed repository clone now survives attachment-record failures, so retrying after the seed job expires reuses the saved result instead of cloning again. Repository discovery also keeps pages already fetched when authentication expires mid-pagination, and an unsafe installation link no longer hides those repositories.
- Attachment recording clears the saved job atomically in the same projection transaction.
- Disconnected state is tracked independently of the install link so a missing or invalid URL can never falsely complete the Connect GitHub wait.
- Regression tests cover record failure with the seed socket shut down, partial catalog pagination, and live clone progress before completion.