Skip to content

feat(verify): adopt grok-cli incremental compaction and app-verify workflow - #232

Merged
Patel230 merged 1 commit into
mainfrom
feat/grok-adoptions
Aug 22, 2026
Merged

feat(verify): adopt grok-cli incremental compaction and app-verify workflow#232
Patel230 merged 1 commit into
mainfrom
feat/grok-adoptions

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Adopts the two implementable capabilities from a deep-dive of superagent-ai/grok-cli, restricted to features verified as genuinely missing from hawk/eyrie.

Changes

1. Incremental compaction (internal/engine/compact/)

  • BuildIncrementalCompactPrompt(priorSummary) — merges NEW messages into a persisted prior summary instead of re-summarizing the whole transcript.
  • ExtractPriorSummary / PriorSummaryPrefix — locate the prior [Conversation summary] block.
  • generateSummary now detects a prior summary and feeds only post-summary messages through the update prompt, preserving already-captured context and saving tokens.
  • Split-turn handling already existed in hawk; only the incremental path was missing.

2. App verification workflow (internal/appverify/ + AppVerify tool)

  • Recipe detection (recipe.go): deterministic go/node/python/rust detection covering what ProjectVerify does not — start command, port, and smoke kind (http/cli/none), with strict Normalize for untrusted recipe JSON.
  • Manifest contract (manifest.go): persisted at .hawk/verify/environment.json; LoadOrDetect makes repeat runs reproducible; corrupt manifests error rather than silently shadowing detection.
  • Phased QA prompt (prompt.go): Setup → Build/Test → Boot → Evidence → Teardown, encoding the discipline that a green build is not proof — the app must boot, and evidence artifacts are mandatory even on failure.
  • AppVerify tool (detect | manifest | smoke): bounded HTTP readiness polling, fixed-argv execution (no shell), guaranteed teardown; registered in cmd/chat_tools.go with safety capabilities + permission aliases.

Out of scope (need external provider/backend support)

Media generation, provider Batch API, X search, and Telegram voice STT require provider endpoints not present in eyrie; desktop computer-use requires a native macOS accessibility backend.

Testing

  • New: internal/appverify (11 tests), compact incremental (5 tests), AppVerify tool (4 tests)
  • Full pre-push hooks green: boundary guards, external-drift, govulncheck, entire go test suite (incl. engine, tool, safety, cmd, testaudit), go vet
  • golangci-lint 0 issues, gofmt clean

…rkflow

Two adoptions from a deep-dive of superagent-ai/grok-cli, restricted to the
capabilities verified as genuinely missing from hawk/eyrie:

Incremental compaction (internal/engine/compact):
- New BuildIncrementalCompactPrompt merges NEW messages into a persisted
  prior summary instead of re-summarizing the whole transcript;
  ExtractPriorSummary/PriorSummaryPrefix locate the prior
  [Conversation summary] block.
- generateSummary now detects a prior summary and feeds only post-summary
  messages through the update prompt. Split-turn handling already existed;
  only the incremental path was missing.

App verification workflow (internal/appverify + AppVerify tool):
- Deterministic recipe detection (go/node/python/rust) covering the part
  ProjectVerify does not: start command, port, and smoke kind (http/cli/none),
  plus strict Normalize for untrusted recipe JSON.
- Manifest contract at .hawk/verify/environment.json: LoadOrDetect persists
  detection so repeat runs are reproducible; corrupt manifests error instead
  of silently shadowing detection.
- Phased QA prompt (Setup -> Build/Test -> Boot -> Evidence -> Teardown)
  encoding the discipline that build success is not proof: the app must
  boot and evidence artifacts are mandatory even on failure.
- AppVerify tool (detect | manifest | smoke) with bounded readiness polling,
  fixed argv execution (no shell), guaranteed teardown, registered in
  cmd/chat_tools.go with safety capabilities and permission aliases.

Remaining grok-cli candidates were assessed out of scope for now: media
generation and provider Batch API need provider-side endpoints; X search and
Telegram voice STT need provider support; desktop computer-use needs a native
accessibility backend.

Verification: go build ./... clean; new tests green (appverify 11, compact
incremental 5, AppVerify tool 4); engine, compact, tool, safety, cmd and
testaudit suites pass; golangci-lint 0 issues; gofmt clean.
@Patel230
Patel230 merged commit c258b57 into main Aug 22, 2026
26 checks passed
@Patel230
Patel230 deleted the feat/grok-adoptions branch August 22, 2026 16:35
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