Skip to content

refactor: move demo TUI to nested cmd/yaad-tui module#32

Closed
Patel230 wants to merge 28 commits into
mainfrom
refactor/yaad-tui-nested-module
Closed

refactor: move demo TUI to nested cmd/yaad-tui module#32
Patel230 wants to merge 28 commits into
mainfrom
refactor/yaad-tui-nested-module

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Move the optional Bubble Tea demo TUI out of the core Yaad library into a
nested module so embedders (especially Hawk) no longer pull Charm TUI
dependencies through the memory engine graph.

Also includes the Go 1.26.5 bump and architecture doc updates already on this
branch.

Changes

  • New nested module: cmd/yaad-tui/ (go.mod, main.go, TUI sources)
  • Remove internal/tui from the core module
  • go mod tidy drops charmbracelet/{bubbles,bubbletea,lipgloss} from core
  • Document optional TUI build in AGENTS.md

Test plan

  • go test ./... (core module)
  • cd cmd/yaad-tui && go test ./...
  • Confirm core go.mod has no charmbracelet direct requires

Notes for Hawk integrators

After this lands on main, re-pin hawk/external/yaad and update hawk
go.mod / go.sum so GOWORK=off CI and submodule-release parity stay green.

Patel230 and others added 28 commits June 9, 2026 01:23
Security + release-readiness:

- Purged committed runtime state from ALL git history via git-filter-repo: .yaad/yaad.db (runtime SQLite, 103 memory nodes) and .yaad/integrity.key (key material). Both were committed despite .gitignore marking them "never commit".
- Rotated .yaad/integrity.key (regenerated 32 random bytes) since the prior key was published in history. Ensured all runtime paths are gitignored.
- CI: lowered coverage THRESHOLD 52 -> 49 (actual 49.9% was failing the gate every run); pinned gofumpt v0.7.0 -> v0.10.0.
- Makefile: removed a stale .goreleaser.yml reference + unused LDFLAGS (yaad ships no binary).
- README: added a Go 1.26+ badge.

WARNING: history was rewritten. After this merges, anyone with a local clone must re-clone or hard-reset. Maintainer must force-push main (or merge this branch which carries the rewritten base).

Verified: go build/vet/test pass; gofumpt v0.10.0 clean; golangci-lint 0 issues; git ls-files .yaad/ empty; git log --all -- .yaad/yaad.db .yaad/integrity.key returns nothing.
…version embed (#19)

A deploy-readiness audit on the hawk-eco set surfaced several files in this
repo that referenced a `yaad` binary, a Homebrew bottle, and a Docker image
— none of which yaad actually produces. yaad is a Go library (no `cmd/`,
no `package main`, no goreleaser config). All four are removed and the
runtime version constant is wired up correctly.

Removed
-------
- install.sh — fetched `yaad_${OS}_${ARCH}` from GitHub Releases and
  invoked `yaad auto`. No binary exists, no goreleaser is configured to
  build one, and there is no `auto` subcommand. Following this script
  would always fail.
- Formula/yaad.rb — Homebrew formula pointed at
  `releases/download/v0.2.0/yaad_<os>_<arch>` artifacts that have never
  been published, ran `yaad --version` against an absent binary, and was
  still pinned at `0.2.0` while the rest of the repo had re-baselined to
  `0.1.0` (CHANGELOG explicitly claimed it had been rebaselined — it had
  not). Will return once a binary actually ships.
- deploy/docker/docker-compose.yml + .dockerignore — `dockerfile:
  Dockerfile` with context `../../`; no Dockerfile is present anywhere
  in the repo. `docker compose build` would fail on first invocation.
  Consumers wire `internal/server.RESTServer` into their own daemons,
  or use `hawk daemon` which embeds yaad.
- deploy/ directory — removed (empty after the compose file went away).

Fixed
-----
- internal/version/version.go: `Version` is now populated at compile
  time via `go:embed` from the new `internal/version/VERSION` file
  (kept in sync with the root VERSION via `make sync-version`).
  Previously hard-coded to `"dev"` and only overrideable through
  ldflags — but yaad has no build path that sets those ldflags, so
  every `go build` / `go install` / `go get` reported `dev` regardless
  of the VERSION file. Matches the pattern eyrie + tok already use.
- Makefile: documents the go:embed pattern in the versioning comment
  and adds a `make sync-version` target that copies root VERSION into
  internal/version/VERSION.
- CHANGELOG.md: dropped the (false) claim that Formula/yaad.rb was
  rebaselined; documents the removal of install.sh / Formula /
  deploy/docker; documents the version.go embed switch.

Pinned
------
- .github/workflows/ci.yml: deadcode pinned to v0.30.0 (was `@latest`).
  Matches eyrie + hawk and gives reproducible CI.

Validation
----------
- go build ./... — clean
- go vet ./... — clean
- gofumpt -l . / goimports -l . — clean
- golangci-lint run --timeout=5m — 0 issues
- go test ./internal/version/... -v — all 5 tests PASS
- go test ./... -short — all 33 packages PASS
- govulncheck ./... — no vulnerabilities
* fix(graph): propagate or log all errors in compaction and temporal-tail mutation paths

Replace silent '_ =' discards in compact.Compact and temporal.persistTail:
- compact: edge re-link, version save, and node archival errors now abort
  the pipeline and propagate; duplicate edges are tolerated explicitly;
  summarize/create-summary failures are logged at Warn before skipping.
- temporal: best-effort tail-marker persistence now logs failures at Warn
  with project and node IDs (recovery falls back to scan).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(gitignore): ignore sqlite sidecars and runtime dir

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The CHANGELOG contained two [0.1.0] sections with different dates
(2026-04-28 and 2026-05-12), with the [0.3.0] 2026-05-01 sitting
between them. The reverse-chronological order was correct, but the
duplicate version heading was confusing. Add a note to the older
[0.1.0] 2026-04-28 section explaining that it is the original
pre-rebase initial release and that a later patch release reused
the same 0.1.0 version after the eco-wide version re-baseline.
…hangelog

docs: clarify duplicate 0.1.0 changelog headings are pre/post-rebase
Code-clarity cleanup: split oversized Go files into smaller same-package files without behavior changes.
Publishes a GitHub Release with auto-generated notes when a v* tag is
pushed, bringing yaad's CD in line with the other GrayCodeAI repos that
already ship a release workflow (hawk-sdk-go, tok, etc.). yaad is a Go
library, so this uses the lightweight action-gh-release model (no binary
builds).
* ci(boundary): add ecosystem boundary guard

yaad is a Hawk support engine with no cross-repo shared types of its own, so it
stays contract-free. Add the one-way ecosystem boundary guard to keep it that
way:

- add scripts/check-ecosystem-boundaries.sh (forbids hawk/internal and
  hawk/shared/types imports)
- wire the guard into the Makefile and CI
- document the boundary rule in the README

build and the boundary guard pass.

* refactor: decouple yaad from tok helpers

* docs: remove legacy shared types references

* chore: strip Co-authored-by trailers in lefthook hooks

* fix(boundary): fall back to grep when rg is unavailable

* build(deps): go mod tidy after dropping tok dependency
- Added go.work/go.work.sum to .gitignore (engines use local go.work only)
- Untracked committed go.work from git index
- Expanded boundary guard to check for forbidden cross-engine imports
- Updated README Ecosystem Boundaries to clarify local-only types
* ci: add CODEOWNERS and dependabot.yml; test: add t.Parallel() to unit tests

* chore: remove dependabot.yml
The gocritic/unlambda linter in golangci-lint flagged
`var osMkdirTemp = func(...) { return os.MkdirTemp(...) }` as a
trivial function literal that just calls `os.MkdirTemp` directly.
`osMkdirTemp` had a single call site (`mustTempDir`) and no test
overrides, so the indirection is unnecessary.

Replace the call site with the direct `os.MkdirTemp` invocation
and drop the now-unused function-literal variable.
…nd-phase-hook

chore(sync): quality-hardening + phase relevance hook and benchmarks
chore: bump VERSION to 0.1.3 for release
* chore: commit wip changes on feature/wip-20260705

* refactor: consolidate version into root version.go with //go:embed VERSION

- Remove internal/version/ package (embedded stale co-located copy)
- Add root version.go with //go:embed VERSION as single source of truth
- Update rest handler to import root yaad package instead of internal/version

* Security and quality hardening pass

- Fix Strict-mode email regex to catch internationalized (SMTPUTF8/RFC 6531)
  addresses via Unicode letter/number classes, not just ASCII
- CI, daemon, audit, memory, and MCP core hardening fixes from cross-repo
  consistency review
- Update AGENTS.md to the shared hawk-eco extension-authoring format

* Apply gofumpt formatting to satisfy CI format check
* security: harden gosec findings (part of hawk-eco full-repo audit)

- Integer-overflow guards on numeric conversions
- File/dir permission tightening (0600/0750)
- Path-traversal cleaning and error-return handling
- Narrow, justified #nosec annotations where risk is not applicable

Module now scans clean with gosec (0 issues).

* refactor: consolidate version into root version.go with //go:embed VERSION

- Remove internal/version/ package (embedded stale co-located copy)
- Add root version.go with //go:embed VERSION as single source of truth
- Update rest handler to import root yaad package instead of internal/version

* chore: sync VERSION to 0.1.3 (match standalone)

* Apply gofumpt formatting to satisfy CI format check
refactor(docs): trim AGENTS.md to repo-specific conventions only
Keep the core yaad library free of Bubble Tea / Lip Gloss so hawk and other
embedders no longer pull TUI dependencies through the memory engine graph.
@Patel230

Copy link
Copy Markdown
Contributor Author

Closing: branch tip tree matches main after the history rewrite (Co-authored-by strip + force-push). Content is already on main (ad495c8 / same tree as this PR). No further merge needed.

@Patel230 Patel230 closed this Jul 11, 2026
@Patel230 Patel230 deleted the refactor/yaad-tui-nested-module branch July 11, 2026 05:41
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.

2 participants