Skip to content

Merge upstream 1.0.10-alpha.2 while preserving RetroReversing features - #1237

Merged
RetroGameDeveloper merged 32 commits into
mainfrom
sync/upstream-20261115
Nov 15, 2026
Merged

RetroGameDeveloper merged 32 commits into
mainfrom
sync/upstream-20261115

Conversation

@RetroGameDeveloper

@RetroGameDeveloper RetroGameDeveloper commented Nov 15, 2026 •

Copy link
Copy Markdown

Brings in the 30 commits n-delic/decompdecomp made since our last sync (1.0.10-alpha.1 and alpha.2). This is a merge, not a rebase: rebasing our 1,546 commits would rewrite main and strand every branch and worktree built on it. Earlier syncs (#665, #909) were done the same way.

What comes in from upstream

What stayed ours

  • Version 1.0.9-rr.2, the RetroReversing install and update URLs, and the ~/Decomp-RetroReversing data home.
  • Our deep permuter, its routes and UI. Upstream's /api/deep-permuter, deep-permuter.js and its tests were an older port of ours and are dropped.
  • Our agent settings, tool policy, prompt settings and manual MCP. These are the originals behind upstream's Improve source context compatibility and preparation retries #214 port. Upstream's real additions are grafted in: a saved override that no longer validates is skipped field by field, and a revoked token stays revoked.
  • Our project totals (project_totals triggers) and autosave through project_activity. Upstream's tally_changes count and its hot/quiet autosave are left out; the deleted-folder skip and the hourly optimize() are taken.
  • Our README. It gains a PS4 row and paragraph, but not upstream's shorter rewrite (Highlight compiled C lines associated with assembly differences #266), whose install and data-home facts differ from ours.
  • Our CI runners. Upstream's are its own self-hosted machines.

Library

Upstream changed permuter_gen, csource, arch/mips and permuter_local. In our fork these are aliases into decomp-repair, so the changes went there: RetroReversing/decomp-repair#5, released as v0.5.0, which this PR pins.

Behaviour to know about

  • A background permuter turn on a fork unit now holds that unit for the turn (upstream feat: copy target assembly without address annotations #180's trial run, about half the permuter's time saved on LTCG units). Turns default to 60 s; the deep search opts out.
  • Project builds have two memory watchdogs on macOS: one per process (ours) and one for the whole tree (upstream's). The timeout message contains both wordings.
  • twins cache version bumped to 7, so caches pick up x86-64 objects.
  • ROADMAP: the What-works-where table was rebuilt with PS3, PS4, GBA and Xbox columns (earlier merges had lost three of them). A new item covers an app-wide cap on concurrent deep searches, which upstream has and we don't yet.

Tests

  • ruff check src tests projects: clean.
  • 52 targeted test files: every conflicted area, every upstream-changed test file, the new upstream tests, and the library, console, agent and kit tests. Run in a scratch environment against v0.5.0, with 2 workers: 1,490 passed, 257 skipped.
  • 10 tests fail, and the same 10 fail on origin/main today: the GC/PS2 test_consoles demo cases, test_kits[ee-gcc-2.96] and two test_overlays imports.
  • Many tool-dependent tests skip in the scratch home because the compilers aren't installed there. The real link and padding-aware split paths have not been run on a demo ROM, and no feature was run in the app.
  • Some upstream tests were adapted where they assert upstream-only design (e.g. project_facts instead of a patched overview, per-call tool counting, find() rejecting a call in an expression). Assertions about what each feature guarantees are kept.

🤖 Generated with Claude Code


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

risner and others added 30 commits November 9, 2026 01:54
* Add self host macos arm

* Re-run CI

* Re-run CI

* Re-run CI

* Re-run CI

---------

Co-authored-by: risner <8061434+risner@users.noreply.github.com>
… build configures again only when its files change (#180)

* A unit counts as not building when any step of its build fails, not only its object

failed_units matched the build's failed targets against each unit's object. A unit built in steps (parts
compiled, then linked into its object) reports only the step that failed: with -k 0, ninja never tries the
object. On an x86 game, edit_file kept a new file of stand-ins that didn't compile as breaking nothing; the
agent's next compile then found the unit broken, was told it had been broken before the change, and lost its
claim. That happened 302 times over 156 functions in a week. failed_units now also counts every target
made from a failed one (ninja -t query, followed up to the unit's object), so the edit is undone with the
build's error instead.

* A compile that breaks a matched neighbour still says how close the function came

Where a function's code changes how its neighbours compile (inlined into them, or whole-program optimisation
choosing registers across functions), a draft short of exact breaks a matched neighbour, and the compile is
undone. The function's own score went with it: on an x86 game, agents of 63 functions wrote about this, and
parked drafts behind #if flags they rebuilt by hand just to measure them.

The rejection now gives the function's score and diff, says that such neighbours match again once it matches
exactly, and records the attempt with its score. It never becomes the best attempt (best=False in _record):
briefs offer the best to start from and a release puts it back in the file, where this code can't stay. Nothing
counts as a match that didn't before.

* A rejected compile's message names the broken functions without reusing the function's list of names

The message's list of broken functions was put in `names`, the variable that holds the ways the function may be spelled. Nothing read it after (the branch returns), but the next change to that branch could have.

* NOT IN YOUR BUILD names the symbol the build looks for, not the function's unique name

A function whose row name was made unique with a trailing "'" (a re-sync after a split) was reported as
"its object doesn't define _f@4'". Agents took the quote for the defect, said no C makes such a name, and
stopped looking for why the function really wasn't in the object.

* A definition the build leaves out by an #if is said in the brief and never compiled into

On an x86 game, agents parked drafts of 13 functions (about 18 KB) in `#if defined(SOME_FLAG)` blocks no build
defines. The brief showed each as the function's current source, the score as its own, and every compile
replaced the definition inside the block, where the judge never saw it.

csource.hidden_by follows a file's conditionals and says which branch leaves a position out, only when it can
be sure: a test of a macro that may be defined (the compiler's own, one the build passes) hides nothing.
ForkProject.never_defined finds the macros nothing could define (no #define in the project's sources, no
mention in its build files, -D/ included); that search runs only when the code would be hidden with every such
macro undefined, so files with no parked code pay nothing for it. The brief now marks a hidden definition, and a
compile that would replace one is refused before anything is built, with how to bring it out.

* A definition parked in an #if branch the build leaves out is compiled where the build sees it

Refusing to compile into a parked definition left an agent stuck: on an x86 game the drafts were parked because,
where the build sees them, they break a matched neighbour (whole-program optimisation ties their code together),
so edit_file refused to move them out too, and the agent could do nothing with the function at all.

A compile now puts the agent's version where the build sees it, by its place in the original, without the parked
copy, and carries the copy's reccmp annotation (and its comment, unless the agent sent one) along with it. Kept, the
function is visible from then on; broken neighbours undo it, and say how close the function came. The brief says
so. csource.marker_above finds the annotation above a definition's comment.

* A try replaces the build's own definition beside a parked draft, and the compilers' own macros don't hide code

- A draft parked in `#ifdef` before the build's own definition in its `#else`: the parked one was taken out and a
  new one put in beside the visible one, so every try was a redefinition. The visible one is the one tried now.
- The pinned KMC GCC 2.7.2 defines MACH and EE-GCC 2.96 R5900 (their `-dM -E`). Code under `#ifdef MACH` was said to
  be left out of the build, though it's compiled.
- `ninja -t query` runs on the build file and folder the project's `custom_args` give ninja (`-f`, `-C`). With
  `-f other.ninja`, a failed step counted against no unit.
- A make-built fork has no such query: the code says so, and ROADMAP.md has the item.

* Past a parked draft, only a definition at file scope is taken for the build's own

Review of #178: past a hidden definition, the next match of the name was taken for the visible one, and csource.find
reads a call followed by a block as a definition (`y = scale(x) * 2.0;`, then the `if`'s `{`): a try on `scale`
replaced `twice` from the call on and sat inside it, and the 0% compile kept the damage. A later match counts only at
file scope (`csource.at_file_scope`: no block open there but a namespace or `extern "C"`); it's looked for by the
name the definition was found by, then by the function's other names (ForkEngine._seen_beside).

Tested on the review's case with the fork fixture, on at_file_scope, and on _seen_beside.

* A definition past a parked draft is taken only when it surely is one the build compiles, and builds run with -C are read from their folder

Review of #178:
- Past a parked draft, a call at file scope was still taken for the build's own definition: csource.find reads
  `static double bias = scale(2.0) * 2.0;` up to the next definition's `{`, taking what's between for K&R parameter
  declarations, so a try on scale replaced bias and twice. A later match counts only when its name's own parameter
  list is followed by its body with no `;` between (csource.opens_body; a K&R definition isn't taken there either).
- Of `#ifdef _WIN32` and its `#else`, a macro the app can't tell, the first was taken: the try went into a branch
  the build may leave out, and the judge kept scoring the other. A later match counts only when every conditional
  around it is surely taken (csource.surely_compiled); else the parked copy is tried, as before.
- never_defined left out the build's own folder, so a macro a generated header defines (`build/config.h`, which a
  source includes) looked never defined, and the code under it hidden. The headers there are read too.
- With `custom_args: ["-C", "sub"]` the build names its targets from sub/: a failed `part.o` matched no unit's
  `sub/final.o`, and a unit's build asked ninja for `sub/final.o`, an unknown target there. Targets are named from
  the build's folder (ForkProject._build_dir, _target) both ways.

Each with a test that fails on the previous head.

* The permuter builds each variant once: a turn on a project's function is one run of tries

Every variant the permuter tried on a project's function was built twice: once as the variant, then again as the
file it put back. On an x86 game built with link-time code generation a build is a ~5 s whole-unit link, so one
variant took ~11 s and half of it went to the rebuild (a minute's turn tried five).

ForkEngine.trial_run holds the function's unit for the turn: a try that isn't kept puts its file back without
building it, the next try's baseline comes from the scores already known for that text, and the unit is built
once at the end, as its file is. A unit linked into the game still takes the tree alone for each try, as before.

* decomp-permuter reads a C function among MSVC's words and C++ headers

On an x86 game built with MSVC, decomp-permuter read none of the near misses it was given: one line of the shared
header (`typedef unsigned __int64 ...;`) stopped pycparser on every function, and past it were `__declspec`, classes
with methods, references and the types of system headers. Every turn fell back to the simple rewrites.

The generator now gets the part of the header the function uses (seeds.HeaderIndex, read after MSVC's words go, as
`struct __declspec(align(16)) T` was a struct named `__declspec` to it), and reads it as C: object-like macros put
in, `__int64` as a stand-in type, calling conventions and `__declspec` dropped, classes as structs of their data,
every tag a type by its own name, references as pointers, the undeclared types of system headers declared. In the
function's own C, MSVC's words are noted and put back into each variant, so it compiles as the source did.

On that game's near misses with only register, stack or order differences, the headers of all of them now parse
(none did) and 43 of 185 parse whole; the rest are C++ in the function itself, which it still doesn't read.

* decomp-permuter looks a project's function up by the name its C has

A PC or Xbox game's function is named by its mangled symbol (`?Update@@Yaxh@Z`), and the generator was asked for
that: no C spells it, so once decomp-permuter could read an x86 game's code, every turn ended with "Function ...
not found in base.c" and fell back to the simple rewrites. ForkEngine.permuter_name gives the spelling the
definition has, from the same names the engine finds definitions by.

* decomp-permuter reads C++ functions: methods, templates, references and constructors

Most of an x86 game's near misses are C++: `Class::method` definitions, template calls, references, locals built by
their constructors. pycparser reads none of it, so those functions only ever got the simple rewrites.

The generator's Restorer turns each into C pycparser reads and back, the way it already does MSVC's words: `A::B`
and `A::~A` become plain names, a template-id followed by a call becomes a name noted in a table, a reference in a
declaration a pointer named for it, `T t(a, b);` and `T(a, b)` calls of stand-ins, and a method's trailing `const`
is noted and put back. The header's types (declared_types) tell a constructor from a call. The randomizer moves the
stand-ins about like anything else; what comes back wrong costs a compile, and only the judge's score counts.

On an x86 game's near misses with only register, stack or order differences, 169 of 185 now parse (43 did); the
rest are macros that take a type, placement new and initializer lists.

* decomp-permuter keeps a calling convention where it was, and reads a cast to a system type

Two misses found by restoring decomp-permuter's own unchanged print of an x86 game's near misses and judging it:
- `T *__stdcall f(` came back as `T __stdcall *f(`, which doesn't build: a calling convention goes before a
  pointer's `*` only where it was (a pointer to a function), else right before the name.
- `(PDWORD) &x`, a cast to a type no header the permuter reads declares, was read as a call and came back as one,
  which doesn't build: a name only ever written in parentheses before an operand is declared a type.

* A variant the project refuses no longer ends a function's permuting

decomp-permuter's inlining writes a helper function beside the function, and a fork's compile_and_diff refuses a
helper sent with it. That NetworkError reached _turn, which takes a refusal for the best attempt being refused
every time and leaves the function to agents for good: on an Xbox game, 2 of 3 near misses lost every turn they
had within seconds of their first. A refused variant is now skipped like one that doesn't compile; only when every
variant of a turn is refused is the refusal handed on, as before.

* decomp-permuter reads a macro called with a type, a body's local of a type the header lacks, and a method on a renamed class

On an Xbox game 43 of 352 near misses were C decomp-permuter couldn't read, so their turns had the simple
rewrites only. 13 stopped at a macro: one called with a type (`F(int, 0x20)`, `MP_RAW(bool, 0x62C)`), defined in
the header or the source itself, or an object-like one in the function's C (`MATCH_VOLATILE`); those are put in
where they're used now, and a call of values stays a call. About 15 stopped at a local of a type the header
doesn't have (the SDK's WAVEFORMATEX and BOOL, a type declared elsewhere): two names in a row or `T *p =` at a
statement's start make it a type. And 6 were methods defined on a class the source names differently from the
symbol (`C_vt_003AB500::Func_E46D0`): permuter_name now gives the definition's own
spelling, which the generator looks the function up by.

* decomp-permuter puts in only the object-like macros that stand for C's own words

`#define CPlayerCar CPlayerCarRaceView` put in renamed the function's own class, so decomp-permuter didn't find
it: a macro naming another name reads as the name it is and stays. And a local's type needs two names in a row,
not one name cut in two (`limit = 1.2f;` was read as a `limi` declaring `t`).

* decomp-permuter keeps MSVC macros whole, a const method's const in place, and a C++ function's classes

Review of #179:
- msvc_as_c leaves preprocessor lines and strings as they are, and takes only spaces and tabs after a word it
  removes: `#define WINAPI __stdcall` lost its name, `#define STDCALL __stdcall` its value (so variants lost the
  convention), and the newline after a word joined two lines. A macro standing for MSVC's words is put in where
  the function uses it, so its convention is kept like any written one.
- A const method's `const` is marked on the definition itself (a last parameter of the stand-in type DDconst):
  by name it went back after the first `(...)`, so `operator()(int a) const` became `operator() const(int a)` and
  two const overloads got `const const` and none.
- A C++ function's header keeps its `#ifdef __cplusplus` branch (seeds.c_only(cxx=True)), where its classes are;
  a C function's is still C's.
- permuter_gen's docstring says what C++ isn't read yet (enum class, std:: containers, operators other than (),
  noexcept, throw(), new/delete), and a test pins each to the simple rewrites.

* decomp-permuter reads a header that wraps its C in extern "C" { }, and a C function's comment isn't C++

The lookahead after `extern "C"` let the spaces before `{` through, so `extern "C" {` lost its words and left a bare
`{ ... };` pycparser refused: a method in the usual guarded header (`#ifdef __cplusplus` / `extern "C" {`) got no
variants at all. The lookahead now takes the spaces in. `is_cxx` reads the code without its comments and strings, so
`/* this adds one */` keeps a C function's header C's. The headerless DS case now asserts its variants, and two
touched comments describe the game by its kind.

* A permuter turn lets its function go when the run's last build fails, and counts its hold from when the run starts

The turn's end (trial_run's build of the unit as its file is) can raise, and the function's claim was only deleted
after it: the function stayed held, and shown as the permuter's, until the claim ran out. It's let go in a finally
of its own. And a turn waits for the unit when another turn holds it: the hold (SECONDS + HOLD_SPARE_SECONDS) was
counted from before that wait, so it could run out mid-turn and an agent claim the function the permuter was still
trying. It's counted again once the run starts, and a turn whose hold is gone by then ends without trying anything.
Tested with stand-in runs.

* A PC build configures again only when its files change, not on every edit

build.ninja depended on every source and header, so each edit wrote the whole build again before compiling: on
an LTCG game of 1,400 units, 3.1 s of every 4.2 s compile (the unit's own compile, link and judging take under
one), for agents and for each of the permuter's variants. configure reads no file's contents, only which files
there are, so build.ninja now depends on build/<version>/configure.facts, the lists of sources and headers, which
the build brings up to date first (restat): configure runs when a file is added or removed, as before, and a
plain edit compiles at once.

* A project's unit builds asked for together build in one run

A project's builds take turns, as they share ninja's log: its permuter workers and agents queued for one unit at a
time, while a run's own cost (reading the build file, configure's facts) is half a unit's build. On an x86 game's
LTCG units, 8 built one by one took 5.6 s and 1.3 s in one run. The builds asked for while a run goes now go
together in the next (_UnitBuilds, up to 16): one `ninja -k 0` of their objects (ForkProject.build_units), each
unit told what building it alone would say. A unit whose step failed sees that step's failure and no other unit's;
a run whose failure no unit owns (ninja stopping before it builds: configure failing, a target with no rule) builds
each unit alone; one unit, and builds that aren't ninja, build alone as before. A build asked for during a run
waits for the next run, as the running one may be building an older copy of its file.

* A try with nothing renamed puts its file back without waiting for the build lock

unname() took the build lock to write back the names a try changed, and nearly every try changed none. With the
builds asked for together running under that lock, each of the permuter's tries waited for the next run here,
writing nothing: two of four workers sat in it at any moment, and batching gained 30% where one run of 8 units is
four times faster than 8.

* A unit in a run of builds is built only when ninja says so

From a review of the batched builds. A unit without a failure of its own was taken as built: a run the memory cap
ends, or a dependency walk cut short, left its old object to be judged as its new file's. Ninja is now asked (a
dry run) whether the rest are built, and when it isn't sure they're built alone. A failed step making two files
is one failure in its unit's log, not two; a run's time grows with its units, and one that runs out of time says
so for each, rather than building them all again one by one under the build lock; a problem putting failures to
units builds each alone; each thread raises its own copy of a run's exception; a project's batches are made
under the engine's lock, as two first builds at once made two of them; and a built unit gets no log, as no caller
reads it and what a run of several printed is theirs together.

* A unit's build stops at its time limit even while its output is open, and a run of builds gives no verdict it can't stand by

From a second review of the batched builds. A unit's build read its output to the end before its time limit was
looked at, so a compiler hung under wibo held the build, and the project's build lock, forever (every build in
the app had this; unit builds now read on a thread and stop at the limit). A run of several now has one unit's
limit, and builds each alone when it runs out, as one unit's hang shouldn't fail the others; a run the memory
cap ended (it covers the whole run, and kills whichever step is biggest) builds each alone too. Built means
ninja says "no work to do" (a user's NINJA_STATUS or a project's --quiet took the progress lines the dry run was
read by), asked of each unit when the batch's answer is no, so only the unit with work left builds again; and a
unit whose own build raises gets the exception for its caller alone, not every caller of the run.

* A batched unit gets the verdict its own build gives, a build stopped at its limit takes its compilers with it, and PC configure sees a file added or removed alone

Review of #180:
- After a run of several units fails, each unit is built (ninja's dry run says so) or is built alone, so its
  verdict and log are what building it alone gives, buildhelp's hints too. What the run printed isn't read for
  whose failure it was any more: a step's own output saying `FAILED: <another unit's object>` failed that unit.
- Every build step's time limit holds while the step still prints or hangs with its output open, not only a unit's
  (a whole build, verify, reconfigure and setup read their output to the end first), and a step stopped at it is
  stopped with everything it started: on Windows its process tree, elsewhere ninja is asked to stop its commands
  and its process group is then killed. Killing ninja alone left the compiler running. This is #114's fix (its
  reader thread, stop_process_tree and its message), folded in for both modes with its test.
- PC configure's facts depend on the files they list and the folders holding them, each also a phony with no
  inputs: a file added on its own was never seen, and one removed stopped ninja before configure could run.

* A build stopped at its time limit kills every process under it, not only its process group

ninja runs each command in a process group of its own, so killing the step's group missed the commands: a compiler
that ignored SIGTERM outlived its build. Before anything stops, the step's whole tree is read with `ps` (a command
whose ninja is gone has another parent and can't be found from the step). Each process is asked to stop, given
5 seconds, then killed. Tested on Linux with a ninja step whose compiler ignores SIGTERM.

---------

Co-authored-by: Nick Silvestro <nick@silvestron.com>
…nowledge, and on what no C makes (#181)

* The user can give agents a proposal only one model backs

Shared knowledge counts once two different models back a proposal. On an x86 game worked by one model only, 55
proposals waited for a second model that never came (54 had a single backer), and every session found the same
things out again. The panel now offers "Give it to agents" and "Reject" on those proposals too: the user is the
second opinion. decide() already took any proposal; its docstring, the reply to a proposal and the prompt's
heading ("or checked by the user") now say so.

* An agent isn't handed back a function it said no C makes, and the user hears when only those are left

A verdict that no C makes a function sets it aside once NOT_C_AGENTS agents of NOT_C_MODELS models agree; agents of
one model never get there. On an x86 demo whose last function was a hand-written float-to-int helper, two agents
of one model claimed it a dozen times between them, each time writing the same note: once an agent's run started
again, its own recent release no longer kept it off.

The claim order now skips a function the agent itself said no C makes (another model's agent can still take it),
and nothing_to_claim says which ones are waiting on that verdict. When every open function is, the agent is told
to stop, and the user gets one notification per function: set it aside in its panel, or let another model look.

* A helper stops by itself when all that's open is what it said no C makes

The claim order never hands those back to it, so every session could only find nothing to do: they failed one
after another into a pause after five. Now the helper stops before a session starts and says what the user can do
(set them aside, or start a helper of another model). Another helper, which hasn't said so, works on.

* Only an agent whose own verdict is on every open function is told to stop

"Stop working on this project" went to any agent that found nothing to claim while every open function had a no-C
verdict from anyone: an agent of another model, out of claims only because it had released them for now, quit
though its verdict was the one they waited for. It's said only when every open function has the agent's own
verdict. Tested with an agent of another model that released the function.

* A room's guest hears what's left and why, as the host's own agents do

Review of #181: the host's /collab/claim answered a guest with no function and no reason, and both guest paths (a ROM
room's and a project room's) said "Nothing left to claim in this room". A function the guest's agent said no C makes,
the last one open, read as matched or taken; the agent wasn't told to stop, and the host's user wasn't told it waits
for them. The host now answers with Network.nothing_to_claim for that agent (which tells its user), and the guest
passes it on; an older host that doesn't say still gives the bare line.

Tested with a mock host for both guest paths; test_collab has the same case as a room on the demo ROM (which needs
KMC GCC and the LLVM tools to build).

---------

Co-authored-by: Nick Silvestro <nick@silvestron.com>
…ren't addresses, and the first build works on Windows (#184)

* A PC or Xbox function keeps the code after a mid-function ret, and a flag mask isn't taken for an address

Found on an Xbox game built with link-time code generation, whose functions the PC path analyses:
- Ghidra's body for a function ending in a tail call can stop a byte short of the jmp, so the original's side
  decoded a garbage byte; the end now moves past the instruction it cuts.
- Ghidra's end stops at a ret in the middle of a function when an earlier jump reaches the code after it, which then
  became a false function. The function's own flow moves its end there, only when Ghidra stopped at a ret or jmp
  (a function ending in a call that doesn't return keeps its end).
- Xbox programs load at 0x10000, so masks like `and edx, 0x70000` fall inside .text: an immediate inside another
  function's code is a constant, not a relocation.
- A byte table ends at its first byte past the jump table's entry count, a table two jumps share is relocated once,
  and a purge Ghidra couldn't work out (2147483647) counts as none.

* On Windows an Xbox game builds with the XDK's own Visual C++ 7.1, as the pack's can't start there

The msvc pack's 7.1 cl.exe doesn't start on Windows itself: its runtime (MSVCR71.dll) isn't in the pack, where wibo
has it built in on Linux. Every Xbox import's first build failed there with code 4294967295 before the user could
pick another compiler. The user's XDK has a copy of the same 13.10.3077 build with the runtime beside it: on Windows a
7.1 game takes it (that XDK build's copy first, else any XDK's 7.1), with 7.1's /arch:SSE. Without one, the import
says the build will fail and to set up an XDK.

* Only a jump's own index table ends at its case count, and a bit mask's immediate is never an address

Review of #184:
- A byte table is cut at its first byte past the jump table's entries only when what it loads is the jump's index:
  an unrelated lookup table after the code was cut short and its rest became a false function.
- `and`/`or`/`xor`/`test` with an immediate that equals a function's start is a mask, not a relocation to it.

* README, site and ROADMAP: on Windows an Xbox game of Visual C++ 7.1 needs your XDK

Review of #184: the pack's 7.1 doesn't start on Windows, so there the XDK isn't optional for those games.

* A byte table indexes a jump only through the byte it loads, followed from register to register

Comparing register names wasn't enough. `movzx eax, byte [B]; mov eax, 1; jmp [eax*4+T]` still cut B, though eax no
longer held its byte. `cmp al, byte [B]` counted as a load. And `movzx eax, byte [B]; mov ecx, eax; jmp [ecx*4+T]`
no longer cut B, swallowing the function after it. Now only mov/movzx/movsx load a byte, a plain register `mov`
moves it on, and any other write to the register ends it. Each of the three is a test.

* A byte table ends at the case count of the jump table it indexes, not of every table in the function

A function with a 3-case table and a 2-case one: the byte table indexing the second was cut at the first byte of 5 or
more, so the next function, starting with a byte below 5, lost its first byte to it. Each byte table now remembers
the jump it indexes, and is cut at that table's own entry count. The two-table test has the case.

* A byte table that indexes several jump tables ends at the largest case count

Review of #184: each byte table remembered one jump table, the last that indexed it, so one table `B = [0..4]` used
by a 5-case and then a 3-case switch was cut after its third byte, and its last two bytes and the next function made
a false function. Every jump table a byte table indexes is kept, and the cut is at the largest of their counts.
Tested in test_two_jump_tables_and_a_byte_table_relocate_each_entry_once.

---------

Co-authored-by: Nick Silvestro <nick@silvestron.com>
…s on the best attempt (#254)

A DS game's function view had no switch between the latest and the best attempt: function.js hid it for every
project-mode game, and the fork engine could only diff what's in the source now. The fork engine now diffs a
function's best attempt (placed in its file like a try, built, diffed, then put back, cached), the switch shows
wherever a best attempt differs from what's current, a function opens on its best attempt, and the user's own
compile switches to the latest.

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Helpers are only offered the tools their console can do

Agents on GameCube/Wii and DS were handed join_functions, report_boundary, get_class and guess_struct, which raise there; a GameCube join even recorded the agents' votes and saved the refusal for good (#232, F10, F3, F4, F7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Count ROM engine joins in the join_functions gate (#192)

Project-mode joins stay Console.join_functions, but ROM joins are the engine's: once #192 adds RomNetwork.join_functions (or sets the new joins_functions fact), ROM consoles get the tool without another gate change. The refusal and the ROM prompt follow the same capability, while FORK_ONLY still keeps the tool off ROM projects until then.

---------

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
After Remove, the part stays greyed in the compiler list with a Revert button that puts back the same range, compiler and flags through the normal add path (its checks apply). /api/compiler now says which matched functions a removal reopened, so Revert's message can say they stay open for agents (from a Discord request).

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…nstead of running through every function (#255)

A ds-decomp project keeps no assembly for m2c to read, yet autopilot_prepare returned every open function and committed the M2C macros; the run then ended 'done' with no attempt (#232, F1).

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…f memory or for hours (#245)

* Big GBA cartridges import: luvdis's second round no longer runs out of memory or for hours (#187, #188)

A 16-32 MiB cartridge is mostly graphics and sound, and data that looked like a return and a prologue gave
thousands of round-2 starts (16,398 on a 16 MiB test ROM), each emulated by luvdis; its `add sp` emulation doubled
its stack list per instruction until MemoryError. Round-2 starts must now lie where the first round's code is or
points (a pointer in data needs a real prologue), luvdis's stack grows only to the new depth (capped at 16 KiB), and
later rounds run in capped batches whose time limit follows the first pass. A failed batch keeps what was found
before it, with a sentence instead of "please report it".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* GBA: keep leaf callbacks in tables known code loads

The big-ROM filter followed only odd literal-pool words as code pointers, so the even address of a callback table wasn't followed and a distant leaf callback without a prologue was dropped. Follow tables loaded by known code for at most 64 entries, treating their odd ROM words as pointed-to, and stop at the first non-pointer so data after a table stays data. Adds the reviewer's repro as a regression test (#245).

---------

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…compilers (#257)

Where a program names none of the compilers that built it (DS, GameCube/Wii), the survey only rebuilt each file with the compiler it already had, so it could never suggest another; the overview also said mips: True for every fork (#232, F6).

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… really do, and every gap has an item (#258)

An audit of the older consoles against the code (#232) found ✓ cells that don't hold, — cells with no plan, and a few understatements.

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* An incrementally linked program's thunk table is no function: a leading run of at least two jmp thunks is skipped, on x86 and x64

* The thunk table's end comes from the bytes alone: Ghidra's rows in it, the entry point's and unmarked thunks', are dropped

---------

Co-authored-by: risner <8061434+risner@users.noreply.github.com>
* Add initial PS4 ELF projects with a pinned public compiler

Register PS4 through the console interface, import loader segments and explicit function bodies, and generate strict objdiff projects. Use the public PS4 clang target instead of machine-local compiler patches; keep imported-global bindings explicit per project.

Include a shareable synthetic demo, relocation and integration tests, and documented beta limitations. No game data or unrelated helper/model changes are included.

* Follow upstream branch policy for the PS4 contribution

Give the replacement PR its own head so checks from the legacy codex branch do not remain attached to the same commit.

* Run PS4 judge regressions in Ubuntu CI

---------

Co-authored-by: n-delic <nahe.delic84@gmail.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: review <review@example.invalid>
…e old WSL one (#264)

1.0.2's installer put %LOCALAPPDATA%\decompdecomp\bin\decomp.cmd on PATH, a wrapper around wsl.exe and the old WSL app. The native installer never replaced it, so PowerShell and cmd.exe kept running the old command line (#262). On startup the native app now rewrites that wrapper, recognised by its wsl.exe call, or one it wrote itself, to run this copy with every argument passed through (%*) and its paths quoted. A command the user wrote is left alone, and a fresh install creates none.

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…266)

The README had grown to 376 lines and still led with 1.0.3's news. It now says what decompdecomp is, how to install it on each system (every command kept, checked against the site and install.sh), how to start, which consoles it supports (PS4 from #119 included), and points to the guide, ROADMAP and CONTRIBUTING for the rest, in ASD-STE100 style: short sentences, one step per sentence, one word for one thing.

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e app (#265)

* A project whose folder was deleted says so and can be removed from the app

A project folder deleted on disk left a project the app couldn't open or remove, and re-importing the game returned the dead project (#250). A missing folder is now found again if it moved within the workspace; otherwise the project list, the overview and opening it say the folder is missing, autosave and the final flush don't write it back into existence, and a confirmed Remove project removes only its database records. Re-importing the game afterwards works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A missing folder's message is checked as the app shows it

The test compared the message with the raw project path, but the app shows paths with the home folder as ~ (on Windows, where pytest's temporary folder sits under the user's home, that made it fail). Assert the shown path instead.

---------

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Verify ROM helpers against the callers overlay

* Keep ROM mapping in compiler-range judge rows

* test: add overlay-rodata repro for #261

A function\x27s own .rodata (its switch jump table) must be read from
its own overlay via rom_offset, not from whichever overlay the ROM
lists first at the shared vram. Repro contributed by n-delic in the
PR review: fails on main with the issue error, passes with this
branch\x27s reader fix; the strictness case still fails on a mutated
table.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

---------

Co-authored-by: miko-mission <346051853+miko-mission@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…hod one (#232) (#276)

The brief rewrote a function the class recovery knows as a method into a
`Class::method` draft whatever the compiler. compile_source tries C++ only for
toolchains marked cplusplus, and no N64 or PS1 pack is, so on those consoles
the draft could never compile, while ROADMAP.md said the feature worked there.

_draft_shown now asks the function's own compiler (compiler_for, so compiler
ranges count; a copy of the user's own runs as the pack it copies) and keeps
the C draft when it doesn't build C++. ROADMAP's row says "—" for N64 and PS1,
with an item for packing a C++-capable build.

Co-authored-by: review <review@example.invalid>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Starring a function ("Do this first" / the "First" filter) marks it for
agents to claim before the usual smallest-first order. This worked only
on ROM projects. claim_row's priority lookup was guarded by
`not self.fork_slug(project)`, and the dashboard hid the star button and
the star column whenever the project kind was "fork". So on a fork
project a user could set priority on the backend but had no way to do it
from the UI, and even an API-set star was ignored when work was handed
out.

The priority lookup is engine-agnostic -- it resolves a named open
function and checks claims -- so drop the fork guard in claim_row. In
function.js, show the per-function "Do this first" button for forks
(still only when the function is open) and let canStar() return true for
forks, so the "First" filter, the star column and the per-row toggle
appear. (The guard covered every fork project, so this also turns the
star on for GameCube/Wii/DS and public-decomp forks, not only PC.)

Adds a regression test: on a fork project a starred large function is
claimed before the smaller ones, which fails with the old guard. The GUI
half gets a test too (tests/gui_function.js): the star button shows on an
open fork function and is hidden once it is matched.


Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

Co-authored-by: miko-mission <346051853+miko-mission@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…ed as progress (#287)

* A release refused without a compile ends in one line, and isn’t counted as progress.

* Review fixes: exempt functions release after two refusals; tool descriptions say a no-compile release is not taken

---------

Co-authored-by: risner <8061434+risner@users.noreply.github.com>
… no longer grow with every game (#279)

* Hundreds of projects stay fast: the autosave, the project list and the autopilots no longer grow with every game

Every second the autosave read every file of every ROM project (300 ms a pass with 200 small games, far
more with real ones), and every 5 s the sidebar counted every function of every game and redrew the
whole list. Now:

- The autosave reads every file only of projects in use (open, judged, or changed in the last two
  minutes); the others get the cheap check (database changes, folder dates) and the deep one in turns,
  50 ms of it per pass. A sidebar look at a project doesn't count as use.
- Each project's totals are counted again only when its functions change (tally_changes, kept by
  triggers); toolchains.get makes one entry instead of all 66.
- /api/projects?since=<sig> answers "the same" when nothing changed; the sidebar redraws nothing then,
  finds colours in a map instead of n² look-ups, and gets a filter box past 12 projects. The home page
  adds its cards at once.
- Progress no longer keeps every file's text of every project synced (never read again), and a project
  unused for 10 minutes lets go of its baseline (the database has it).
- At most two autopilots compile at once across projects; the rest wait, "queued", in the GUI too.
- Console work at start goes most recently used first, with a pause between projects.
- SQLite refreshes its planner statistics on opening and hourly.

tests/bench_many_projects.py measures it: 200 projects x 500 functions, autosave pass 300 -> 58 ms,
project list 160 -> 47 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* The home page's cards go in with one append, not a document fragment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A toolchain look-up goes through registry() when something stands in for it

The faster single-entry look-up skipped registry(), which the install tests replace with their own
toolchains, so they saw 'unknown toolchain'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* One project's failed folder check no longer ends the autosave for the session

A failure in project_missing, now called before the per-project try, escaped run_once and killed the
autosave thread. The check counts as present when it fails, and the loop logs a failed pass and goes on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* The 64-bit sweep stops where the loaded code ends (VirtualSize), not at the file's padding

Co-authored-by: abilliontokens <39147239+abilliontokens@users.noreply.github.com>

* The test checks that a section without VirtualSize is swept to its size in the file (review of #277)

---------

Co-authored-by: risner <8061434+risner@users.noreply.github.com>
Co-authored-by: abilliontokens <39147239+abilliontokens@users.noreply.github.com>
…e end of the disc image (#274)

A PS1 disc image had a data track and an audio track. Its cue sheet
gives the audio track a pregap of 150 sectors that is not in the .bin
file. The file system of the disc has a file entry for the audio track.
Thus this file entry ended 150 sectors after the end of the disc image.
The import of this game never completed, and it showed no progress
text.

_Disc.read reads a disc image with sectors that are not 2048 bytes
(raw sectors of 2352 or 2448 bytes) one sector at a time, until it has
the full length of the file. After the end of the disc image, each
sector is empty, thus the loop never ended.

The read now stops at the end of the disc image and gives the bytes
that the disc image has. A disc image with 2048-byte sectors already
did this.

The PS1, the PS2 and the PSP read discs with this reader. On a test
disc image of this type, the first step of the import (read_game) did
not end for the PS1 and the PS2. For the PSP, it did not end when the
file was a module. Now it ends for all three.
* Build and release a portable Windows ZIP

* Start portable smoke server with upstream CLI arguments

* ci: build Windows portable ZIP only during releases

* Keep build-path wrappers and the portable README out of Windows downloads; test the ZIP on PRs again

uv's console-script wrappers in packages/bin and each dist-info's direct_url.json name the build machine's paths,
so they are broken once the ZIP is extracted (or the MSI installed) elsewhere; the app starts through
decomp-launch.pyw and only needs ninja.exe from that folder. The portable README told setup users to extract a
ZIP, because the MSI is harvested from the same folder: it is removed once the ZIP is made. The path-filtered
Windows portable workflow comes back so the ZIP is built and smoke tested before a release, not only on tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Add bounded deep permutation for a selected function

* Give deep permutation a dedicated results workspace

* Verify deep-search baselines and avoid repeated candidate compiles

* fix: keep deep search running after publishing improvements

* Keep bounded deep search claims and share worker capacity

* Deep permuter: fork turns judge again, its own worker identity, a cap below the workers

Search._renew now says True/False as Permuter._permute expects (returning None ended every
project-mode turn right after trial_run, untried), and a renewal that fails before a compile
ends the search with SearchLimit instead of recording for a function someone else holds.

The search runs as "deep-permuter", not "permuter": sharing the automatic permuter's identity
made its claim between turns look like the search's own (ending it as "No further variants
available") and let the search renew or drop that claim. Any live claim between turns is now
waited out. The new name joins MACHINE_AGENTS (and the GUI's APP_WORKERS), so its claims never
count as giving up; the queries that listed those names by a fixed number of placeholders now
follow the tuple.

The app-wide cap is max(1, min(2, WORKERS - 1)), leaving a shared worker for the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Limit native compiler and project build process trees

* Use Windows job objects for build descendants

* Fallback when macOS denies process-group termination

* Stop ninja child process groups on build timeout

* Stop what a build or compile leaves behind on every system, and keep a finished build's result

#228's review: on Windows a project build whose step had exited left its child running (no Job Object, and
taskkill /T finds nothing under a process that's gone), so project builds now run in a Job Object too. A build
whose step succeeded while a child held its output was waited on for the rest of its time limit and then failed as
out of time; it now waits OUTPUT_SECONDS as main did, stops the leftovers and keeps the step's exit code. A stopped
compile waited for ever on a child that left its session holding the output; it now drains for a bounded time and
closes the pipes. Sessions are read with getsid, since macOS's ps prints 0 for every session, and the memory
watchdog runs on macOS only, where a project build's limit is now for its whole tree as its systemd scope is on
Linux. The tests wait for processes rather than fixed times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* The compile test whose child is in its own group fails when cleanup waits the child out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Expose project-scoped manual MCP connections in Agents and models

* Bring AI agent settings view improvements upstream

* Allow agent tools before helper state is initialized

* Fix helper settings persistence and MCP revocation

* Keep MCP create disabled when projects cannot load

* Complete manual MCP project cleanup and GUI coverage

* fix: retain revoked MCP identities and tolerate invalid prompts

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: n-delic <nahe.delic84@gmail.com>
* fix(split): reset the head stale best and retire a pure-padding head

split_function (_cut) reset the head seed/best_score but left best_source, so a
trimmed head kept the pre-split function C as its "best" — misleading whoever
claimed it next. And a head trimmed down to pure 0x00 padding (all nops) stayed
open, so agents kept claiming a lone nop. Now _cut also clears best_source and,
when the trimmed head is all-nop padding, marks it asm (done) so it leaves the
open pool. Observed on a PS2 game: splitting a jump-table dispatch off its three
leading alignment nops left the head as a 1-nop open sliver carrying the
dispatch C and a nonzero score.

Tests: split resets the head best_source/best_score; a pure-padding head
becomes asm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* fix(split): explain a retired padding head and point the reply at the tail

When split_function trims a head down to pure 0x00 padding it retires that
head ('asm'), but the reply still said "Continue with <head>" and the GUI
showed the head as "hand-written assembly" -- set_aside's generic fallback,
because the head carried no reason. Record an "alignment padding (all nops)"
reason on the retired head so its page explains itself, and word the split
reply to send the user to the tail instead of the dead head. _cut now returns
whether it retired the head so split_function can branch the reply.

The zero-byte check only recognises MIPS padding (nop = 0x00000000); x86
(0xCC/0x90) and ARM/PPC nops aren't caught, so those padding heads stay open
(harmless). Noted in the code and added as a ROADMAP item (ask the processor
for its filler).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* fix(split): retire a pure-padding tail too, and point the reply right

The review noted _cut only retired a padding head; a tail trimmed down to pure
alignment padding stayed open and the split reply pointed the user at it. _cut
now retires a pure-padding tail the same way (asm, with the alignment-padding
reason) and returns whether each side was padding, so split_function words the
reply for every case: head gone -> go to the tail, tail gone -> stay on the head,
both gone -> nothing to continue with. Also fixes _cut's docstring, which still
said it returns (head, tail).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* fix(split): release a retired padding head's claim, keep a supplied boundary reason

Two follow-ups from review of #193.

A head trimmed down to pure alignment padding is retired (status 'asm'), but
_cut did not delete its claim, and claim_row renews a held claim before it
checks status. An agent that claimed a function and split its leading NOPs off
then got the dead sliver handed back on the next claim, and asking for another
function said "you already hold <it>". Delete the head's claim when it is
retired, as set_aside_by_you already does.

_cut also unconditionally replaced the tail's asm_code with the generic
"alignment padding (all nops)" whenever the tail was zero fill, overwriting the
reason resolve_boundary passes through tail_meta (e.g. "data, not code"). Only
apply the default when no reason was supplied.

Tests: a claimed function whose padding head is split has no claim after and the
agent can claim a fresh function; a zero-filled tail with a supplied reason keeps
it. Both fail on the prior head.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* feat(padding): retire a split sliver using the processor's own nop (cross-arch, mode-aware)

#193 retires a split head (and now tail) trimmed down to pure alignment padding, but recognised
only MIPS zero padding. Ask the processor instead: a per-arch is_padding predicate (same shape as
asm_reason) -- MIPS all-zero words, x86/x86-64 the nop and int3 forms including the multi-byte nops
(66 90, 0F 1F ...), PowerPC/PPC64 ori r0,r0,0, and ARM/Thumb the ARM nop (mov r0,r0) or the Thumb
nops (mov r8,r8 / the Thumb-2 nop); zero fill is padding in any mode. _cut asks the console for both
the head and the tail.

ARM and Thumb get their own readers rather than one that guesses the mode from the bytes: an ARM
nop's four bytes can read as a Thumb nop followed by a real instruction, so Console.is_padding picks
the reader from the function's mode (target_arch) -- a GBA Thumb function whose bytes merely look like
an ARM nop is not mistaken for padding. The ROADMAP's cross-arch item is resolved and the stale
"arm/thumb have no reader" comments are retired.

Each predicate is unit-tested directly (tests/test_arch_padding.py); the GBA console test covers the
mode-selection regression. ARM/Thumb _cut retirement rides the existing MIPS-oriented split path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* fix(split): zero-fill padding on PS3, delay-slot tail guard, GBA row mode

Address the review on this PR:
- ppc.is_padding accepts a zero-filled gap (0x00000000) as well as the nop
  word, matching the PS3 splitter which treats zero words between functions
  as padding; a PS3 split whose head or tail is a zero gap is now retired
  instead of left open.
- _cut no longer retires a tail whose first word is the head's branch delay
  slot (a new mips.ends_in_delay_branch hook, reached through the console):
  that nop belongs to the head. The pure-padding-tail test now splits past
  the delay slot (+8), and a new test covers the +4 delay-slot case.
- GBA.target_arch reads an old row's mode from its luvdis macro (via
  _stored_mode, as function_from_row already does) instead of defaulting a
  meta-less row to Thumb, so an ARM function's ARM-nop padding is checked
  with the ARM reader; a _cut-predicate unit test is added.

The earlier reason-overwrite point is handled upstream in the stack (#193
now guards it), so no change for it here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* fix(split): make the boundary-reason test real, resolve a GBA row's mode, keep the x86 padding item

- test_split_keeps_a_supplied_boundary_reason_over_padding split at +4 (jr $ra's delay slot), so the delay-slot
  guard left tail_padding false and the reason-keeping branch (editing.py:116-119) never ran -- the test passed
  even with that logic removed. Split at +8 so the tail is pure padding and the branch runs; it now fails if the
  reason-keep clause is removed.
- GBA.target_from_row defaulted a meta-less row to Thumb; use _stored_mode(dict(fn)) like target_arch, so an old
  ARM row's bytes aren't disassembled as Thumb through _target_obj.
- _cut now cuts cross-arch: fix its docstring and the ROADMAP function-end note (both said MIPS only).
- Restore the "Padding by processor" ROADMAP item: ARM/Thumb/PPC padding heads are retired, but x86's reader
  exists without being wired into a split path yet, so the item isn't done.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

* fix(split): test that an old ARM row scores as ARM; x86 nop wording

Adds a target_from_row test: a meta-less ARM row must come back ARM, not
Thumb. target_arch only steers the padding reader, while
target_from_row/target_object drive disassembly and scoring, so without
reading the stored mode an old ARM function is scored (and autopiloted)
as Thumb. The test fails if target_from_row stops reading the mode.

Also the ROADMAP x86 bullet now notes the reader matches the standard
multi-byte nops, not only 0x90/0xCC.

(Rebased onto main to resolve the ROADMAP "Function-end reports" conflict
from #276, keeping main's GameCube/Wii + report_boundary clause and the
cross-arch cut.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U9qvtARCkpbfDTUzBo8mG9

---------

Co-authored-by: miko-mission <346051853+miko-mission@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
RetroGameDeveloper and others added 2 commits November 15, 2026 12:27
n-delic/decompdecomp moved on by 30 commits (1.0.10-alpha.1 and alpha.2): PS4 ELF projects, GBA luvdis memory,
Xbox import fixes, deleted project folders, batched unit builds, process-tree limits, the latest/best switch for
project-mode games, compiler part revert, tools per console, the user as second opinion, padding-aware splits.
Merged, not rebased: the fork's 1,546 commits and every branch built on them stay as they are.

Where upstream ported fork work back (deep permuter, agent settings, Windows portable ZIP), the fork's newer
version stays and upstream's additions are grafted in. Upstream's changes to permuter_gen, csource, mips and
permuter_local went to decomp-repair 0.5.0, which this pins. Fork version, install URLs and data home unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new row joins the rebuilt What-works-where table in its 12-column layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RetroGameDeveloper
RetroGameDeveloper merged commit a1ab4db into main Nov 15, 2026
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.

7 participants