Skip to content

Commit 69fb668

Browse files
committed
docs(changelog): summarize internal DRY pass and note winreg handle-leak fix
CHANGELOG [Unreleased] gains a Changed entry recording the DRY consolidations across install routing-table, languages/common config-file helpers, bridges post-hook + plugin-file helpers, _HKCU_RUN_PATH constant, Typer _OPT_JSON / _OPT_CONTEXT_LINES module-level options, and the tests/conftest patched_home fixture. No user-visible behavior change. Fixed entry covers the latent winreg handle leak that the install OpenKey -> with-statement migration closed.
1 parent cb78a4b commit 69fb668

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ All notable changes to Token-Goat are documented in this file. Format follows Ke
2929
- **Codex Bash matcher in `~/.codex/config.toml`** now points at the new `post-bash` hook instead of `post-read`; under Codex, `post-read` previously did nothing for `Bash` calls (no branch in the handler), so this is a strict gain.
3030
- **`bash_cache.evict_old_entries`** removes body + sidecar pairs together, and runs a second pass to sweep any orphan sidecars left over from out-of-band deletion. Previously, manual `rm` of a body file or a write race could leave a `.json` sidecar with no matching body that lived forever.
3131
- **README "Updating" subsection.** New `### Updating` block under `## Install` consolidates the three update paths (weekly auto-update via scheduled task/crontab, on-demand `uv tool upgrade`, force-reinstall via `uv tool install --reinstall --force`) plus how to disable the auto-update entry. The miss-suggestions feature row and the prose footnote previously implied "Did you mean?" was the only miss-handling path; both now name the `symbol` auto-redirect (with `--strict` opt-out) alongside the "Did you mean?" fallback on `read` / `section`.
32+
- **Internal DRY pass across the install, languages, bridges, hooks, and CLI surfaces.** Routing-table rows (Claude / Codex / skill) now compose from one `_ROUTING_ROWS` list with per-harness "Not this" columns. The config-file language adapters (TOML, INI, YAML, Dockerfile) share `decode_source_text`, `bom_strip_first_line`, and `assign_flat_end_lines` helpers in `languages/common`. The openclaw and opencode TS bridges now both route post-tool events through the same `POST_HOOK` table shape, and the four `install_/uninstall_*` plugin functions delegate filesystem work to `_write_plugin_file` / `_remove_plugin_file`. The Windows registry path lives in one `_HKCU_RUN_PATH` constant and the open/close pairs are now context-managed. Typer's `--json` and `--context` options collapse to two module-level `_OPT_JSON` / `_OPT_CONTEXT_LINES` constants reused across 19 commands. `tests/conftest.py` now exports a single `patched_home` fixture replacing the per-file `_fake_home` / `_patch_home` boilerplate. No user-visible behavior changes; the rendered AGENTS.md / CLAUDE.md content is byte-identical to the previous output.
3233

3334
### Fixed
3435

3536
- **`paths.open_log_file` returned a `StreamHandler` instead of a `FileHandler` on POSIX.** The type hint and docstring claimed `FileHandler`, but the implementation wrapped `os.fdopen()` in a bare `StreamHandler` to apply 0o600 permissions, breaking `isinstance(handler, FileHandler)` checks (such as the `test_setup_logging_skips_console_handler_when_not_tty` worker test). Replaced with a private `FileHandler` subclass that overrides `_open` to apply the tighter mode at open time, preserving the type identity callers depend on.
3637
- **`test_canonicalize_drive_case_collapsed` and `test_canonicalize_cross_shell_paths_produce_same_hash` failed on POSIX.** Both assert Windows-shell drive-letter normalisation invariants that only fire when `Path.resolve()` returns an absolute Windows path; on POSIX `Path("C:/Projects/foo").resolve()` becomes `cwd + "/C:/Projects/foo"` and the assertions test against synthesised POSIX paths. Now skipped on non-Windows with an explanatory message.
38+
- **Latent winreg handle leak in `install_worker_task` and `uninstall_tasks`.** The manual `OpenKey` / `CloseKey` pairs left the registry key open if `SetValueEx` or `DeleteValue` raised before the `CloseKey` line. Switched to `with`-statement context managers so the handle releases on the unhappy path too.
3739

3840
## [0.5.2] - 2026-05-17
3941

0 commit comments

Comments
 (0)