Skip to content

Commit a39d26a

Browse files
committed
fix(boundaries): untrack go.work, add cross-engine import guard
- 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
1 parent 59d05b6 commit a39d26a

4 files changed

Lines changed: 29 additions & 8 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@ __pycache__/
2828
.codegraph/
2929
coverage.out
3030

31+
# Go workspace (local dev only — each developer creates their own)
32+
go.work
33+
go.work.sum
34+
3135
# macOS
3236
.DS_Store

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ sessions, across models, across projects — with no separate install or daemon
4646
4747
Yaad is a Hawk support engine. Keep the dependency edge one-way:
4848
49-
- depend on `hawk-core-contracts` when a stable cross-repo contract is needed
49+
- yaad uses local-only types (memory/retrieval types are yaad-scoped, not shared contracts)
5050
- do not import `hawk/internal/*`
51-
- do not import removed legacy path `hawk/shared/types`; use `hawk-core-contracts/types`
51+
- do not import removed legacy path `hawk/shared/types`
52+
- do not import other engines (`eyrie`, `tok`, `trace`, `sight`, `inspect`) — engines are peers, not dependencies
5253
5354
---
5455

go.work

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/check-ecosystem-boundaries.sh

100644100755
Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,37 @@ set -euo pipefail
44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55
cd "$ROOT_DIR"
66

7+
FORBIDDEN_HAWK='github\.com/GrayCodeAI/hawk/(internal/|shared/types)'
8+
FORBIDDEN_ENGINES='github\.com/GrayCodeAI/(eyrie|tok|trace|sight|inspect)(/|")'
9+
10+
exit_code=0
11+
712
if command -v rg >/dev/null 2>&1; then
8-
violations="$(rg -n 'github\.com/GrayCodeAI/hawk/(internal/|shared/types)' --glob '*.go' . || true)"
13+
violations="$(rg -n "$FORBIDDEN_HAWK" --glob '*.go' . || true)"
14+
engine_violations="$(rg -n "$FORBIDDEN_ENGINES" --glob '*.go' . || true)"
915
else
10-
violations="$(grep -rn --include='*.go' -E 'github\.com/GrayCodeAI/hawk/(internal/|shared/types)' . || true)"
16+
violations="$(grep -rn --include='*.go' -E "$FORBIDDEN_HAWK" . || true)"
17+
engine_violations="$(grep -rn --include='*.go' -E "$FORBIDDEN_ENGINES" . || true)"
1118
fi
1219

1320
if [[ -n "${violations}" ]]; then
1421
echo "forbidden Hawk imports found:"
1522
echo "${violations}"
1623
echo
1724
echo "support repos must use hawk-core-contracts or local contracts, not hawk/internal or removed hawk/shared/types"
18-
exit 1
25+
exit_code=1
26+
fi
27+
28+
if [[ -n "${engine_violations}" ]]; then
29+
echo "forbidden cross-engine imports found:"
30+
echo "${engine_violations}"
31+
echo
32+
echo "support engines must not import other engines directly — they are peers, not dependencies"
33+
exit_code=1
34+
fi
35+
36+
if [[ $exit_code -ne 0 ]]; then
37+
exit $exit_code
1938
fi
2039

2140
echo "ecosystem boundary guard passed"

0 commit comments

Comments
 (0)