Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
3 changes: 2 additions & 1 deletion zz_handshake_manager_bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
10 changes: 5 additions & 5 deletions zz_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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 }
Expand Down
Loading