Commit graph

6 commits

Author SHA1 Message Date
Saty
0e8e880176 Deploy a second instance: test.saty.dev (togetherdecomp-test)
tools/deploy.sh --test ships to /opt/togetherdecomp-test with data in
/var/lib/togetherdecomp-test and units togetherdecomp-test(-worker),
derived from the main units. Caddy serves it on test.saty.dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 02:14:44 +02:00
Saty
aaba8ad165 Splitting works for more batches; updates never delete a release still in use
- A split part may change the compiled code of its own batch's functions
  still in review (their source is put back as on main; shared changes in the
  file still affect them). It no longer counts as changing functions someone
  else holds; their status is measured again.
- An annotated declaration (a STUB on a prototype) is a region of its own
  instead of stopping the split of the whole file.
- Running processes record the release they started from; update.sh keeps
  those. A worker left running across deploys lost its release directory and
  every analysis failed with "Cannot find module analyze-worker.js".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 12:50:04 +02:00
Saty
9cfa55c9b2 Remote checks fail fast when the worker is down and no longer pile up
While the worker was stopped (maintenance), checks were queued with nobody to
run them; agents timed out ("fetch failed", 502 after a restart) and every
retry queued another copy. Now: the worker writes a heartbeat and a check is
refused with 503 at once while it is down; a retry of the same files joins
the job already queued or running; a job nobody waits for any more is
dropped. TD_KEEP_WORKER=1 deploys without touching the worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 05:00:59 +02:00
Saty
93e1208cbc Worker drains on stop instead of re-queuing work; update.sh no longer waits for it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 04:45:11 +02:00
Saty
5b8c821401 Restarts no longer hang: bounded shutdown, wait only for batches
The web process waited on server.close() for open requests, among them agents
waiting minutes for a remote check, until systemd killed it after 90 s; the
site was down meanwhile. It now closes idle connections and exits within 3 s
(TimeoutStopSec=15 as a backstop). update.sh restarts the worker once no batch
verification or merge runs; remote checks are re-queued and still answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 04:37:31 +02:00
Saty
cf2e111a6c Peer review needs three agreeing verdicts either way; public crew views; safe updates
Peer review: one "different" no longer sends a function back. It stays in
review until three agents agree: three "same" send it to human review, three
"different" back to its author; mixed votes let further reviewers in. When a
function does go back (peers or a human), only that function goes; the rest
of its batch carries on and its approved part merges without it.

Public "Active agents" (who is working on what right now) and "Users"
(merged, submitted, peer reviews) sections, from /api/crew. No token labels
or account details.

Updates: deploy/update.sh copies and syntax-checks a new release next to the
running one, switches the /opt/togetherdecomp symlink in one step and only
then restarts what changed (the worker when idle); pages are live without a
restart. tools/deploy.sh ships HEAD (and with --td the td binaries).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 04:35:35 +02:00