Update 2.40
6/9/2026
v2.40.0BETA
Seymour
AI Assembler: a stack corrector (Level 1+2) — warns when an edit empties the stack + says how to fix it
- The owner asked for a "mini-AI corrector" that helps fix assembly errors. The validator already caught invalid opcode / dangling jump / index OOB, but not the #1 hand-edit error: stack imbalance. Now it does. RE-grounded (FFXDataParser): new
FfxLib/Ai/AiStackModel.cs= per-opcode stack effect (fromOPCODE_STACKPOPS) + arity of 269 functions (ScriptFuncLibinput counts; accessor = subject?+index+value?).AiValidatorsimulates the stack depth (reset to 0 at entrypoint/jump-target) and reports underflow. Key honest twist: the parser's arities don't always match the real VM (proven:setSelfFloating 0x7029parser says 2, the corpus pushes 1) — so instead of the absolute count (which would false-positive on valid code), it diffs the ORIGINAL vs EDITED stack: the arity noise exists in both and cancels, leaving only what YOUR edit broke. The message (Level 2) says in plain language where it emptied + how to fix ("put back the PUSH that was an argument; every statement pushes the args THEN calls"). Auto-surfaces in the Validation panel. Gate--ai2: validator clean 346/346 (zero false positives on the corpus) + stack-break caught 1/1 (proves it catches a removed arg-push);--ai3PASS; RT0 byte-identical (analysis only, zero bytes). Editor builds 0 errors. Honest: it detects what the edit introduces; fine arity of some functions = public RE (corpus calibration = future)
v2.39.2
v2.40.1BETA
Seymour
AI Assembler: a "Try to fix" button (Level 3, honest auto-fix)
- Closes the corrector: a 🪄 Try to fix button next to Validate/Save. The honest rule (the owner's own): only apply a fix that has a SINGLE correct answer; suggest the rest, never guess. In the assembler model (which derives
HasOperandfrom the opcode itself), the only unambiguous fix is restoring a row you marked for removal that turns out to be the TARGET of a jump/entrypoint — it MUST stay (re-pointing the branch would change behaviour = a guess). The button re-validates in a loop, un-removes those dangling targets (solving the #1 "I removed something and it broke" case), and for the errors WITHOUT a single answer (invalid opcode, jump-index OOB, the Level-1 stack underflow) it explains in the report what to do but does NOT touch them — "I don't guess your intent". Reports how many it fixed + how many still need your call.MonsterAiEditor_DataModel.Assembler.TryAutoFixAssembler(uses the gate-testedAiValidator; never edits an operand/opcode nor removes anything). Editor builds 0 errors;--ai2/--ai3PASS (RT0 byte-identical — it only flips the VM's removal flags, no byte changes). Honest: an auto-fix that guesses intent = a silent bug, so the button is conservative by design
v2.40.0