Skip to content

fix: Remove duplicate CI view and fix Home fleet routing - #17

Merged
eyeveil merged 3 commits into
mainfrom
fix/home-fleet-tools-ci-removal
Oct 29, 2026
Merged

eyeveil merged 3 commits into
mainfrom
fix/home-fleet-tools-ci-removal

Conversation

@eyeveil

@eyeveil eyeveil commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

The CI dashboard from #16 duplicated the existing Git and PR panel, and the fleet work from #15 left Home unable to clone, register, update, or search projects on other machines. A review pass also found that the fork's migration 72 collides with upstream's, which would stop the server from starting after the next upstream sync.

What changes:

  • The project CI dashboard is gone on web and mobile. Saved CI tabs migrate to the remaining panels.
  • A request from one thread to another now returns its result to the requesting thread, not to Home. Results wait in their own outbox lane, so an offline requester no longer stalls the responder thread. After a server restart, the requester gets the continued run's answer instead of the cut-off one.
  • Home can run t3_project_clone, t3_project_create, t3_project_update, and t3_thread_search with another environment's environmentId. A relayed clone requires source-control:write on the target, the same as a direct clone.
  • PeerLinkOrigin and CoordinationRequests move to ForkMigrations.ts. Databases that recorded them at upstream ids 72 or 73 are rewritten on startup.
  • Peer links report an untrusted certificate as unreachable with the TLS code, not "not a T3 environment".
  • A forwarded clone gets 130 s, above the peer's 120 s clone limit.
  • An open HTML artifact refreshes its signed URL before it reloads.
  • Ctrl+N and Ctrl+P move through the / and $ composer menus.

Checks: vp run check:changed passes format, lint, knip, and typecheck. Server tests pass except four that fail only on the Mac (spawn vp ENOENT and the /private/var temp path). Browser tests for the touched web files pass (138 tests).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Remove the project CI dashboard that duplicated the Git and PR panel, and
migrate saved CI tabs on web and mobile.

Return coordination results to the requesting thread instead of Home. Keep
them in their own outbox lane so an offline requester cannot stall the
responder, and follow restart continuations to the real answer.

Let Home clone, register, and search projects in other environments.
Relayed clones need source-control write on the target.

Move fork migrations PeerLinkOrigin and CoordinationRequests out of upstream
slots 72 and 73, which upstream uses for its own migrations.

Report untrusted peer certificates as such, give forwarded clones their full
time budget, refresh expired artifact URLs, and add Ctrl+N and Ctrl+P
navigation to the composer menus.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Oct 29, 2026
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 3/5

[High impact] The PR changes coordination and project workflows across connected environments.

Fix blocked result delivery and the remote clone deadline before merging.

Findings

  1. P1 Offline requesters block other answers ▶
  2. P1 Slow clones report failure ▶
  3. P2 Stalled machines delay Home alerts ▶
Fix with agent prompt
### Issue 1
apps/server/src/orchestration-v2/EffectOutbox.ts:328-330
All `coordination.result` effects from one responder share the same lane. If its first requester goes offline, `EffectWorker` keeps that result pending indefinitely. The earlier pending row then blocks every later result from that responder, including answers for online requesters. Separate ordering by requester, or let unrelated results pass a delayed result.

### Issue 2
apps/server/src/home/FleetService.ts:203-206
The new remote clone route passes through `FleetBroker.invoke`, which stops waiting after 90 seconds. The clone itself allows 120 seconds, so a clone taking 90–120 seconds returns `environment_unavailable` to Home while the remote clone can still finish. Raising the timeout in `PeerMcpClient` does not cover this route. Give broker-relayed clones a deadline above the clone limit too.

### Issue 3
apps/server/src/home/HomeService.ts:333-344
`report` now waits for remote `threads.coordination` calls while holding Home's shared lock. A connected but stalled environment can take the broker's full 90-second timeout. Healthy approval and question events in the same batch wait too, as do turning Home off and starting fresh. Classify remote completions outside the lock with a short deadline, then recheck Home before delivery.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Removes the duplicate CI dashboard and adds Home routes for remote project creation, cloning, and thread search.

  • Coordination replies now return to the thread that asked for them.
  • Home can route project setup and thread searches to other machines.
  • The standalone project CI dashboard is no longer available on web or mobile.
  • Fork-only database changes now use their own migration history.
  • Peer links identify untrusted certificates as unreachable.
  • Open HTML previews refresh old signed URLs before loading.
  • Ctrl+N and Ctrl+P move through open composer menus.

Intentional change acknowledged by eyeveil: the duplicate CI dashboard and its saved tabs are removed in favor of the existing Git and PR panels.

Reviews (1) · Last reviewed commit: "Remove duplicate CI view and fix Home fl..." · Reviewed by Greptile

Comment on lines +328 to +330
const effectLane = (table: "candidate" | "active") =>
sql.unsafe(
`CASE WHEN ${table}.effect_type IN ('thread-title.generate', 'coordination.result') THEN ${table}.effect_type ELSE '' END`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Offline requesters block other answers

All coordination.result effects from one responder share the same lane. If its first requester goes offline, EffectWorker keeps that result pending indefinitely. The earlier pending row then blocks every later result from that responder, including answers for online requesters. Separate ordering by requester, or let unrelated results pass a delayed result.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/server/src/orchestration-v2/EffectOutbox.ts
Line: 328-330

Comment:
**Offline requesters block other answers**

All `coordination.result` effects from one responder share the same lane. If its first requester goes offline, `EffectWorker` keeps that result pending indefinitely. The earlier pending row then blocks every later result from that responder, including answers for online requesters. Separate ordering by requester, or let unrelated results pass a delayed result.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in 2176350. Each coordination.result is now its own lane in claimableCandidatePredicate, so a result waiting on an offline requester blocks neither turn work nor other results. Requester-side command ids already deduplicate results, so they need no ordering among themselves. FoundationPersistence.test.ts now claims a second requester's result while the first sits in backoff. Before the fix, only one effect was claimable.

Comment on lines +203 to +206
"projects.clone": Effect.fn("FleetService.projects.clone")((input) =>
cloneProject(input).pipe(
Effect.provideService(Repositories.SourceControlRepositoryService, repositories),
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Slow clones report failure

The new remote clone route passes through FleetBroker.invoke, which stops waiting after 90 seconds. The clone itself allows 120 seconds, so a clone taking 90–120 seconds returns environment_unavailable to Home while the remote clone can still finish. Raising the timeout in PeerMcpClient does not cover this route. Give broker-relayed clones a deadline above the clone limit too.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/server/src/home/FleetService.ts
Line: 203-206

Comment:
**Slow clones report failure**

The new remote clone route passes through `FleetBroker.invoke`, which stops waiting after 90 seconds. The clone itself allows 120 seconds, so a clone taking 90–120 seconds returns `environment_unavailable` to Home while the remote clone can still finish. Raising the timeout in `PeerMcpClient` does not cover this route. Give broker-relayed clones a deadline above the clone limit too.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in 2176350. FleetBroker.invoke now waits 130 s for projects.clone, above the 120 s CLONE_TIMEOUT_MS, and 90 s for everything else.

Comment thread apps/server/src/home/HomeService.ts Outdated
Comment on lines +333 to +344
if (event.environmentId !== environmentId) {
const result = yield* broker
.invoke(event.environmentId, {
actor: { environmentId, threadId: homeThreadId },
request: {
op: "threads.coordination",
input: {
threadId: event.threadId,
...(event.runId === undefined ? {} : { runId: event.runId }),
},
},
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Stalled machines delay Home alerts

report now waits for remote threads.coordination calls while holding Home's shared lock. A connected but stalled environment can take the broker's full 90-second timeout. Healthy approval and question events in the same batch wait too, as do turning Home off and starting fresh. Classify remote completions outside the lock with a short deadline, then recheck Home before delivery.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/server/src/home/HomeService.ts
Line: 333-344

Comment:
**Stalled machines delay Home alerts**

`report` now waits for remote `threads.coordination` calls while holding Home's shared lock. A connected but stalled environment can take the broker's full 90-second timeout. Healthy approval and question events in the same batch wait too, as do turning Home off and starting fresh. Classify remote completions outside the lock with a short deadline, then recheck Home before delivery.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in 2176350. report classifies watched completions before taking Home's lock, with a 10 s deadline per remote check, then reads Home again under the lock before it delivers. A failed or timed-out check still reports the run. The new test 'a stalled environment does not hold Home's lock while a report classifies it' turns Home off while a check never answers. Against the old code, the test hangs on disable.

Give each coordination result its own outbox lane, so a result waiting on an
offline requester no longer holds answers for other requesters.

Classify watched completions before taking Home's lock, with a 10 s deadline
per remote check, so a stalled machine cannot delay other alerts or turning
Home off.

Let a relayed clone wait 130 s, above the 120 s clone limit.
Add a projects.update fleet operation so Home can repoint or rename a project on another machine with t3_project_update. Script changes need the same settings scopes as a direct update.
@eyeveil
eyeveil merged commit e99176e into main Oct 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant