Skip to content

refactor: remove tok types compatibility shim#60

Open
Patel230 wants to merge 7 commits into
mainfrom
feat/contracts-types-realignment
Open

refactor: remove tok types compatibility shim#60
Patel230 wants to merge 7 commits into
mainfrom
feat/contracts-types-realignment

Conversation

@Patel230

@Patel230 Patel230 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove duplicate severity/finding definitions from tok/types
  • remove the deprecated tok/types compatibility shim after verifying no in-workspace importers remain
  • keep tok focused on token/compression responsibilities and retain the ecosystem boundary guard

Test plan

  • /bin/sh ./scripts/check-ecosystem-boundaries.sh
  • GOCACHE=$PWD/.gocache go test ./...

Patel230 added 6 commits June 21, 2026 06:22
…boundary

tok was the original host of the ecosystem's shared types. Now that
hawk-core-contracts owns those contracts, tok/types still carried a full
duplicate of Severity/Finding (and friends) that nothing imported.

Convert tok/types into a deprecated compatibility shim that re-exports
github.com/GrayCodeAI/hawk-core-contracts/types via type aliases, mirroring
hawk/shared/types. This makes contracts the single source of truth and removes
the duplicate definitions while keeping any existing importer compiling.

Also wires the ecosystem boundary guard (scripts/check-ecosystem-boundaries.sh)
into the Makefile and CI, and aligns the README/ARCHITECTURE docs.

- go.mod: depend on hawk-core-contracts via local replace (engine-tier pattern)
- types/{severity,finding}.go: alias contracts types, mark deprecated
- build, vet, and types tests pass; boundary guard passes
…lace

Match the ecosystem binding convention: depend on the published module version;
local-dev resolution lives in a gitignored go.work, not in committed go.mod.

- go.mod: require hawk-core-contracts v0.1.0 (was v0.0.0), remove the
  `replace => ../hawk-core-contracts`
Now that hawk-core-contracts v0.1.0 is published, record its module checksums
so CI (which has no local go.work override) resolves it from the network.
Verified: GOWORK=off go build ./... passes.
@Patel230 Patel230 changed the title refactor(types): re-export hawk-core-contracts and enforce ecosystem boundary refactor: remove tok types compatibility shim Jun 21, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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