diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 832fca0..b6b1745 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,12 +24,106 @@ jobs: repository: TeoSlayer/pilotprotocol path: web4 + - name: Checkout common + uses: actions/checkout@v4 + with: + repository: pilot-protocol/common + path: common + + - name: Checkout trustedagents + uses: actions/checkout@v4 + with: + repository: pilot-protocol/trustedagents + path: trustedagents + + - name: Checkout policy + uses: actions/checkout@v4 + with: + repository: pilot-protocol/policy + path: policy + + - name: Checkout runtime + uses: actions/checkout@v4 + with: + repository: pilot-protocol/runtime + path: runtime + + - name: Checkout skillinject + uses: actions/checkout@v4 + with: + repository: pilot-protocol/skillinject + path: skillinject + + - name: Checkout webhook + uses: actions/checkout@v4 + with: + repository: pilot-protocol/webhook + path: webhook + + - name: Checkout eventstream + uses: actions/checkout@v4 + with: + repository: pilot-protocol/eventstream + path: eventstream + + - name: Checkout dataexchange + uses: actions/checkout@v4 + with: + repository: pilot-protocol/dataexchange + path: dataexchange + + - name: Checkout updater + uses: actions/checkout@v4 + with: + repository: pilot-protocol/updater + path: updater + + - name: Checkout gateway + uses: actions/checkout@v4 + with: + repository: pilot-protocol/gateway + path: gateway + + - name: Checkout nameserver + uses: actions/checkout@v4 + with: + repository: pilot-protocol/nameserver + path: nameserver + + - name: Checkout rendezvous + uses: actions/checkout@v4 + with: + repository: pilot-protocol/rendezvous + path: rendezvous + + - name: Checkout beacon + uses: actions/checkout@v4 + with: + repository: pilot-protocol/beacon + path: beacon + + - name: Checkout app-store + uses: actions/checkout@v4 + with: + repository: pilot-protocol/app-store + path: app-store + + - name: Checkout libpilot + uses: actions/checkout@v4 + with: + repository: pilot-protocol/libpilot + path: libpilot + - uses: actions/setup-go@v5 with: go-version: '1.25' cache: true cache-dependency-path: handshake/go.sum + - name: Tidy (handshake) go.mod (absorb sibling drift) + working-directory: handshake + run: go mod tidy + - name: Run tests with coverage working-directory: handshake run: go test -race -coverprofile=coverage.out -covermode=atomic ./... diff --git a/go.mod b/go.mod index 47286be..3ca3e37 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.25.10 require ( github.com/TeoSlayer/pilotprotocol v0.0.0 - github.com/pilot-protocol/common v0.2.0 + github.com/pilot-protocol/common v0.4.0 ) require ( diff --git a/go.sum b/go.sum index 2a1ef6e..e8c1f2a 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g= github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= -github.com/pilot-protocol/common v0.1.0 h1:m8mZZATgeBiFoqhWXPnskw2u0lNkWxHp0IagZK35V1g= -github.com/pilot-protocol/common v0.1.0/go.mod h1:4YZWHK5nhM+4RLmYTspLxxAFbyBII7yzQDAHq3Ul2ck= github.com/pilot-protocol/rendezvous v0.1.0 h1:vOBD7CnRY8uU8vma0Vfcr0aPSQ54qNuxppNUiljzk9Y= github.com/pilot-protocol/rendezvous v0.1.0/go.mod h1:g3/IYBykbU5m9jeprSCrmuoDpaqROO4Lu/+ecKVIF3A= github.com/pilot-protocol/trustedagents v0.1.0 h1:rCX0IQxfZ84Q4dSgw01WJgjHUODRnI3iAon1t+NuFGE= diff --git a/zz_handshake_manager_bootstrap_test.go b/zz_handshake_manager_bootstrap_test.go index 3c24023..8cac328 100644 --- a/zz_handshake_manager_bootstrap_test.go +++ b/zz_handshake_manager_bootstrap_test.go @@ -8,6 +8,7 @@ import ( "github.com/TeoSlayer/pilotprotocol/pkg/daemon" "github.com/pilot-protocol/common/protocol" + tprotocol "github.com/TeoSlayer/pilotprotocol/pkg/protocol" ) // Iter-114 coverage for Manager.Start — the port-444 service bootstrap @@ -75,7 +76,7 @@ func TestHandshakeManagerStartAcceptLoopDispatchesToHandleConnection(t *testing. conn := &daemon.Connection{ ID: 999, RecvBuf: make(chan []byte, 1), - RemoteAddr: protocol.Addr{Network: 1, Node: 0xAA00BB00}, + RemoteAddr: tprotocol.Addr{Network: 1, Node: 0xAA00BB00}, RemotePort: 12345, } conn.CloseRecvBuf() diff --git a/zz_helpers_test.go b/zz_helpers_test.go index 8e58ce3..174e2be 100644 --- a/zz_helpers_test.go +++ b/zz_helpers_test.go @@ -12,7 +12,7 @@ import ( "github.com/pilot-protocol/common/coreapi" "github.com/TeoSlayer/pilotprotocol/pkg/daemon" "github.com/pilot-protocol/common/protocol" - registryclient "github.com/pilot-protocol/common/registry/client" + tregistryclient "github.com/TeoSlayer/pilotprotocol/pkg/registry/client" "github.com/TeoSlayer/pilotprotocol/tests/regtestutil" "github.com/pilot-protocol/common/crypto" ) @@ -36,7 +36,7 @@ type testRuntime struct { identity *crypto.Identity identityPath string trustAutoApprove bool - regClient *registryclient.Client + regClient *tregistryclient.Client trustChecker daemon.TrustChecker // Side-effect captures useful for test assertions. The handshake @@ -268,7 +268,7 @@ func (l *testDaemonListener) Close() error { l.d.Ports().Unbind(l.inner.Port) return nil } -func (l *testDaemonListener) Addr() coreapi.Addr { return l.d.Addr() } +func (l *testDaemonListener) Addr() coreapi.Addr { a := l.d.Addr(); return coreapi.Addr{Network: a.Network, Node: a.Node} } func (l *testDaemonListener) Port() uint16 { return l.inner.Port } // testStreamAdapter wraps *daemon.Connection as coreapi.Stream. @@ -281,9 +281,9 @@ type testStreamAdapter struct { func (s *testStreamAdapter) Read(p []byte) (int, error) { return s.rw.Read(p) } func (s *testStreamAdapter) Write(p []byte) (int, error) { return s.rw.Write(p) } func (s *testStreamAdapter) Close() error { return s.rw.Close() } -func (s *testStreamAdapter) LocalAddr() coreapi.Addr { return s.conn.LocalAddr } +func (s *testStreamAdapter) LocalAddr() coreapi.Addr { return coreapi.Addr{Network: s.conn.LocalAddr.Network, Node: s.conn.LocalAddr.Node} } func (s *testStreamAdapter) LocalPort() uint16 { return s.conn.LocalPort } -func (s *testStreamAdapter) RemoteAddr() coreapi.Addr { return s.conn.RemoteAddr } +func (s *testStreamAdapter) RemoteAddr() coreapi.Addr { return coreapi.Addr{Network: s.conn.RemoteAddr.Network, Node: s.conn.RemoteAddr.Node} } func (s *testStreamAdapter) RemotePort() uint16 { return s.conn.RemotePort } func (s *testStreamAdapter) SetDeadline(time.Time) error { return nil } func (s *testStreamAdapter) SetReadDeadline(time.Time) error { return nil }