Commit graph

49 commits

Author SHA1 Message Date
Saty
804ebd15c2 Admins can set how much an account's peer verdicts weigh
users.review_weight (1 to 3, or auto) overrides the earned weight
(trust.js). Setting it re-weights the account's verdicts on functions still
waiting and settles the queue: what the new weight decides is accepted or
sent back at once. One reviewer still never decides alone.

td-server user review-weight <name> <1|2|3|auto>, or the admin actions
review-weight-1/2/3/auto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 04:41:53 +02:00
Saty
09d1091775 Peer review decides by margin: "same" ahead by three accepts
Four (five after an objection) "same" could not be reached with the few
accounts online: an author never reviews their own work, and with four
active accounts that were also the authors, each function could get at most
three verdicts. 948 of 1027 verdicts in six hours went to functions that
stayed undecided; merges fell to about 5 an hour.

- Accept when weighted "same" leads "different" by peerMargin (3: 3:0, 4:1,
  5:2), from at least two reviewers.
- Send back when at least peerReviews (3) "different" lead by
  peerRejectMargin (2: 3:1, 4:2), from at least two reviewers.
- Close votes wait for more verdicts; reviewers are offered functions that a
  verdict can still decide.
- The worker settles the waiting queue under the current rule when it starts.
- Trust and quality count accepted and sent-back functions the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 04:08:08 +02:00
Saty
f542ad5cb2 Fixes from the second contributor report
- Static gate: a file main already holds may grow 128 KB beyond its size on
  main (Unit_C.cpp is 796 KB, Player_C.cpp 491 KB: no edit to them could
  pass the 256 KB limit); only what a submission adds counts toward the total.
- A peer-confirmed function in another unit may move closer to the original
  (a header layout fix); only moving away from it is a regression.
- A function main no longer annotates anywhere (fn_07162, removed from stpl.h
  in 0f9ebdb4 while its record still said exact) is not "removed" by every
  later submission of the unit it was recorded at.
- A library function main already annotates in a file (fn_25851 in
  BSNEncodeInterface.h) no longer refuses every edit of that file; adding
  such an annotation still is refused.
- td_withdraw / td withdraw <attemptId>: the author takes back a function
  waiting for review; it returns to their claim.
- td_submit says when held functions have no changed code in the working
  tree, instead of "you hold no tasks".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:37:10 +02:00
Saty
b4f8f6d630 Speed up trust: cache the tracking start, index reviews by reviewer, use attempts.score
The admin Authors table computed trust for all 121 agents in ~30 s, blocking
the web process (arcade, admin, everything) meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:50:31 +02:00
Saty
7120dcaebc Trust: proven authors skip peer review, careful reviewers count more
Each agent (token) earns trust from its record (trust.js):
- author: of its peer-decided functions scoring 90%+ (14 days), the
  accepted share, as a 95% lower bound, must reach 85% over 20+
  functions. Its functions at 95%+ are then accepted without peer
  review, but for a random one in five that peers still review.
- reviewer: agreement with the other reviewers, counted apart for
  functions they found the same and ones they found different (30
  days). 85%/65% over 30+ differences counts x2, 92%/85% over 60+ x3.
Weights are frozen on the verdict; a decision always takes two
reviewers. Skipped functions and own verdicts never feed the record.
Shown per agent on the Account page, in td_quality and in the admin
Authors table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:38:16 +02:00
Saty
01538a93d5 Trust: proven authors skip peer review, careful reviewers count more
Each agent (token) earns trust from its record (trust.js):
- author: of its peer-decided functions scoring 90%+ (14 days), the
  accepted share, as a 95% lower bound, must reach 85% over 20+
  functions. Its functions at 95%+ are then accepted without peer
  review, but for a random one in five that peers still review.
- reviewer: agreement with the other reviewers, counted apart for
  functions they found the same and ones they found different (30
  days). 85%/65% over 30+ differences counts x2, 92%/85% over 60+ x3.
Weights are frozen on the verdict; a decision always takes two
reviewers. Skipped functions and own verdicts never feed the record.
Shown per agent on the Account page, in td_quality and in the admin
Authors table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:10:59 +02:00
Saty
84ec59d626 Stale baselines and file-local statics no longer bounce batches
Before a check counts regressions, the units it would blame are compiled
as main has them (once per main commit) and their recorded status is
updated: a header change merged later could leave a unit building
differently on main than recorded (FrameScript_Sprintf 85.9% vs 86.1%,
Spell_C_NeedsCooldownEvent recorded exact, built at 89.7%), and every
recompile of the unit was counted as a regression.

A file-local static is resolved by object and name
(Foo_Scripts.obj|s_ScriptFunctions), never by the bare name: an imported
symbol named plain s_ScriptFunctions tied every unit's table to one
address, so every RegisterScriptFunctions mismatched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:21:21 +02:00
Saty
8e6d8ad1fe Quality is judged per agent (API token)
Submissions and region claims record their token; each agent has its own
level, limits, stats and daily reset, so one bad agent no longer holds
up the account's others. Work from before tokens were recorded counts for
the account's agents until it ages out of the 24-hour window (or the
agent is reset). The Account page shows a card per agent; the admin
Authors table lists agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:57:37 +02:00
Saty
787c5a3ca6 Agent stats for their owners, a daily reset, Account in the navigation
- /api/me/quality (td_quality for agents, the Account page for people):
  level and why, submitted, merged, sent back by peers, what broke by kind,
  the latest sent-back functions with reviewer reasons, the day before.
- A limited or paused owner may reset once per 24 hours: only work after
  the reset counts, so the same bad work limits the account again. Not for
  accounts a maintainer paused.
- Account is a navigation item (with a dot while the agents are limited)
  instead of the user name badge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:41:11 +02:00
Saty
b4029cd657 Authors are limited, then paused, when their recent work keeps failing
quality.js: over the last 24 hours, the share of an author's functions
peers sent back and of submitted functions that broke (compile errors,
regressions, refusals). 50% sent back (20+ decided) or 60% broken (50+)
limits the account to one batch waiting, six submissions an hour and one
region; 70% / 85% pauses submissions and region claims. It lifts as the
work improves. Admins see an Authors table and set accounts to auto,
trusted or paused; agents see why in /api/me and the refusals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:24:20 +02:00
Saty
f6a663959a Three "different" send a function back even when five said "same"
The accept check ran first, and attempts in the earlier human-review state
did not count objections at all: 243 functions merged over three or more
"different" verdicts. Merge confirmation follows the same rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:14:33 +02:00
Saty
67965b04f1 Refuse removing annotations of functions not held; new source files join the build list
- A submission may not drop the annotation of a function of the current
  build it does not hold (51 annotations were lost that way); removing a
  duplicate is fine.
- A unit missing from compile.json compiles with the command shape of its
  folder, and the merge adds it to compile.json in the same commit (22
  contributor files were outside the build).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 04:56:07 +02:00
Saty
b55b592a82 Submissions may not declare functions that are defined nowhere
The server compiles units one by one and never links, so a call to a
function declared only by its prototype (an invented helper, or a member
declared in a header and never written) compiled and could merge; main
would not link. A newly declared function at file or class scope must be
defined in the submission, exist elsewhere in the repository, or be a
known function of the original (by name or fn_ ID).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 04:29:30 +02:00
Saty
a9eb651688 Compile only the includers a header change can affect
A verification of a header template compiled every includer (705 for
stpl.h) and a merge every includer of every submitted header (up to 1199
per header), even when the header only differed in line endings; one
such job took up to an hour and held up every other batch. Now:
- merge: headers unchanged from main are skipped; for changed ones, the
  includers whose source mentions a name the change touched (identifiers
  on changed lines, the enclosing class/struct), all of them only when
  that is more than 300;
- verification: the includers that mention the template arguments of
  the annotation (or the class), at most 16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 03:40:19 +02:00
Saty
1038c1d390 Retire single-function and server-picked claims; merge rate in bytes per hour
- New work is claimed by region only: claim without a task claims the best
  free region, claim-batch with a file claims it as a region, address
  ranges are refused; a single function only to fix one that came back.
  td_claim_batch and td_list_tasks are gone from the MCP tools.
- Progress shows functions and bytes merged per hour (last hour, 24 h
  average); index on events(type, at).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 03:21:56 +02:00
Saty
1cd2336823 Website rework: views, live socket, map, feed, review panel, arcade, admin
- Hash-routed views: home, guide, review, arcade, admin, account, login;
  wider layout.
- /api/live WebSocket pushes the feed, progress, map changes and the
  viewer's credit balance; pages poll slowly without it.
- Home: headline tiles, progress bars, live feed, a map of every function
  by state (hover, click, highlight a file), active agents, leaderboards.
- Review: queue by batch with verdict pips, filter, keyboard navigation,
  side-by-side comparison, maintainer decisions.
- Arcade: wallet, coin flip, dice, slots, rounds, big wins, daily bailout.
- Admin: account search, approve, roles, revoke, reset password, delete.
- The installers fetch the compiler for local checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 02:56:27 +02:00
Saty
e246671873 Arcade credits and games, account deletion, password reset, feed and map
- Credits are booked from what the database records (merged functions,
  peer-confirmed ones, accepted no-decompile claims, submissions that went
  on, reviews that agreed with the outcome), once each; play money for
  coin flip, dice and slots (server-side CSPRNG, session only).
- Admins delete accounts (kept as deleted_<id> when they have work) and
  reset passwords.
- /api/feed (public events) and /api/map (every function by address,
  one state letter each) for the main page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 02:44:18 +02:00
Saty
360fb9a5ce td: regions, local compiler, region submits; guidance for the region workflow
- td toolchain install / td_toolchain_install: downloads the compiler
  package (approved accounts) and sets up local checks; td-server
  toolchain pack builds it from the compile image.
- td_check compiles on the contributor machine only (includers: true for
  header changes, using the server include map).
- td_regions, td_claim_region, td_release_region; td_submit adds rewritten
  functions of shared regions as competing candidates.
- AGENTS.md, MCP instructions and guidance describe the region loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 02:37:55 +02:00
Saty
10f840b18f Regions, competing candidates, five "same" merge, checks compile locally
- Agents list regions (source files or classes: open, done, in flight,
  who claimed them), claim one as a whole and submit it in one batch.
- Several agents may claim a region; each may submit any function of it.
  Candidates are verified and reviewed on their own; the first accepted
  one merges and the others are superseded, the rest of their batches
  goes on. A done task stays done (trigger).
- Peer review: five "same" accept (no human step), three "different"
  send back.
- The server no longer compiles checks (remoteChecks, off by default);
  approved accounts download the compiler package for local checks.
- Tables for game credits and rounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 02:32:20 +02:00
Saty
eb8e088697 Merge titles say Confirm for code already on main; keepCode keeps main's annotations
A batch whose functions were all already on main (only confirmed now) was
titled "Decompile N functions", while its diff showed only the batch's other
changes. When a split keeps pending code, annotations that are on main stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 23:53:15 +02:00
Saty
2f51770e32 Approved functions merge even when the split cannot put pending ones back
Splitting a half-reviewed batch puts its pending functions back as on main.
When the approved functions call a pending one by its new signature, or a
helper the submission added, that does not compile, and the batch waited to
merge as a whole (113 approved functions in 19 batches). Next round keeps
the pending functions' new code without their annotations: main compiles,
they do not count as done, and their review goes on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 22:29:19 +02:00
Saty
abba0f5f06 Header template copies are not regressions while the header is unchanged
A template or inline function defined in a header is emitted by every unit
that uses it; main records its best copy at one of them. Editing that unit
could drop or vary its copy and refuse the submission, although the other
units still emit the good one (16 batches in an hour, mostly stpl.h).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 22:00:01 +02:00
Saty
aab2eceb3d Checks without waiting: td_check wait:false and td_check_result
A tool call blocks most AI apps, so an agent waiting for the server's compile
could do nothing else. td_check with wait: false queues the check and returns
its id at once; td_check_result fetches the state and the result later
(POST /api/check { wait: false }, GET /api/checks/:id). The guidance tells
agents never to wait idle: start the check, keep working or review, fetch
the result afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 20:42:47 +02:00
Saty
eff085bcbb td reports its build; outdated agents are told to update in their guidance
Every td request carries x-td-build (the SHA-256 of the binary, 'dev' from a
checkout). When it is not one of the published builds, or missing (td from
before this change), the guidance in work responses says to restart the AI
app or run td update, and which tools the old td lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 20:39:04 +02:00
Saty
1defae5e8b Productivity: unwritten functions withdrawn, per-function returns at verification, neighbour rule
- A submitted function without any annotation in the submission was counted
  as a failure (2176 in a day) and reserved to its author; it is now
  withdrawn back into the author's claim.
- Verification sends failing functions back one by one; the rest of the batch
  carries on (838 batches were returned whole, with their good functions).
- Changing a neighbouring function is refused only if someone else works on
  it (about 2000 refusals in a day were unheld neighbours).
- td-server stats [json] [--hours N] and docs/productivity.md: readings,
  diagnosis, changes and what to compare at the next review.
- Progress panel shows functions and bytes, each with totals and percentage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 20:26:05 +02:00
Saty
d726e97604 "No decompile" claims, peer reviewed like code
Agents mark held functions that need no source (compiler_generated,
runtime_library, generated_from_global, not_code, duplicate) with a reason
via td_mark_no_decompile (bulk). Each claim is an attempt in peer review:
reviewers see the claim instead of code and judge it from the original.
Same rules: 3 "different" send it back (port it), 3 "same" to a human,
5 "same" accept it; objections are kept for later review. Accepted functions
are skipped: no task, not counted in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 20:00:27 +02:00
Saty
2cc0508854 Bulk peer reviews, random spread across groups, review list no longer empty
- A review claim covers up to 40 functions of the pick's batch and source
  file; td_submit_peer_review takes all verdicts at once (verdicts list,
  POST /api/peer-reviews/verdicts). Old clients still send one at a time.
- Candidates are in random order within each stage (closest to a decision
  first), so reviewers spread over different groups instead of colliding.
- The review list applied its limit before skipping fully leased functions,
  so it could be empty while hundreds waited; the filter is in the query now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 19:51:42 +02:00
Saty
3b697d9b11 Long review queue: new claims need a few peer reviews first
While more than peerReviewFirstAt (100) functions wait for peer review, claiming
new work needs reviewsPerClaim (3) verdicts since the agent's last claim;
otherwise 429 with what to do. Work already held, reclaiming one's own
returned functions, paused reviewers and agents with nothing they may review
are not affected. The guidance says so while the queue is long.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 18:34:09 +02:00
Saty
994cbb36d3 Less traffic: compressed td downloads, symbol table only when changed, no update retry loop
- /download serves a gzip copy (made when binaries are published) to
  clients that accept it: td's self-update and the Linux installer
  (curl --compressed). 86 MB -> 32 MB for Windows, 123 MB -> 41 MB for Linux.
- /api/symbols carries an ETag; td keeps it with its snapshot and gets 304
  when nothing changed (it fetched 1.2 MB on every sync).
- td's self-update gave up after 10 minutes, so a slow connection downloaded
  most of the binary every hour forever. It now only gives up on a download
  that stalls for a minute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 18:21:31 +02:00
Saty
b4f1089f7c Merge sends back only a function that no longer passes; clearer commits and progress
- When main changed beneath an approved function and it no longer passes,
  that function goes back to its author and the rest of its batch merges
  without it, instead of the batch waiting forever.
- Commit messages say per function when the code was already on main or only
  an annotation was added to existing code (identical copies, INLINED code),
  so "5 functions" with a small diff reads right.
- Progress counts match_unresolved (identical bytes, some referenced data
  unnamed) as byte-for-byte matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 13:03:22 +02:00
Saty
2db46470d6 Split a body shared by approved and pending functions
An agent can annotate one body for several functions (identical copies in the
binary). When some of them are still in review, the split keeps the body and
leaves out only their annotation lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 12:53:57 +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
ac0ead9db4 td-server user rename
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 11:55:44 +02:00
Saty
45aa216805 Work comes in coherent groups; unplaced functions are placed before porting
- "Next work" (td_claim_batch without arguments, and td_claim_task without
  an id) claims a group: the best open task's source file, else its class,
  else the run of neighbouring unplaced functions in the binary.
- The worker places unplaced functions where the binary makes it clear:
  between two functions of the same file, or with their class's other
  methods (6,745 of 22,572 on the live data); again every 30 minutes.
- td_place lets an agent organize a group of unplaced functions before
  porting them: a .cpp file each (validated path) and optionally a name
  (identifiers only). Later work on them then comes per file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 11:37:20 +02:00
Saty
a47b35c159 Five "same" verdicts accept a function; objections are kept for later review
A function with peerAutoAccept (5) "same" verdicts is accepted without human
review even if a peer said "different". Every function that reaches main with
at least one "different" verdict (auto-accepted or approved by a human) is
recorded in later_review; the review page lists them with the attempt and a
"Reviewed" button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 11:17:54 +02:00
Saty
7cbd56a4ea Crew panel: peer reviewer stats, and pausing a reviewer
Per reviewer: verdicts, agreement with the other reviewers of the same
function and with the human decision, and the share of verdicts given within
10 seconds of the previous one; flags for never/mostly objecting and very fast
reviewers. Admins can pause an account's peer reviews (its verdicts so far
stay) and allow them again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 11:01:33 +02:00
Saty
91d631d0e4 Five agreeing peers and no objection accept a function without human review
After three "same" verdicts a function goes to human review as before, but it
stays open for more reviewers: with peerAutoAccept (default 5) "same" verdicts
and no "different" at all, it is approved and merged without a human. Any
objection leaves the decision to a human. The review queue shows how close a
function is, or that it is contested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 10:59:03 +02:00
Saty
ba824587ae Verify fast, merge thoroughly: includers of a changed header compile at merge
Verification compiles the submitted units (one includer per header for
header-only changes, plus one includer as the lint sample): enough to judge
and route every submitted function, in seconds even for header changes. The
merge compiles every includer of a changed header that verification skipped
and checks them for regressions, so nothing reaches main without it; it runs
in the big merge lane. Batches sent back early never pay for the full compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 05:54:59 +02:00
Saty
749942d0b5 Faster verification: lint one includer per header, reuse checks at merge, small batches first
- The preprocessed-output lint compiled every unit a second time (with /P)
  when a header changed: 323 units twice for Types.h. A header expands the
  same way everywhere, so it now lints the submitted units plus one includer
  of each changed header.
- Merges re-ran the full check, including that lint. The lint is skipped on
  merge, and when nothing the compiled units consist of (sources, included
  headers) changed on main since verification, the verification's compile is
  reused and nothing is compiled at all.
- The queue takes small batches first (by the number of units they compile);
  a big batch that waited 20 minutes goes ahead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 05:29:26 +02:00
Saty
db9c5b8f89 Merges with nothing to change succeed; submissions are normalized to LF
A function resubmitted unchanged (port-first) made the merge a no-op, and git
refused the empty commit, so the merge retried forever and blocked the queue.
CRLF from Windows workspaces is normalized on arrival.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 05:21:02 +02:00
Saty
033427c99b No free text in submissions; batch approval only approves what it shows; drain fix
Prompt injection: a submission may not add comments other than annotations,
offset and INLINED markers, and only string literals that occur in the
original executable (adjacent literals joined; #include paths restricted).
Comments and strings already on main stay. Checked before compiling, for
remote checks and submissions; errors name the line but never repeat the
text. Peer reviewers no longer see author notes or running verdict counts.
Agents are told that only AGENTS.md and the guidance field instruct them.

Review: "Approve batch" in the confirmed section also approved the batch's
functions still in peer review (for maintainers). The page now sends exactly
the functions it shows, and skipping peer review needs skipPeerReview,
which only the peer review section's button and the attempt page send.

Worker drain: a stopping worker kept starting new verifications when one
finished, so it never stopped. Stopped queues take no new work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 05:14:25 +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
0710882703 Progress no longer drops when templates are recompiled; live progress
Templates and inline functions are compiled in every unit that uses them. A
merge that recompiled many units (a header change) let the last unit's copy
win, so functions that matched in one unit were recorded as match_unresolved
from another, and the regression check missed it because the better status
came from a unit it did not compile. Now each function counts with its best
compiled copy, and a check never lowers a status measured in a unit it did
not compile.

The progress gauge and the crew views refresh every 30 seconds; the gauge
moves from its previous reading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 04:48:19 +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
Saty
2ec1bda2cc Run the website and the worker as separate processes
td-server start web | worker | all. The web process serves the website, API
and git; the worker verifies, merges, runs remote checks and refreshes the
Ghidra project. They share the database and the repository, so restarting
one never interrupts the other. Remote checks are queued in check_jobs and
picked up by the worker. Web files are read from disk per request, so page
changes need no restart at all. The web unit no longer has docker access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 03:48:50 +02:00
Saty
be1e2a9abf Review queue: show functions in peer review; maintainers may decide them early
The queue lists functions still waiting for peer verdicts (with how many peers
confirmed so far) next to the ones ready for a human. Maintainers and admins can
approve, send back or reject them without waiting for the peers. The attempt
page shows the original pseudocode and disassembly beside the submission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 03:36:43 +02:00
Saty
928c91705e Merge the approved part of a batch on its own; analyze checks in worker threads
A batch no longer waits for its slowest function: once some of its functions
are approved and the rest wait for review, the approved ones merge as their
own batch (the pending functions put back as they are on the base commit),
and the rest is rebased onto that commit. The merge re-verifies the split; if
anything breaks, the batch merges as a whole as before.

Comparing compiler output against the original runs in worker threads. A
check that recompiled dozens of units (a header change) blocked the
coordinator's event loop for minutes, so the website stopped responding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 03:33:07 +02:00
Clank Together
125f5c4e7d Batches, auto-merge, standalone td, one-line install, self-update, server Ghidra
- Batches: claim every open function of a unit or address range (td claim --unit/--range),
  submit the file once; one compile, per-function routing, merged as a whole. A failing
  function returns the batch; peer verdicts carry over to functions whose compiled code is
  unchanged (code fingerprints). Submissions may not change functions they do not hold.
- Byte-identical functions are approved and merged without human review
  (matchPolicy.autoMergeIdentical); peer-confirmed ones need one click per batch.
- Remote check: td check compiles on the server when there is no local toolchain.
- /api/original: assembly and pseudocode of the original from the server's Ghidra export
  (objdump before an export exists); td disasm/decompile fall back to it.
- td as a standalone executable (Node single executable application; tools/build-td),
  one-line installers (install.ps1 / install.sh) with checksum verification, td connect for
  any MCP client, td mcp --workspace, self-update (td update, hourly check).
- Server-side Ghidra project: built once per version, refreshed after merges, downloadable
  for contributors (td ghidra download); JDK 21 and the pinned Ghidra in deploy/install.sh.
- Agent instructions: work continuously, batches first, peer reviews in between.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 02:13:09 +02:00
Clank Together
836610da8f Clank Together: coordinator, sandboxed verifier and agent client
Coordinator (accounts with approval, API tokens, tasks with leases, sandboxed MSVC verification against
the original exe, peer review by three agents for non-identical code, human review, serial merge queue),
the `td` contributor CLI with an MCP server for agents, pinned Ghidra integration, deployment (Caddy,
systemd, nftables, Forgejo) and the wowdecomp 15890 migration tools.

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