feat: extract shared type packages from web4#2
Merged
Conversation
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.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates 10 shared-type packages out of
TeoSlayer/pilotprotocoland into the canonicalpilot-protocol/commonmodule: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(wasweb4/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:
Bumps go.mod to 1.25.10 to match siblings.
Next steps (separate PRs)
🤖 Generated with Claude Code