📝 Gremlins run log: block 3.4 WSL check note

This commit is contained in:
2026-10-16 21:58:43 +02:00
parent d6daf7a6c5
commit 1de1029dc6
@@ -650,6 +650,25 @@ Intake 2026-10-16 18:23 +0200, a fresh (successor) Athanor, `claude-opus-5-5[1m]
- Expected broken: nothing known. The full suite was not run (it runs once in 3.8); `CliTests`, `GateTests`, `TickTests`, `UsageTests` and the rest of `LaunchTests` were not run in this block (a grep of the tests' key-set assertions, `assertEqual(set(…), …)`, finds none on `init` output, so the new `warnings` key breaks no exact-shape check; the new job-entry key `rebase_inactive_parent` is not in `LIST_JOB_KEYS` or the result).
- Commits: `62eef3b` (code and tests), then this note's commit.
### Block 3.4 — WSL check
- Model: `claude-opus-5-5[1m]` (the Athanor, own Bash)
- Start / end: Fri Oct 16 21:45:00 WEDT 2026 / 21:56 (`date`; suite 21:46:26–21:53:00)
- Done: digest §6 procedure on helper commit `4d8af02` (after 3.1–3.3), copied to ext4 (`~/gremlins-wsl-check`, removed afterwards). Raw logs in the session scratchpad `…\scratchpad\gremlins-wsl\` (`where-*.json`, `suite.txt`, `matrix-gate.txt`, `zombie_probe.py`). The harness refused a separate `findings.md` there, so the findings are recorded here; block 3.7 cites this note.
- **Inventory**: the distro is registered as `Ubuntu-20.04` but runs **Ubuntu 22.04.5 LTS** (upgraded in place); kernel 6.18.54.1-microsoft-standard-WSL2. uv 0.6.8 was already at `~/.local/bin/uv`, so nothing was installed and no download happened. System `python3` 3.10.12; `uv run` picked a managed CPython 3.13.2. git 2.34.1. `/proc` present; `osrelease` contains `microsoft`; `WSL_DISTRO_NAME=Ubuntu-20.04`.
- **PATH interop**: 73 PATH entries under `/mnt/` (the Windows PATH appended; no `/etc/wsl.conf`). `claude` (no extension) is **not found**; `claude.exe` resolves to `/mnt/c/Users/g4b/.local/bin/claude.exe` (the Windows PATH binary, 2.1.283); `…/AppData/Roaming/npm` is on PATH but holds no `claude` shim. So `shutil.which("claude")` does not pick the Windows exe on this host, and `where` reports "no claude binary". But `--binary /mnt/c/…/claude.exe` is accepted: `claude.exe --version` runs through interop, and with the override `where` reports `ok: true` for a Windows binary under a Linux helper. `CLAUDE_CODE_EXECPATH` does not cross (unset; `WSLENV` empty).
- **`where`**: gate closed → exit 2, `ok: false`, `platform {name: posix, sys_platform: linux, wsl: true, supported: false, detach: setsid, override: false}`, the A7 gate reason, then "no claude binary". With `SPIRE_GREMLIN_UNSUPPORTED_OK=1` and no binary: exit 2 (no binary). With the override and `--binary` the Windows exe: exit 0, the override warning. From the drvfs path: the same answer (`script` is the `/mnt/g/…` path). `supervisor_interpreter` resolves to the uv-managed base interpreter. Cosmetic: the reasons join gives `.;` (the gate reason ends with a period).
- **Unit suite** (override set by `Base.setUp`, C13): `Ran 165 tests in 393.103s`, **FAILED (failures=9, skipped=3)**. Skips as expected (`test_no_visible_window`, `PathTests.test_state_dir_windows_forms`, `SubprocessTests.test_where_via_uv_host_binary`). `PathMatrixTests` and `PathTests` pass on Linux. Failures by cause:
1. **A zombie supervisor counts as alive** (`LaunchTests.test_kill_tree`, `test_refusals`, `test_expire_kills_running_jobs`, `test_lost`, `test_orphan_watchdog`, `test_rebase_counts_toward_cap`). The tests launch in-process, so the test process is the supervisor's parent; a killed supervisor stays a zombie (`Z`), `os.kill(pid, 0)` succeeds on it, so `pid_alive` reads it alive and `kill` reports `ok: false` with the supervisor as the only survivor. Confirmed by `zombie_probe.py` (kill-0 alive, `/proc` state `Z`; dead after reaping). In production the launching CLI exits at once, so the supervisor is reparented and reaped, but `PosixPlatform.pid_alive` should treat state `Z` as dead. POSIX item for the porter; not fixed.
2. **`GateTests.test_closed_gate_on_existing_registry`** fails on any non-Windows host (its "gate open" setup ran without the override). Portable test bug: fixed in 3.4a.
3. **`LaunchTests.test_delta_tokens_counts_only_what_the_base_does_not_know`**: the precondition `trained_at > note mtime` fails when both fall in the same whole second (faster host). Timing assumption that can flake on Windows too: fixed in 3.4a.
4. **`LaunchTests.test_timeout_and_stalled`** expects a tree of ≥ 3 processes; on Linux the stub's `sh` wrapper `exec`s python, one process fewer than Windows' `cmd.exe` layer. Platform-shaped expectation; porter's item.
- `PathMatrixTests GateTests PathTests` alone: 23 tests, 1 failure (cause 2), 1 skip.
- Leftovers: none in WSL (`ps` by args; no `/tmp/gremlins-test-*`). No `wsl --shutdown`/`--terminate`. Trap recorded: `wsl -d X -- bash -lc '…'` expands `$?` in an outer shell (every exit read 0); `wsl -e bash -lc` gives the real codes.
- Deviations: the WSL run found two portable test bugs, fixed by a fresh agent in 3.4a (digest §6 allows a fix for neutral code); the POSIX-only failures are left for the handoff.
- Flagged for review: a Windows `claude.exe` under a Linux helper is accepted with `--binary` (a porter should refuse `/mnt/<d>/…*.exe` under WSL); zombie liveness; the tree-size expectation.
- Commits: none for 3.4 itself (this note is committed with the 3.4/3.4a run-log commit).
### Block 3.4a — Portable test fixes from the WSL check
- Model: `claude-opus-5-5[1m]` (fresh block owner, own tools, no agents dispatched)