Skip to content

Fix 25 problems from the log (http, replica, runners) - #247

Merged
danielehrhardt merged 2 commits into
mainfrom
godmode/66-fix-25-problems-from-the-log-http-replic
Oct 25, 2026
Merged

danielehrhardt merged 2 commits into
mainfrom
godmode/66-fix-25-problems-from-the-log-http-replic

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

Fixes main's red CI and quiets the device-group warnings that were flooding the log. The main problem in the log, the projects slug clash, was already fixed on main by #243, which was merged after the build that wrote this log.

Main is red, and this branch makes it build again

Every main CI run since #241 and #243 were both merged this morning fails at typecheck (latest run on 30567535, same error). The two PRs fixed the same clash in different ways:

The slug-clash lines

These all come from one cause:

  • could not take a change of projects yet (1505)
  • could not copy the setup to runner (226)
  • POST /api/* failed (502 runner_sync_failed, the only errors)
  • could not merge memory after run (24, a different run each time)

Each one carries UNIQUE constraint failed: projects.workspace_id, projects.slug. The installed build (6bdf269+changes) doesn't have #243; it reaches the desktop app with the next update.

Code changes in this PR

  • Memory merge after a remote run: a failed setup copy no longer stops the agent's memory merge when the runner already has a setup. It uses the same work: true rule that Resolve project slug clashes between device group computers #243 gave chat starts and messages. The failure is logged through logFailure, so an offline or timed-out runner logs at info.
  • Setup copy that fails the same way again: if the failure text matches the runner's stored sync_error, it is logged at info. The first failure still warns, and the runner card still shows it.
  • Replica change that keeps failing: it is retried with every pull, about once a minute. Now it warns once per peer, table, key and error, then logs at info.
  • Test: added one in replica.test.ts that checks the levels go warn, info, info.

Not code bugs, nothing changed

  • Older memory-merge and "take the changes" warnings: the didn't answer in time, is offline and could not take the changes of lines were logged on builds without Fix 25 problems from the log (http, runner, db) #237 (merged 10-23 09:31Z). Since Fix 25 problems from the log (http, runner, db) #237 they log at info.
  • Network outages: ENOTFOUND (81), ECONNRESET, ECONNREFUSED, Request timed out, the sources Can't reach github.com and Timed out talking to github.com lines, and Resolving timed out (that one is from before Fix 25 problems from the log (http, runner, db) #237, which classifies it as "Can't reach").
  • Mac sleep: CDP connection closed (the browser restarts on next use). The log counts 206 sleeps, 186 of them during runs.
  • Slow queries and blocked event loop: load while runs persist large in-flight messages. A 129 ms DELETE FROM agents is a one-off.
  • high memory use: inline screenshots in desktop chats.
  • unknown API route and the mirror skipping a heavy chat: the runner is on an older build. They go away once it updates.

Checks

  • pnpm -r typecheck: passes.
  • remote-snapshot, replica, remote-e2e and self-repair tests: 77 pass, 0 fail, after merging the latest origin/main.
  • Whole core suite in one process on this Mac: 55 failures. The cause is state leaking between test files: a fake browser from an earlier file breaks applyRuntimeSettings in later ones. I reran each of the 27 affected files on its own and all pass except folders.test.ts > list subfolders, which fails here because the temp dir holds more than 500 entries. Linux CI was green before the double merge.

Task #66 · done by Self-Healer with Godmode Bot

…rnings

- remote-snapshot.test.ts: drop the imports two merges added twice, and expect
  the free-slug behaviour for a project or workspace both computers made
- A remote run's memory merge goes ahead on the runner's existing setup when
  the setup copy fails
- A setup copy that fails like last time and a replica change that keeps failing
  on retry are logged at info after the first warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant