Commit graph

16 commits

Author SHA1 Message Date
ragnarok-clanker
4efc56fa8d Let agents revise merged functions through region claims
A region whose functions are all on main can be claimed, and its done tasks submitted as revisions: competing candidates verified and peer reviewed like new work, while the task stays done whatever the outcome. Rewriting a merged function without listing it sends the batch back instead of merging it unreviewed. Admins can force a done task back to open.
2026-10-26 18:06:07 +01: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
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
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
aab450b4f7 Unchanged code is not submitted for review; a looping account pauses
A region claim plus "submit everything held" sent every function of the
file to peer review, also the ones the agent never touched (1006 of one
agent's 1179 waiting reviews were code already on main, unchanged).
- td submit sends only functions the agent rewrote (or lists in confirm).
- Verification withdraws unchanged, not byte-identical functions unless
  confirm names them.
- An account whose last six submissions in 15 minutes were all refused
  before compiling (not synced, conflicts, comments) pauses ten minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 05:06:52 +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
22b5975ffc Fair verification queue; up to 8 batches waiting per account (was 4)
Verification took the oldest batch overall, so the per-account cap of 4 was
what kept one fast contributor from holding every slot. Now the next slot
goes to the account with the fewest batches verifying, and the cap can be
higher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-19 00:34:29 +02:00
Saty
e3fda917c5 Hourly submit limit counts only accepted submissions
Refused submissions (too many batches waiting) counted against the 30 per
hour, so an agent retrying while its queue was full used up the hour and
stayed locked out after the queue cleared. Refusals now say when to retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-19 00:31:28 +02:00
Saty
714ee0a61c An account may hold 500 tasks (was 200)
Claims and submissions are capped by the same limit, so everything held
can be claimed and submitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 23:01:33 +02:00
Saty
d09cfed509 Fixes from a contributor's report: x64 symbol addresses, header and Win32 functions
- td symbol new accepted only 32-bit addresses; every x64 function is at
  0x14xxxxxxx.
- Verification also compiles the unit each submitted function is emitted
  from on main: a header's inline function only exists in units that use it,
  and a Win32/ copy is compiled out of the x64 build. A function never
  compiled before that is defined in a changed header gets all includers.
- Agents may edit that unit too, not only the task's nominal file.
- Guidance: adjustor thunks and deleting destructors are compiler-generated;
  mark them no-decompile instead of stacking annotations on a body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 20:34:29 +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
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
a2b405c14b Merges recompile only what changed; a slot for small batches; queue limit per account
- A merge reuses the verification's compile for every unit whose source and
  included headers are unchanged, and compiles only the rest. A split part
  uses its parent's verification, so merging the approved functions of a
  header batch recompiles the one .cpp file instead of hundreds of units.
- While a big batch (more than 20 units) is verified, the other slot takes
  only small ones.
- An account can have 4 batches waiting for verification; further submits get
  429 with a hint to do peer reviews meanwhile (maxQueuedBatches).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
2026-10-18 05:35:51 +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
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