Releases: thiagodmont/greeg
Releases · thiagodmont/greeg
Release list
v0.10.0
0.10.0
JSON that you choose: greeg's own typed records, ripgrep's exact records, or the old ones by name. Every byte of a file reaches the output, and a NUL byte deep in a file now ends its search and says where.
New
--json=greeg: greeg's own JSON Lines format, schema 1, for searches and every verb (JSON.md).- A header record names the schema, the command and the version.
- Every record is
{"type", "data"}, and every footer ends with anoutcome: exit status, totals, whether the answer is complete, and where it came from. - Paths and file content are
{"text"}or{"bytes"}, so no byte is lost. Each file states its encoding and how its offsets are counted. - On tokio, 14 sample queries take 34 % fewer tokens than bare
--json.
--json=rg: ripgrep's JSON records and nothing else, for every match, with ripgrep's offsets, statistics and exit status. It refuses--budget, commands and-U(exit 2).--json=legacy: the records bare--jsonprints today, by name.
Behavior changes
- Bare
--jsonchanges meaning in 0.11. In 0.10 it still prints the legacy records. On a terminal, stderr saysgreeg: --json will mean --json=greeg in 0.11; --json=legacy keeps this output; nothing is printed to a pipe. In 0.11 bare--jsonbecomes--json=greeg, and 0.12 removes--json=legacy. Scripts should name a dialect now. - The agent skill (
greeg hook claude|codex) tells agents to use--json=greeg. An installed skill updates the next time the hook command runs. - A NUL byte past a file's first 64 KiB ends its search at the start of the NUL's line, as ripgrep stops at it. Matches before it are kept, and none after it is reported.
- With
--budget 0, ripgrep'sWARNING: stopped searching binary file after match …line follows the file's lines. - The JSON formats give the NUL's offset as
binary_offset. - The footer counts such files:
skipped 1 binary, 2 binary tails. - A NUL in the first 64 KiB still skips the file as binary.
- With
- Path order (
--budget 0,--sort path) is ripgrep's: by name within each directory, soa/xcomes beforea-b/x.
Correctness
- File content that is not UTF-8 reaches every output intact instead of turning into U+FFFD. JSON writes it as
{"bytes"}(base64), as ripgrep does, and--budget 0writes the raw bytes. - Unlimited output (
--budget 0, stdin) keeps every occurrence on a line, where it kept at most 8. - A matched line holding a NUL past the first 64 KiB no longer drops the file's earlier matches.
- In legacy JSON, a context line after a UTF-8 BOM no longer carries the BOM's bytes.
Upgrading
- The index format is unchanged (12), but each version keeps its own index directory. The first query in each repository starts one background rebuild into
v12-<key>/, and queries scan meanwhile. 0.9's directory is removed once nothing has verified it for 14 days, or at once withgreeg purge --yes. - Name a JSON dialect in scripts and integrations:
--json=greegfor new code,--json=rgfor tools written forrg --json,--json=legacyto keep today's records until 0.12.
0.9.0
0.9.0 was not published as a release of its own; its changes ship in 0.10.0.
An index that stays right as files come and go, keeps to its own directory, and can be switched off or removed:
- two greeg versions no longer fight over one index;
- the import graph follows added and deleted files;
- greeg never searches or indexes its own data;
- builds extract the same symbols however busy the machine is.
New
--no-persist(orGREEG_NO_PERSIST=1): greeg writes nothing to disk. It builds, refreshes and stamps no index, and keeps no sessions or statistics. Queries answer from the index as it is on disk, or from a scan. Commands whose job is to write, such asgreeg indexorhook claude, exit 2 instead.greeg purgelists every index, session and statistic greeg keeps, with sizes;greeg purge --yesremoves them.- It removes only what greeg wrote, each entry under its own lock.
- An index in use is kept and reported.
- With
--index-dirorGREEG_INDEX_DIRit covers that directory instead of the cache.
Correctness
- When files are added or deleted, the imports of unchanged Python, Rust, JavaScript and TypeScript files are resolved again. So
map,impact'simported_byand ranks match a clean build. That covers a new target, a new file that shadows an old one, and a deleted target with a fallback. Kotlin files are still not resolved again, andmapreports how many were added or removed. - A symbol parse is bounded by counted parser work instead of a 200 ms clock. Two builds of one tree now extract the same symbols and edges however loaded the machine is. Before, a loaded build could fall back to regexes on large files such as TypeScript's
checker.ts, and lose their symbols. - greeg's own directories inside the searched tree are left out of every walk: an
--index-dirthere, or the cache when the tree is the home directory. An index no longer indexes its own files, treats its writes as changes, or answers with them. - An index is marked verified as of when its build or check read the tree, not when it was published. A query in the 100 ms after publication no longer trusts an index that missed changes made while the build ran.
- Piped input is searched like a file: UTF-16 is transcoded and a UTF-8 BOM skipped, so
^foomatches the first line.
Behavior changes
- Each build keeps its index in its own directory,
v12-<key>/, keyed by version, built-in queries and parse budget. Two versions used in turn on one repository each rebuild once and then keep their own index. Before, each rebuilt the other's on every switch. greeg indexrefuses an index directory that is the tree itself (exit 2); searches then answer from a scan.- The default cache and repository directories are tightened to 0700 when greeg writes to them, including ones an older release left 0755.
Upgrading
- The index format changes (12). The first query in each repository starts one background rebuild into
v12-<key>/, and queries scan meanwhile. - Other versions' indexes, including 0.8's
v11/and 0.7's top-level files, are removed once nothing has verified them for 14 days.greeg purge --yesremoves them at once. Until then, downgrading to 0.8.0 reuses itsv11/. - Disk holds one index per version in use.
What's Changed
- Tighten legacy cache directories and remove other layouts' indexes once unverified by @thiagodmont in #42
- Add --no-persist: answer from what is on disk and write nothing by @thiagodmont in #43
- Add greeg purge: list what greeg keeps, and remove it with --yes by @thiagodmont in #44
- Keep each build's index in its own directory, and test the last release against this build in CI by @thiagodmont in #45
- Check the last release out into a directory the cache may have created by @thiagodmont in #47
- Resolve the imports of unchanged files again when a delta adds or deletes files by @thiagodmont in #46
- Leave greeg's own directories out of every walk by @thiagodmont in #48
- Bound extraction parses by counted parser work, not wall-clock time by @thiagodmont in #49
- Transcode UTF-16 and skip UTF-8 BOM in stdin scan by @thiagodmont in #50
- Stamp an index verified when its tree was read, not when it was published by @thiagodmont in #51
- release: 0.9.0 by @thiagodmont in #52
- Keep file content that is not UTF-8 in JSON and --budget 0 output by @thiagodmont in #53
- Add --json=rg, ripgrep's JSON records and semantics only by @thiagodmont in #54
- Add --json=greeg, greeg's own JSON records (schema 1) by @thiagodmont in #55
- Announce bare --json's change on a terminal and name the dialect in-repo by @thiagodmont in #56
- End a file's search at a NUL past its first 64 KiB and say where it stopped by @thiagodmont in #57
- Check the absent binary_tails on the output the test already has by @thiagodmont in #58
- release: 0.10.0 by @thiagodmont in #59
Full Changelog: v0.8.0...v0.10.0
v0.8.0
What's Changed
- Record ancestor-swap and rebuild-time gaps; measure index costs by @thiagodmont in #30
- Keep each index layout in its own directory and tie an index to its root by @thiagodmont in #31
- Compare whole file stamps and take them from the file as it is read by @thiagodmont in #32
- Keep paths as their bytes from the walk to the output by @thiagodmont in #33
- Open whole index snapshots by @thiagodmont in #34
- Rebuild when resolver inputs or the derivation change; graph verbs wait for a short rebuild (format 10) by @thiagodmont in #35
- Verify every index component against per-block digests (format 11, F13) by @thiagodmont in #36
- Close the index before output and recover from a fault at most once by @thiagodmont in #37
- Read files below the root without following a symlink in any directory (F04) by @thiagodmont in #38
- Stat by name on Linux and check the directories in the freshness pass by @thiagodmont in #39
- Make the racy capture test independent of runner speed by @thiagodmont in #41
- release: 0.8.0 by @thiagodmont in #40
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
- docs: rewrite the README for people arriving from outside by @thiagodmont in #11
- fix(search): make machine output exact by default by @thiagodmont in #13
- fix(hooks): decline unsupported command rewrites by @thiagodmont in #14
- chore(bench): use descriptive benchmark artifact names by @thiagodmont in #15
- fix(bench): protect source corpora during edit and soak runs by @thiagodmont in #16
- fix(hooks): preserve unrelated handlers in shared configuration by @thiagodmont in #17
- fix(hooks): publish configuration updates atomically by @thiagodmont in #18
- feat(bench): catalog and validate paired reports by @thiagodmont in #19
- feat(hooks): preserve user-edited generated skills by @thiagodmont in #20
- Protect and bound session memory by @thiagodmont in #21
- Track known gaps, harden CI and explain hook declines by @thiagodmont in #22
- chore(deps): bump the actions group with 7 updates by @dependabot[bot] in #23
- Fix JSON exit status, --index-dir, generated scans, ignore inputs and non-regular files by @thiagodmont in #24
- Private stats storage, trusted replay and private index files by @thiagodmont in #25
- Selection, index coverage, occurrence classification and complete symbol sets by @thiagodmont in #26
- Fix SIGBUS re-run argument order and scan-mode nested definitions by @thiagodmont in #27
- One typed outcome decides every search answer's exit status by @thiagodmont in #28
- release: 0.7.0 by @thiagodmont in #29
New Contributors
- @dependabot[bot] made their first contribution in #23
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
- index: bound phase-1 build memory, add a CLI test suite, reject flags we cannot honour by @thiagodmont in #10
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- ci: drop the macOS legs from the test and e2e matrices by @thiagodmont in #8
- hook: add Codex support (greeg hook codex) by @thiagodmont in #9
Full Changelog: v0.4.0...v0.5.0
v0.3.0
What's Changed
- release: publish the Homebrew formula to the tap automatically by @thiagodmont in #2
- greeg stats: opt-in latency/token stats and rg replay for the Claude hook by @thiagodmont in #3
- release 0.3.0 by @thiagodmont in #4
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
- v0.2: review fixes — parity, index safety, ranking, output contract v2, honest benchmarks by @thiagodmont in #1
New Contributors
- @thiagodmont made their first contribution in #1
Full Changelog: https://github.com/thiagodmont/greeg/commits/v0.2.0