Commit b67207b
authored
fix: align gateway timeout defaults with spec §4.1.3 (#3592)
`DefaultStartupTimeout` and `DefaultToolTimeout` were 2× the
spec-documented values (60s vs 30s, 120s vs 60s), causing observable
gateway behavior to diverge from §4.1.3.
## Changes
- **`internal/config/config_core.go`**: Align constants with spec:
```go
// Before
DefaultStartupTimeout = 60 // seconds
DefaultToolTimeout = 120 // seconds
// After
DefaultStartupTimeout = 30 // seconds (per spec §4.1.3)
DefaultToolTimeout = 60 // seconds (per spec §4.1.3)
```
- **`internal/launcher/launcher_test.go`** /
**`getorlaunch_timeout_test.go`**: Update hardcoded `"1m0s"` / `"60
seconds"` references to match the new default (`"30s"`). Tests that
referenced the constants directly required no changes.
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `example.com`
> - Triggering command: `/tmp/go-build3874128028/b514/launcher.test
/tmp/go-build3874128028/b514/launcher.test
-test.testlogfile=/tmp/go-build3874128028/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build3874128028/b277/vet.cfg ify@v1.11.1/asse-errorsas
om/tetratelabs/w-ifaceassert x_amd64/vet -I rs/otlp/otlptrac-atomic -I
cpN1F_WSlTV5 -W .cfg 67475494/b288//_-ifaceassert x_amd64/vet .
--gdwarf2 475494/b288/ x_amd64/vet` (dns block)
> - Triggering command: `/tmp/go-build2871554986/b514/launcher.test
/tmp/go-build2871554986/b514/launcher.test
-test.testlogfile=/tmp/go-build2871554986/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -ato�� -bool
87c5eecb91833e7a--log-format ache/go/1.25.8/xjson
87c5eecb91833e7a/usr/lib/open-iscsi/net-interface-handler` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build3874128028/b496/config.test
/tmp/go-build3874128028/b496/config.test
-test.testlogfile=/tmp/go-build3874128028/b496/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build3874128028/b379/vet.cfg 5.0/deviceauth.ggo1.25.8
5.0/oauth2.go x_amd64/vet --gdwarf-5 nal/encoding/tex-atomic -o
x_amd64/vet -I _.a -I x_amd64/vet --gdwarf-5 go-sdk/auth -o x_amd64/vet`
(dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build3874128028/b514/launcher.test
/tmp/go-build3874128028/b514/launcher.test
-test.testlogfile=/tmp/go-build3874128028/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build3874128028/b277/vet.cfg ify@v1.11.1/asse-errorsas
om/tetratelabs/w-ifaceassert x_amd64/vet -I rs/otlp/otlptrac-atomic -I
cpN1F_WSlTV5 -W .cfg 67475494/b288//_-ifaceassert x_amd64/vet .
--gdwarf2 475494/b288/ x_amd64/vet` (dns block)
> - Triggering command: `/tmp/go-build2871554986/b514/launcher.test
/tmp/go-build2871554986/b514/launcher.test
-test.testlogfile=/tmp/go-build2871554986/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -ato�� -bool
87c5eecb91833e7a--log-format ache/go/1.25.8/xjson
87c5eecb91833e7a/usr/lib/open-iscsi/net-interface-handler` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build3874128028/b514/launcher.test
/tmp/go-build3874128028/b514/launcher.test
-test.testlogfile=/tmp/go-build3874128028/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build3874128028/b277/vet.cfg ify@v1.11.1/asse-errorsas
om/tetratelabs/w-ifaceassert x_amd64/vet -I rs/otlp/otlptrac-atomic -I
cpN1F_WSlTV5 -W .cfg 67475494/b288//_-ifaceassert x_amd64/vet .
--gdwarf2 475494/b288/ x_amd64/vet` (dns block)
> - Triggering command: `/tmp/go-build2871554986/b514/launcher.test
/tmp/go-build2871554986/b514/launcher.test
-test.testlogfile=/tmp/go-build2871554986/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -ato�� -bool
87c5eecb91833e7a--log-format ache/go/1.25.8/xjson
87c5eecb91833e7a/usr/lib/open-iscsi/net-interface-handler` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build3874128028/b523/mcp.test
/tmp/go-build3874128028/b523/mcp.test
-test.testlogfile=/tmp/go-build3874128028/b523/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -I .cfg
pkg/mod/go.opentelemetry.io/otel@v1.43.0/semconv/v1.40.0/doc.go
x_amd64/vet --gdwarf-5 g/grpc/connectiv--version -o x_amd64/vet .cfg��
/auth/apikey.go /auth/header.go x_amd64/vet -p g/grpc -lang=go1.25
x_amd64/vet` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/github/gh-aw-mcpg/settings/copilot/coding_agent)
(admins only)
>
> </details>File tree
3 files changed
+11
-7
lines changed- internal
- config
- launcher
3 files changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
| 556 | + | |
| 557 | + | |
555 | 558 | | |
556 | 559 | | |
557 | 560 | | |
558 | 561 | | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
562 | | - | |
| 565 | + | |
563 | 566 | | |
564 | | - | |
| 567 | + | |
565 | 568 | | |
566 | 569 | | |
567 | 570 | | |
| |||
623 | 626 | | |
624 | 627 | | |
625 | 628 | | |
626 | | - | |
627 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
628 | 632 | | |
629 | 633 | | |
630 | 634 | | |
| |||
0 commit comments