Commit b25e549
authored
feat: raise default MCP_GATEWAY_SESSION_TIMEOUT from 2h to 6h (#3201)
The default unified-mode session timeout was 2h; 6h matches the GitHub
Actions default job timeout, preventing premature session expiry in
standard CI workflows.
## Changes
- **`internal/server/transport.go`** — default argument to
`GetEnvDuration("MCP_GATEWAY_SESSION_TIMEOUT", …)` changed from
`2*time.Hour` → `6*time.Hour`
- **`internal/envutil/envutil_test.go`** — updated real-world scenario
test to reflect the new default
- **`docs/ENVIRONMENT_VARIABLES.md`** / **`AGENTS.md`** — updated
default values and rationale in documentation
> [!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-build1794183046/b514/launcher.test
/tmp/go-build1794183046/b514/launcher.test
-test.testlogfile=/tmp/go-build1794183046/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build1794183046/b434/vet.cfg /mcp/connection.go /mcp/errors.go
x_amd64/vet
/tmp/go-build188/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet
-imultiarch x86_64-linux-gnu-bool x_amd64/vet -W g_.a
/tmp/go-build188-ifaceassert x_amd64/vet . ernal/middleware-atomic --64
x_amd64/vet` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1794183046/b496/config.test
/tmp/go-build1794183046/b496/config.test
-test.testlogfile=/tmp/go-build1794183046/b496/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build1794183046/b394/vet.cfg 5.0/internal/doc-c=4
5.0/internal/oau-nolocalimports x_amd64/vet
/tmp/go-build188/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet
nal/strs x86_64-linux-gnu-bool x_amd64/vet abis�� g_.a -I x_amd64/vet`
(dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build1794183046/b514/launcher.test
/tmp/go-build1794183046/b514/launcher.test
-test.testlogfile=/tmp/go-build1794183046/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build1794183046/b434/vet.cfg /mcp/connection.go /mcp/errors.go
x_amd64/vet
/tmp/go-build188/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet
-imultiarch x86_64-linux-gnu-bool x_amd64/vet -W g_.a
/tmp/go-build188-ifaceassert x_amd64/vet . ernal/middleware-atomic --64
x_amd64/vet` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build1794183046/b514/launcher.test
/tmp/go-build1794183046/b514/launcher.test
-test.testlogfile=/tmp/go-build1794183046/b514/testlog.txt
-test.paniconexit0 -test.timeout=10m0s
/tmp/go-build1794183046/b434/vet.cfg /mcp/connection.go /mcp/errors.go
x_amd64/vet
/tmp/go-build188/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet
-imultiarch x86_64-linux-gnu-bool x_amd64/vet -W g_.a
/tmp/go-build188-ifaceassert x_amd64/vet . ernal/middleware-atomic --64
x_amd64/vet` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1794183046/b523/mcp.test
/tmp/go-build1794183046/b523/mcp.test
-test.testlogfile=/tmp/go-build1794183046/b523/testlog.txt
-test.paniconexit0 -test.timeout=10m0s 9187�� .cfg pmgFoLvmr x_amd64/vet
. --gdwarf2 --64 x_amd64/vet .cfg�� 9187355/b400/_pkg_.a
64/src/net/http/httptest/httptest.go x_amd64/vet -p t/transform
-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>4 files changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments