From ec309af9e2f2d6b6d12cbfcd59f8079c1d16f3b4 Mon Sep 17 00:00:00 2001 From: matthew-pilot Date: Thu, 28 May 2026 03:03:03 +0000 Subject: [PATCH 1/2] fix: remove no-op deadline no-ops from streamAdapter (PILOT-79) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove SetDeadline, SetReadDeadline, SetWriteDeadline from streamAdapter. These were no-ops that silently returned nil, misleading plugin authors. Depends on the sibling PR in TeoSlayer/pilotprotocol which removes the same methods from the coreapi.Stream interface — merge that PR first, then this one. --- go.mod | 2 +- streams.go | 5 +---- zz_streams_ceiling_test.go | 14 +++----------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 069e04f..e62b745 100644 --- a/go.mod +++ b/go.mod @@ -15,4 +15,4 @@ require ( github.com/pilot-protocol/trustedagents v0.1.0 // indirect ) -replace github.com/TeoSlayer/pilotprotocol => ../web4 +replace github.com/TeoSlayer/pilotprotocol => /home/node/.openclaw/workspace/repos/web4 diff --git a/streams.go b/streams.go index 8f9325c..dc0e00f 100644 --- a/streams.go +++ b/streams.go @@ -5,7 +5,6 @@ package runtime import ( "context" "errors" - "time" "github.com/TeoSlayer/pilotprotocol/pkg/coreapi" "github.com/TeoSlayer/pilotprotocol/pkg/daemon" @@ -78,9 +77,7 @@ func (s *streamAdapter) LocalPort() uint16 { return s.conn.LocalPort } func (s *streamAdapter) RemoteAddr() coreapi.Addr { return s.conn.RemoteAddr } func (s *streamAdapter) RemotePort() uint16 { return s.conn.RemotePort } -func (s *streamAdapter) SetDeadline(time.Time) error { return nil } -func (s *streamAdapter) SetReadDeadline(time.Time) error { return nil } -func (s *streamAdapter) SetWriteDeadline(time.Time) error { return nil } + var ( _ coreapi.Streams = daemonStreams{} diff --git a/zz_streams_ceiling_test.go b/zz_streams_ceiling_test.go index 48eaaec..6ab6e58 100644 --- a/zz_streams_ceiling_test.go +++ b/zz_streams_ceiling_test.go @@ -9,7 +9,6 @@ import ( "net" "strings" "testing" - "time" "github.com/TeoSlayer/pilotprotocol/pkg/coreapi" "github.com/TeoSlayer/pilotprotocol/pkg/daemon" @@ -155,16 +154,9 @@ func TestDaemonListener_AcceptDeliversStreamWithAccessors(t *testing.T) { t.Errorf("RemotePort = %d, want 8888", got) } - // The deadline shims are documented no-ops returning nil. - if err := stream.SetDeadline(time.Now().Add(time.Hour)); err != nil { - t.Errorf("SetDeadline: %v", err) - } - if err := stream.SetReadDeadline(time.Now().Add(time.Hour)); err != nil { - t.Errorf("SetReadDeadline: %v", err) - } - if err := stream.SetWriteDeadline(time.Now().Add(time.Hour)); err != nil { - t.Errorf("SetWriteDeadline: %v", err) - } + // Deadline methods were removed from coreapi.Stream (PILOT-79). + // The runtime cannot honor them; removing from the interface + // gives callers a compile-time signal instead of a silent no-op. // Closing the stream goes through daemon.CloseConnection, which for // a synthetic conn in StateClosed exits via the non-ESTABLISHED From 196b73dbacb53e36be7024c246d0e9b0b9758162 Mon Sep 17 00:00:00 2001 From: Teodor Calin Date: Thu, 28 May 2026 10:04:30 -0700 Subject: [PATCH 2/2] fix(go.mod): restore relative replace path to ../web4 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e62b745..069e04f 100644 --- a/go.mod +++ b/go.mod @@ -15,4 +15,4 @@ require ( github.com/pilot-protocol/trustedagents v0.1.0 // indirect ) -replace github.com/TeoSlayer/pilotprotocol => /home/node/.openclaw/workspace/repos/web4 +replace github.com/TeoSlayer/pilotprotocol => ../web4