Skip to content

Commit a79dd48

Browse files
committed
chore(release): bump version to 1.0.1
Update CHANGELOG with skill-cache improvements, stats accounting fixes, context savings features, and quality loop changes from this release cycle.
1 parent dee5aa4 commit a79dd48

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ All notable changes to Token-Goat are documented in this file. Format follows Ke
44

55
## [Unreleased]
66

7+
## [1.0.1] - 2026-06-02
8+
9+
Bundles two 50-commit improvement runs: a skill-cache / context-savings accuracy loop (source_sha stale-compact detection, separate compact/body eviction buckets, sidecar schema v2, lazy skill injection, gzip web-cache compression, serve-diff-on-reread, session-hint cooldown) and a general quality loop (type safety, error handling, performance, security, test coverage, code clarity, DRY, docs, observability, imports). Also fixes broken stats accounting for `bash_output_cached`, `skill_cached`, `web_output_cached`, `symbol`, `map`, and `semantic` lookup savings, and adds RuffFilter and MypyFilter bash-compress support.
10+
711
### Bash compression
812

913
- **Nine new filters (22 → 31 total).** `eza` / `exa` / `ls` (directory listings trimmed to header + 25 + 5 entries; `--tree` mode keeps 40 + 10), `tree` (50 + 10 + final summary line), `fd` / `fdfind` (path lists trimmed to 35 + 5), `bat` / `batcat` (strips ANSI chrome and box-drawing borders, caps at 50 lines), `delta` (strips decorative separators, caps at 80), `jq` (caps at 200 preserving closing brackets), `yq` (caps at 150), `fzf` (compact selection output, caps long upstream pipes at 50), `lazygit` (detects TUI mode and returns an actionable note instead of raw control sequences).
1014
- **GhFilter list truncation.** `gh pr list`, `gh run list`, and `gh issue list` tabular output is now capped at 30 rows with a count summary.
1115
- **`_head_tail_compress` helper.** Shared head + tail + marker slicing extracted from 8 filter classes, eliminating repeated boilerplate.
16+
- **RuffFilter and MypyFilter.** New filters compress ruff check and mypy output, stripping redundant context lines and capping verbose diagnostic blocks.
1217

1318
### Reliability
1419

@@ -32,6 +37,33 @@ All notable changes to Token-Goat are documented in this file. Format follows Ke
3237
- **Integration tests for new filters.** Nine integration tests verify each new filter family dispatches correctly through the hook pipeline.
3338
- **Edge case coverage for `_not_indexed_hint`.** Tests cover malformed marker files and missing locks directory.
3439

40+
### Skill cache
41+
42+
- **`source_sha` in compact headers.** Embedded SHA enables stale-compact detection: the pre-read hook emits an advisory when a skill body changes on disk after the compact was cached.
43+
- **Separate eviction buckets.** Compact slices (1 MB cap) and full bodies (5 MB cap) evict independently so a large body cannot push out all compact entries.
44+
- **Sidecar schema v2.** Forward-compatible sidecar metadata with graceful migration for v1 entries.
45+
- **Lazy skill injection.** The compaction manifest emits a `token-goat skill-body --compact` recall pointer instead of the full compact text; reduces manifest token cost for sessions with many loaded skills. Opt-out via `TOKEN_GOAT_LAZY_SKILL_INJECTION=0`.
46+
- **Gzip body compression for skills ≥ 16 KB.** Transparent decompression on read; reduces eviction pressure.
47+
48+
### Context savings
49+
50+
- **Stats accounting fixed.** `bash_output_cached`, `skill_cached`, and `web_output_cached` now record actual `bytes_saved`; previously always 0. `symbol`, `map`, `section`, and `semantic` lookup stats record `estimated_full_size − slice_size` as savings.
51+
- **Serve diff on re-read (opt-in).** `[read_hints] serve_diff_on_reread = true` intercepts re-reads of changed files and returns a unified diff instead of the full content.
52+
- **Gzip compression for web-cache bodies ≥ 16 KB.** Same pattern as skill body compression; reduces disk footprint and eviction churn.
53+
- **Session-hint cooldown.** Each file's session hint is suppressed after first emission within the session; `session_hint_suppressed` stat tracks the bypass rate.
54+
- **Unified token formula.** `max(1, bytes // 3 + 1)` replaces inconsistent `bytes // 4` across all accounting sites.
55+
- **Stats category grouping.** `token-goat stats` groups kinds by Read / Bash / Cache / Hints / Skills / Other.
56+
57+
### Quality
58+
59+
- **Type signatures strengthened.** `Any` parameters replaced with concrete types; `_lookup_in_cache` and `_render_section` made generic with `TypeVar`.
60+
- **Exception chaining.** `raise ... from e` added at key error propagation points; bare `except` clauses replaced.
61+
- **Regex patterns hoisted.** 16 in-function `re.compile()` calls in `bash_compress.py`, `compact.py`, and `bash_cache.py` moved to module/class level (pre-bash and pre-compact hot paths).
62+
- **File permission hardening.** Lock files and session contention marks set to `0o600` (previously `0o644` or implicit umask).
63+
- **DRY helpers.** `path_mtime_key()` added to `cache_common`; `_extract_grep_args()` and `_get_bash_command_from_payload()` extracted in `hooks_read`.
64+
- **Debug log coverage.** Silent decision points in `bash_compress`, `cache_common`, `compact`, and `hooks_cli` now emit DEBUG records.
65+
- **55 new tests** covering coverage gaps, error-handling paths, permission modes, and DRY helper contracts.
66+
3567
## [1.0.0] - 2026-05-29
3668

3769
Bundles the work from the 35-iter `/improve` run (six themed loops, 2026-05-25 → 2026-05-26): compaction hardening, doctor visibility, opt-in observability, four new bash-compress filters, and a stack of reliability fixes. First stable release under Semantic Versioning.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "token-goat"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
description = "Token optimizer for Claude Code, Codex CLI, opencode, and openclaw on Windows, macOS, Linux, and WSL. Image shrink, re-read dedup, and compaction assist run automatically; CLI commands (symbol, read, section, semantic, map) replace full-file reads with surgical slices."
55
readme = "README.md"
66
requires-python = ">=3.11,<3.15"

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)