fix(tools): every sylpheed.db reader honours $SYLPHEED_DB, and none needs a retired checkout #41

Merged
fabi merged 1 commits from fix/sylpheed-db-contract into main 2026-09-16 18:55:34 +00:00
Owner

Unblocks deleting the retired xenia-rs and sylpheed-reborn checkouts. It also fixes two
scripts that have been silently broken for a while.

The database contract existed but nothing honoured it

SYLPHEED_DB is the documented way to locate sylpheed.db. docker/decoder/sylph-decoder sets
it, and CONTAINER-NOTES.md and decoder-loop.md list it. No reader used it:

reader before after
tools/re-capture/isl_cmdtab.py hardcoded /work/xenia-rs/sylpheed.dbexists nowhere since /work became a clone $SYLPHEED_DB$SYLPH_XEXDB<repo>/sylpheed.db → exit 1
tools/re-capture/name_block_bases.py same dead path same
tools/zq.py $SYLPH_XEXDB — a name I invented in #39 without checking honours $SYLPHEED_DB first; the old name stays as an alias

grab_tutorial.sh was running a known-broken helper

Its helpers were hardcoded into the retired sylpheed-reborn checkout. That copy's
skip_intro.sh still calls the removed vgamepad and exits 0 having pressed nothing, which
is exactly what this repo's copy was rewritten to make loud. The script now resolves its helpers
from its own directory. Nothing exists only in reborn's copy (0 files).

Verified — output byte-identical to the originals

Run against the same database and compared with the original scripts:

resolution path isl_cmdtab name_block_bases
default (repo root) identical identical
$SYLPHEED_DB identical identical
$SYLPH_XEXDB identical identical
path to a missing file exit 1 exit 1

isl_cmdtab's output also matches the body of the committed isl-command-table.txt exactly.

⚠️ Two things this deliberately does not do

  • name-block-bases.txt is not reproducible from this machine's database. 2,609 lines differ,
    starting with strings: 7366 vs 7140. The committed artefact came from the agent box's older
    586 MB database. Two different sylpheed.db files are in circulation. I haven't regenerated
    anything.
  • name_block_bases.py:197 globs /work/sylph_extract/**/*.pak, another dead path, so that
    section of its report is silently empty. It should read $SYLPHEED_DISC. That's a separate bug,
    so it isn't mixed in here.

Agent box, not changed here: sylph-decoder mounts $PROJECT/xenia-rs to find the database.
It keeps working until that machine retires its xenia-rs checkout, and then needs pointing at
the database's new home.

🤖 Generated with Claude Code

Unblocks deleting the retired `xenia-rs` and `sylpheed-reborn` checkouts. It also fixes two scripts that have been silently broken for a while. ## The database contract existed but nothing honoured it `SYLPHEED_DB` is the documented way to locate `sylpheed.db`. `docker/decoder/sylph-decoder` sets it, and `CONTAINER-NOTES.md` and `decoder-loop.md` list it. **No reader used it:** | reader | before | after | |---|---|---| | `tools/re-capture/isl_cmdtab.py` | hardcoded `/work/xenia-rs/sylpheed.db` — **exists nowhere** since `/work` became a clone | `$SYLPHEED_DB` → `$SYLPH_XEXDB` → `<repo>/sylpheed.db` → exit 1 | | `tools/re-capture/name_block_bases.py` | same dead path | same | | `tools/zq.py` | `$SYLPH_XEXDB` — a name I invented in #39 without checking | honours `$SYLPHEED_DB` first; the old name stays as an alias | ## `grab_tutorial.sh` was running a known-broken helper Its helpers were hardcoded into the retired `sylpheed-reborn` checkout. That copy's `skip_intro.sh` still calls the removed `vgamepad` and **exits 0 having pressed nothing**, which is exactly what this repo's copy was rewritten to make loud. The script now resolves its helpers from its own directory. Nothing exists only in reborn's copy (0 files). ## Verified — output byte-identical to the originals Run against the same database and compared with the **original** scripts: | resolution path | `isl_cmdtab` | `name_block_bases` | |---|---|---| | default (repo root) | ✅ identical | ✅ identical | | `$SYLPHEED_DB` | ✅ identical | ✅ identical | | `$SYLPH_XEXDB` | ✅ identical | ✅ identical | | path to a missing file | ✅ exit 1 | ✅ exit 1 | `isl_cmdtab`'s output also matches the body of the committed `isl-command-table.txt` exactly. ## ⚠️ Two things this deliberately does not do - **`name-block-bases.txt` is not reproducible from this machine's database.** 2,609 lines differ, starting with `strings: 7366` vs `7140`. The committed artefact came from the agent box's older 586 MB database. **Two different `sylpheed.db` files are in circulation.** I haven't regenerated anything. - **`name_block_bases.py:197` globs `/work/sylph_extract/**/*.pak`**, another dead path, so that section of its report is silently empty. It should read `$SYLPHEED_DISC`. That's a separate bug, so it isn't mixed in here. **Agent box, not changed here:** `sylph-decoder` mounts `$PROJECT/xenia-rs` to find the database. It keeps working until that machine retires its `xenia-rs` checkout, and then needs pointing at the database's new home. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fabi added 1 commit 2026-09-16 18:07:47 +00:00
fix(tools): every sylpheed.db reader honours $SYLPHEED_DB, and none needs a retired checkout
All checks were successful
CI / Native — linux (pull_request) Successful in 2h5m25s
CI / WASM — Web (pull_request) Successful in 30m24s
CI / Formatting (pull_request) Successful in 1m22s
fd368ec163
`SYLPHEED_DB` is the documented contract for the static-analysis database —
`docker/decoder/sylph-decoder` sets it, and `docs/agents/CONTAINER-NOTES.md` and
`decoder-loop.md` list it — but no reader honoured it:

  isl_cmdtab.py, name_block_bases.py   hardcoded `/work/xenia-rs/sylpheed.db`, a
                                        path that has not existed anywhere since
                                        `/work` became a clone. Both failed on
                                        every machine, before and after the
                                        database moved.
  zq.py                                 used `$SYLPH_XEXDB`, a name invented in
                                        #39 without grepping for the existing one.

All three now resolve `$SYLPHEED_DB`, then `$SYLPH_XEXDB` (kept as an alias so
nothing already written against it breaks), then `<repo root>/sylpheed.db`, and
refuse with exit 1 naming both variables and the build command otherwise.

`grab_tutorial.sh` hardcoded its helpers into the retired `sylpheed-reborn`
checkout. That copy's `skip_intro.sh` still calls the removed `vgamepad` and
exits 0 having pressed nothing — the failure this repository's own copy was
rewritten to make loud. So the script was already running a silently broken
helper; it now resolves its helpers from its own directory. Nothing exists only
in reborn's `tools/re-capture` (checked: 0 reborn-only files).

Verified against the same database, output compared byte for byte with the
ORIGINAL scripts (path-substituted copies, sibling imports resolvable):

  resolution path    isl_cmdtab   name_block_bases
  default (root)     identical    identical
  $SYLPHEED_DB       identical    identical
  $SYLPH_XEXDB       identical    identical
  bad path           exit 1       exit 1          (zq.py: exit 1 too)

and `isl_cmdtab`'s output is byte-identical to the body of the committed
`docs/re/data/isl-command-table.txt`.

⚠️ `name_block_bases`'s output does NOT reproduce the committed
`docs/re/data/name-block-bases.txt` (2,609 lines differ, `strings in the image:
7366` vs `7140`). That is the database, not this change: the artefact was
generated from the agent box's older 586 MB database, and this machine's is the
current generator's. Two databases are in circulation. Not regenerated here.

⚠️ Also not fixed, because it is a different bug: `name_block_bases.py` globs
`/work/sylph_extract/**/*.pak`, another path that exists nowhere now; that part
of its report is silently empty. It should read `$SYLPHEED_DISC`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fabi merged commit 576e98b75e into main 2026-09-16 18:55:34 +00:00
Sign in to join this conversation.