Skip to content

feat: extract shared type packages from web4#2

Merged
TeoSlayer merged 1 commit into
mainfrom
extract-shared-types-from-web4
May 28, 2026
Merged

feat: extract shared type packages from web4#2
TeoSlayer merged 1 commit into
mainfrom
extract-shared-types-from-web4

Conversation

@TeoSlayer
Copy link
Copy Markdown
Contributor

Summary

Migrates 10 shared-type packages out of TeoSlayer/pilotprotocol and into the canonical pilot-protocol/common module:

  • coreapi (15 files, 960 LOC)
  • protocol (6 files, 1050 LOC)
  • driver (9 files, 3017 LOC)
  • registry/client (8 files, 5104 LOC)
  • registry/wire (11 files, 2675 LOC)
  • config, logging, urlvalidate, secure (smaller utilities)
  • ipcutil (was web4/internal/ipcutil, promoted to public because Go internal-package visibility doesn't cross module boundaries)

Why

These are the universally-shared types every sibling repo imports from web4 today. Bringing them into common is the foundation that breaks the locally-circular sibling↔web4 dependency: once siblings switch their imports (Phase 2) they no longer require the web4 hub for shared types.

Test plan

Tests in this PR pass for every migrated package:

ok  github.com/pilot-protocol/common/coreapi
ok  github.com/pilot-protocol/common/protocol
ok  github.com/pilot-protocol/common/driver
ok  github.com/pilot-protocol/common/config
ok  github.com/pilot-protocol/common/logging
ok  github.com/pilot-protocol/common/urlvalidate
ok  github.com/pilot-protocol/common/secure
ok  github.com/pilot-protocol/common/registry/client
ok  github.com/pilot-protocol/common/registry/wire
ok  github.com/pilot-protocol/common/ipcutil

Bumps go.mod to 1.25.10 to match siblings.

Next steps (separate PRs)

  • 16 sibling PRs (Phase 2) switch their imports.
  • One web4 PR (Phase 3) sweeps cmd/* and deletes the now-duplicated pkg/* + internal/ipcutil.

🤖 Generated with Claude Code

Migrates coreapi, protocol, driver, registry/{client,wire}, config,
logging, urlvalidate, secure, and ipcutil out of TeoSlayer/pilotprotocol
and into the canonical pilot-protocol/common module.

These are the universally-shared types every sibling repo currently
imports via github.com/TeoSlayer/pilotprotocol/pkg/<X>. Bringing them
into common is the foundation that breaks the locally-circular
sibling↔web4 dependency: once siblings switch their imports (Phase 2)
they no longer require the web4 hub for shared types.

ipcutil was previously at web4/internal/ipcutil (40 LOC). Promoting it
to common/ipcutil because Go internal-package visibility doesn't cross
the module boundary, and several moved packages depend on it.

Smoke-tested with go test across every new package — all pass.

Bumps go.mod to 1.25.10 to match sibling repos.

Subsequent steps (not in this PR):
  - Phase 2: 13 sibling repos switch shared-type imports to common
  - Phase 3: web4 cmd/* switches too, and the duplicated pkg/* in web4
    is deleted.
@TeoSlayer TeoSlayer merged commit cc919fd into main May 28, 2026
1 check passed
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