Older instances: leave seal key and expiry out; keep x/sys as it was
A protocol 1 hello drops the seal key and the connections' expiry, both now omitted when empty, so a new runner still connects to an older instance. x/crypto is pinned to v0.53.0, the newest that keeps x/sys at v0.46.0, so the certified tool proxy builds the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 files changed,
+29
−26
go.mod+6 −6go.sum+12 −12internal/wire/connections.go+2 −2internal/wire/frames.go+1 −1internal/wire/runners.go+4 −1internal/wire/wiretest/testdata/frames/hello-mac-probes.json+1 −1internal/wire/wiretest/testdata/frames/hello-mac.json+1 −1internal/wire/wiretest/testdata/frames/hello.json+1 −1internal/wire/wiretest/testdata/frames/sync.json+1 −1
CI failed — run details
diff --git a/go.mod b/go.mod| index 2ca476ba..14ce7283 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -7,7 +7,7 @@ require ( |
| github.com/chromedp/cdproto v0.158.6 |
| github.com/chromedp/chromedp v0.21.0 |
| github.com/go-chi/chi/v5 v5.3.2 |
| - golang.org/x/sys v0.49.0 |
| + golang.org/x/sys v0.46.0 |
| gorm.io/gorm v1.31.2 |
| gorm.io/plugin/dbresolver v1.6.2 |
| modernc.org/sqlite v1.55.0 |
| @@ -15,7 +15,7 @@ require ( |
| require github.com/coder/websocket v1.8.15 |
| -require golang.org/x/crypto v0.58.0 |
| +require golang.org/x/crypto v0.53.0 |
| require ( |
| amadan.net/rastrillo/rastrillo/money v0.1.0 // indirect |
| @@ -30,10 +30,10 @@ require ( |
| github.com/ncruces/go-strftime v1.0.0 // indirect |
| github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect |
| github.com/yuin/goldmark v1.8.6 |
| - golang.org/x/mod v0.41.0 // indirect |
| - golang.org/x/sync v0.24.0 // indirect |
| - golang.org/x/text v0.43.0 // indirect |
| - golang.org/x/tools v0.51.0 // indirect |
| + golang.org/x/mod v0.37.0 // indirect |
| + golang.org/x/sync v0.21.0 // indirect |
| + golang.org/x/text v0.39.0 // indirect |
| + golang.org/x/tools v0.47.0 // indirect |
| modernc.org/libc v1.74.1 // indirect |
| modernc.org/mathutil v1.7.1 // indirect |
| modernc.org/memory v1.11.0 // indirect |
diff --git a/go.sum b/go.sum| index d87a71b2..a31e9b8f 100644 |
| --- a/go.sum |
| +++ b/go.sum |
| @@ -44,19 +44,19 @@ github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1 |
| github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= |
| github.com/yuin/goldmark v1.8.6 h1:d0VcaP1sx9GkFVkoW+KtggpGi2KZ965i14b0+bDQST4= |
| github.com/yuin/goldmark v1.8.6/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= |
| -golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= |
| -golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= |
| -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= |
| -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= |
| -golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA= |
| -golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= |
| +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= |
| +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= |
| +golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= |
| +golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= |
| +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= |
| +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= |
| golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
| -golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= |
| -golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= |
| -golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= |
| -golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= |
| -golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= |
| -golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= |
| +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= |
| +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= |
| +golang.org/x/text v0.39.0 h1:UbZz4pLOvn600D6Oh6GGEI6VAmndrEBLv8/6BEXzyus= |
| +golang.org/x/text v0.39.0/go.mod h1:3UwRclnC2g0TU9x8PZiyfOajCd1zaUNHF9cvqcQZ+ZM= |
| +golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q= |
| +golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA= |
| gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo= |
| gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= |
| gorm.io/driver/sqlite v1.6.0 h1:WHRRrIiulaPiPFmDcod6prc4l2VGVWHz80KspNsxSfQ= |
diff --git a/internal/wire/connections.go b/internal/wire/connections.go| index 3314d085..27ff6593 100644 |
| --- a/internal/wire/connections.go |
| +++ b/internal/wire/connections.go |
| @@ -210,8 +210,8 @@ type HeldConnection struct { |
| State string `json:"state"` |
| Plan string `json:"plan"` |
| Headroom *Headroom `json:"headroom"` |
| - // ExpiresAt is when a pasted credential expires (null otherwise). |
| - ExpiresAt *time.Time `json:"expires_at"` |
| + // ExpiresAt is when a pasted credential expires (absent otherwise). |
| + ExpiresAt *time.Time `json:"expires_at,omitempty"` |
| } |
| // Switched is the quiet line under a reply (or on a step) that moved to |
diff --git a/internal/wire/frames.go b/internal/wire/frames.go| index eda94170..df3573e6 100644 |
| --- a/internal/wire/frames.go |
| +++ b/internal/wire/frames.go |
| @@ -289,7 +289,7 @@ type Hello struct { |
| Versions map[string]string `json:"versions"` |
| // SealKey is the runner's X25519 public key (base64) for sealed |
| // secrets. |
| - SealKey string `json:"seal_key"` |
| + SealKey string `json:"seal_key,omitempty"` |
| // Protocol 2: the protocol the runner speaks (absent: 1), its |
| // platform, its label (the machine's name), how it confines steps and |
| // what it can do. |
diff --git a/internal/wire/runners.go b/internal/wire/runners.go| index cc4a5f46..4bfe9c44 100644 |
| --- a/internal/wire/runners.go |
| +++ b/internal/wire/runners.go |
| @@ -373,7 +373,10 @@ func Encode(f Frame, protocol int) (Frame, error) { |
| func downgrade(body any) bool { |
| switch v := body.(type) { |
| case *Hello: |
| - v.Protocol, v.Platform, v.Label, v.Sandbox, v.Capabilities = 0, nil, "", "", nil |
| + v.Protocol, v.Platform, v.Label, v.Sandbox, v.Capabilities, v.SealKey = 0, nil, "", "", nil, "" |
| + for i := range v.Connections { |
| + v.Connections[i].ExpiresAt = nil |
| + } |
| for i := range v.Catalog { |
| v.Catalog[i].NeedsMacOS, v.Catalog[i].Simulator = false, false |
| } |
diff --git a/internal/wire/wiretest/testdata/frames/hello-mac-probes.json b/internal/wire/wiretest/testdata/frames/hello-mac-probes.json| index 924a62a9..672efff7 100644 |
| --- a/internal/wire/wiretest/testdata/frames/hello-mac-probes.json |
| +++ b/internal/wire/wiretest/testdata/frames/hello-mac-probes.json |
| @@ -1 +1 @@ |
| -{"id":"r-hello-mac-probes","type":"hello","data":{"generation":3,"repos":[],"create_in":[],"home":"","agent":"","catalog":[],"connections":[],"versions":{"claude":"2.1.312","runner":"5eae410"},"seal_key":"","protocol":2,"platform":{"os":"darwin","arch":"arm64"},"label":"Tito Studio","sandbox":"none","capabilities":{"xcode":{"version":"16.2","build":"16C5032a"},"simulators":[{"name":"iPhone 16 Pro","runtime":"iOS 18.2","udid":"5C0A1E2B-3D4F-4A5B-9C6D-7E8F90A1B2C3","state":"Shutdown"}],"toolchains":{"go":"go1.26.10","swift":"6.0.3","node":"v22.12.0"},"harness":{"claude":"2.1.312","codex":"","srt":"0.0.81"},"tags":["macos","xcode","ios_simulator"],"probes":[{"id":"P1","verdict":"passed","detail":"Xcode 16.2 (16C5032a); 6 iOS simulators; Tito Studio"},{"id":"P2","verdict":"failed","detail":"allowed: script.keychain plugin.keychain test.keychain; Unix permissions only: script.home plugin.home test.home; xcodebuild ran in srt"},{"id":"P3","verdict":"skipped","detail":"sign-in needs a person (slice F); keychain from the sandbox: allowed"},{"id":"P4","verdict":"passed","detail":"no other home readable; agent loaded; sleep off on power"},{"id":"P5","verdict":"skipped","detail":"Codex on the Mac is parked (slice G)"},{"id":"P6","verdict":"passed","detail":"group gone in 2s; 0 marked left; 1 simulator shut down; tree removed"},{"id":"P7","verdict":"passed","detail":"srt 0.0.81; node v22.12.0; rg 14.1.1"}]}}} |
| +{"id":"r-hello-mac-probes","type":"hello","data":{"generation":3,"repos":[],"create_in":[],"home":"","agent":"","catalog":[],"connections":[],"versions":{"claude":"2.1.312","runner":"5eae410"},"protocol":2,"platform":{"os":"darwin","arch":"arm64"},"label":"Tito Studio","sandbox":"none","capabilities":{"xcode":{"version":"16.2","build":"16C5032a"},"simulators":[{"name":"iPhone 16 Pro","runtime":"iOS 18.2","udid":"5C0A1E2B-3D4F-4A5B-9C6D-7E8F90A1B2C3","state":"Shutdown"}],"toolchains":{"go":"go1.26.10","swift":"6.0.3","node":"v22.12.0"},"harness":{"claude":"2.1.312","codex":"","srt":"0.0.81"},"tags":["macos","xcode","ios_simulator"],"probes":[{"id":"P1","verdict":"passed","detail":"Xcode 16.2 (16C5032a); 6 iOS simulators; Tito Studio"},{"id":"P2","verdict":"failed","detail":"allowed: script.keychain plugin.keychain test.keychain; Unix permissions only: script.home plugin.home test.home; xcodebuild ran in srt"},{"id":"P3","verdict":"skipped","detail":"sign-in needs a person (slice F); keychain from the sandbox: allowed"},{"id":"P4","verdict":"passed","detail":"no other home readable; agent loaded; sleep off on power"},{"id":"P5","verdict":"skipped","detail":"Codex on the Mac is parked (slice G)"},{"id":"P6","verdict":"passed","detail":"group gone in 2s; 0 marked left; 1 simulator shut down; tree removed"},{"id":"P7","verdict":"passed","detail":"srt 0.0.81; node v22.12.0; rg 14.1.1"}]}}} |
diff --git a/internal/wire/wiretest/testdata/frames/hello-mac.json b/internal/wire/wiretest/testdata/frames/hello-mac.json| index 63aad162..19221852 100644 |
| --- a/internal/wire/wiretest/testdata/frames/hello-mac.json |
| +++ b/internal/wire/wiretest/testdata/frames/hello-mac.json |
| @@ -1 +1 @@ |
| -{"id":"r-hello-mac","type":"hello","data":{"generation":3,"repos":[],"create_in":[],"home":"","agent":"","catalog":[],"connections":[],"versions":{"claude":"2.1.312","runner":"5eae410"},"seal_key":"","protocol":2,"platform":{"os":"darwin","arch":"arm64"},"label":"Tito Studio","sandbox":"seatbelt","capabilities":{"xcode":{"version":"16.2","build":"16C5032a"},"simulators":[{"name":"iPhone 16 Pro","runtime":"iOS 18.2","udid":"5C0A1E2B-3D4F-4A5B-9C6D-7E8F90A1B2C3","state":"Shutdown"}],"toolchains":{"go":"go1.26.10","swift":"6.0.3","node":"v22.12.0"},"harness":{"claude":"2.1.312","codex":"","srt":"0.0.81"},"tags":["macos","xcode","ios_simulator","claude"]}}} |
| +{"id":"r-hello-mac","type":"hello","data":{"generation":3,"repos":[],"create_in":[],"home":"","agent":"","catalog":[],"connections":[],"versions":{"claude":"2.1.312","runner":"5eae410"},"protocol":2,"platform":{"os":"darwin","arch":"arm64"},"label":"Tito Studio","sandbox":"seatbelt","capabilities":{"xcode":{"version":"16.2","build":"16C5032a"},"simulators":[{"name":"iPhone 16 Pro","runtime":"iOS 18.2","udid":"5C0A1E2B-3D4F-4A5B-9C6D-7E8F90A1B2C3","state":"Shutdown"}],"toolchains":{"go":"go1.26.10","swift":"6.0.3","node":"v22.12.0"},"harness":{"claude":"2.1.312","codex":"","srt":"0.0.81"},"tags":["macos","xcode","ios_simulator","claude"]}}} |
diff --git a/internal/wire/wiretest/testdata/frames/hello.json b/internal/wire/wiretest/testdata/frames/hello.json| index 17d4faa4..32ea6d45 100644 |
| --- a/internal/wire/wiretest/testdata/frames/hello.json |
| +++ b/internal/wire/wiretest/testdata/frames/hello.json |
| @@ -1 +1 @@ |
| -{"id":"r-hello-1","type":"hello","data":{"generation":3,"repos":["amadan.net/oficina/sample"],"create_in":["oficina"],"home":"","agent":"equipo-docs-t1","catalog":[{"repo":"amadan.net/oficina/sample","default_branch":"main","summary":"A sample app for Equipo tests.","names":["Sample","Woodstar"],"hints":["go"],"updated_at":"2026-11-06T09:00:00Z","head_sha":"3333333333333333333333333333333333333333","head_subject":"Swipe from the edge goes back","gate":"make ci","checks_reason":""}],"connections":[{"local_id":"claude-a","person":"owner@example.com","provider":"claude","kind":"subscription","label":"owner@example.com","state":"healthy","plan":"","headroom":null,"expires_at":null}],"versions":{"claude":"2.1.312","runner":"5eae410"},"seal_key":""}} |
| +{"id":"r-hello-1","type":"hello","data":{"generation":3,"repos":["amadan.net/oficina/sample"],"create_in":["oficina"],"home":"","agent":"equipo-docs-t1","catalog":[{"repo":"amadan.net/oficina/sample","default_branch":"main","summary":"A sample app for Equipo tests.","names":["Sample","Woodstar"],"hints":["go"],"updated_at":"2026-11-06T09:00:00Z","head_sha":"3333333333333333333333333333333333333333","head_subject":"Swipe from the edge goes back","gate":"make ci","checks_reason":""}],"connections":[{"local_id":"claude-a","person":"owner@example.com","provider":"claude","kind":"subscription","label":"owner@example.com","state":"healthy","plan":"","headroom":null}],"versions":{"claude":"2.1.312","runner":"5eae410"}}} |
diff --git a/internal/wire/wiretest/testdata/frames/sync.json b/internal/wire/wiretest/testdata/frames/sync.json| index ca1757e7..676d2ce2 100644 |
| --- a/internal/wire/wiretest/testdata/frames/sync.json |
| +++ b/internal/wire/wiretest/testdata/frames/sync.json |
| @@ -1 +1 @@ |
| -{"id":"r-sync-1","type":"sync","data":{"sessions":[{"person":"owner@example.com","provider":"claude","account":"claude-a","session_id":"00000000-0000-4000-8000-000000000001","last_turn":"t_0001"}],"runs":[{"turn_id":"t_0001","attempt":1,"state":"running"}],"steps":[{"task_id":"tk0001","step_id":"s_0001","attempt":1,"state":"running","candidate_sha":""}],"asks":[{"question_id":"q_0001","attempt":1,"state":"running"}],"connections":[{"local_id":"claude-a","person":"owner@example.com","provider":"claude","kind":"subscription","label":"owner@example.com","state":"healthy","plan":"","headroom":null,"expires_at":null}]}} |
| +{"id":"r-sync-1","type":"sync","data":{"sessions":[{"person":"owner@example.com","provider":"claude","account":"claude-a","session_id":"00000000-0000-4000-8000-000000000001","last_turn":"t_0001"}],"runs":[{"turn_id":"t_0001","attempt":1,"state":"running"}],"steps":[{"task_id":"tk0001","step_id":"s_0001","attempt":1,"state":"running","candidate_sha":""}],"asks":[{"question_id":"q_0001","attempt":1,"state":"running"}],"connections":[{"local_id":"claude-a","person":"owner@example.com","provider":"claude","kind":"subscription","label":"owner@example.com","state":"healthy","plan":"","headroom":null}]}} |