Skip to content

feat(tool): port zero minify, errhint, lockutil, installtxn, testrunner - #250

Merged
Patel230 merged 1 commit into
mainfrom
feat/zero-adoptions
Aug 24, 2026
Merged

feat(tool): port zero minify, errhint, lockutil, installtxn, testrunner#250
Patel230 merged 1 commit into
mainfrom
feat/zero-adoptions

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Adopts five self-contained, stdlib-only mechanisms from the Zero terminal coding agent (github.com/gitlawb/zero), each verified against hawk, idiomatic, and fully tested.

1. internal/minify — token-cheaper read-only file views. Go minified via the real go/parser AST (guaranteed valid); other languages via a string-aware comment stripper; safe whitespace fallback otherwise. Wired into the Read tool as a minify flag (never changes disk).

2. internal/errhint — classify provider errors (Auth/RateLimit/Connectivity/ModelNotFound/ContextOverflow) into a one-line fixable hint, gated on provider markers so local errors never draw a bogus hint. Careful standalone status-code matching.

3. internal/lockutil — race-correct atomic stale-lock reclaim (rename-aside → liveness probe → live-restore with no-overwrite fallback), POSIX + Windows.

4. internal/installtxn — cross-process staged install/remove with rollback (plugin/skill install paths), POSIX flock + Windows LockFileEx.

5. internal/testrunner — auto-detect test/verify commands (Go/npm/bun/pnpm/yarn/pytest/cargo) and parse runner output into structured counts + failure locations.

All five are boundary-compliant (zero eyrie/client imports; inline/portable, no new external deps beyond golang.org/x/sys already in go.mod). README adopted-capabilities table updated.

Verification

  • ~25 new tests across the five packages + minify-in-Read integration
  • go build ./..., go vet, full ./internal/{minify,errhint,lockutil,installtxn,testrunner,tool} suites green
  • Cross-compile: Windows + darwin builds of the platform-tagged lock/installtxn files OK
  • All pre-push boundary guards + govulncheck + full test suite green

@Patel230
Patel230 merged commit a220569 into main Aug 24, 2026
26 checks passed
@Patel230
Patel230 deleted the feat/zero-adoptions branch August 24, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant