Files
Syphon_Filter_3/tools
Christopher Williams 4824b7af9a phase11: restore tools/sf3_diff (overwritten blind) + cookbook 186
b29963e promoted worker F's staging tools, and in the same commit I copied F's
staging `diff.py` over `tools/sf3_diff` WITHOUT READING IT FIRST -- a direct
violation of AGENTS.md rule 3, 'Never overwrite blind.'

`tools/sf3_diff` was a 364-line Phase 9 tool: two subcommands (diff, resolve), a
PS-X-EXE header parser that reads the text address rather than hardcoding it, a
symbol-registry loader, and a lui/addiu + gp-relative address resolver. It had
17 tests of its own. Replacing it with a 97-line staging script dropped
`make check` from 253 tests to 237 and failed it with exit 2.

Restored from b29963e^ and verified byte-identical to it (cmp exit 0).

  make check           exit 0, 253 tests OK
  extents-verify       regions=611 disagreements=0 result=AGREE
  gate                 rebuilt 1886208 B, differing_bytes=0, result=MATCH
                       sha1 e173426c157384ebf1b6caf8c6fea18a85a14af9

Documentation corrected, because the overwrite also left the record wrong:

* cookbook 185 documented the interface of F's STAGING script
  (`sf3_diff 0xSTART 0xEND <workdir>`), which is NOT the interface of the
  tracked tool and never was. Replaced with the real one, and the reason the
  Phase 9 tool is worth more is now stated: its `notes` column resolves
  lui/addiu pairs against the symbol registry and gp offsets against the gp
  base, so a residual row can name WHICH GLOBAL an address is.
* cookbook 186 records the defect. The question to ask before promoting into
  tools/ is not 'is the new one better?' but 'what does the old one already do
  that the new one does not?'
* ORCHESTRATOR_WORKFLOW.md section 11 gains both as standing prohibitions, with
  the diagnostic: a SHRINKING TEST COUNT means a tool that had tests no longer
  satisfies them, and it fires before the failure itself is explained.
* phase-ends/logs/Phase11.md: 'seven defects' -> nine, recording the free-check
  defect (cookbook 179) and this one.
2026-09-24 13:00:11 -04:00
..