Skip to content

Support configurable MCP gateway session timeout via engine.mcp.session-timeout#29354

Merged
pelikhan merged 6 commits intomainfrom
copilot/add-session-timeout-config
Apr 30, 2026
Merged

Support configurable MCP gateway session timeout via engine.mcp.session-timeout#29354
pelikhan merged 6 commits intomainfrom
copilot/add-session-timeout-config

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

All workflows sharing a gateway instance inherit the same session lifetime (MCP_GATEWAY_SESSION_TIMEOUT), with no per-workflow override. This adds engine.mcp.session-timeout so workflow authors can declare session lifetime requirements declaratively.

Frontmatter

engine:
  id: copilot
  mcp:
    session-timeout: 4h   # Go duration string; minimum 5m, no upper bound

Changes

  • Extraction (engine.go): Parses engine.mcp.session-timeout (kebab-case only) from the engine.mcp sub-object into EngineConfig.MCPSessionTimeout
  • Struct (tools_types.go): Added SessionTimeout string to MCPGatewayRuntimeConfig; comment reflects full precedence chain (stdin config > MCP_GATEWAY_SESSION_TIMEOUT env var > built-in default 6h)
  • Propagation (mcp_gateway_config.go): buildMCPGatewayConfig reads SessionTimeout from workflowData.EngineConfig
  • Rendering (mcp_renderer.go): Emits "sessionTimeout": "<value>" into the gateway JSON gateway block when non-empty
  • Validation (engine_validation.go): validateEngineMCPSessionTimeout validates Go duration format and enforces a minimum of 5m (no upper bound); called from both the file-based orchestrator and ParseWorkflowString (Wasm/browser path)
  • Constants (pkg/constants): Added MCPSessionTimeoutMin (5m); no maximum constant
  • Schema (main_workflow_schema.json): Added mcp sub-object with session-timeout property (kebab-case only, additionalProperties: false); description documents env var precedence and no upper bound
  • Docs (mcp-gateway.md): New §4.1.3.6 covering sessionTimeout semantics and precedence (stdin config > MCP_GATEWAY_SESSION_TIMEOUT env var > gateway default 6h); OpenTelemetry section corrected to §4.1.3.7; v1.11.0 changelog entry

Copilot AI and others added 2 commits April 30, 2026 16:53
…ession timeout

- Add MCPSessionTimeout field to EngineConfig
- Parse engine.mcp.session-timeout in ExtractEngineConfig
- Add SessionTimeout field to MCPGatewayRuntimeConfig
- Propagate session timeout from engine config in buildMCPGatewayConfig
- Render sessionTimeout in gateway JSON config (mcp_renderer.go)
- Add validateEngineMCPSessionTimeout (5m-12h bounds) in engine_validation.go
- Wire validation in compiler_orchestrator_workflow.go
- Update JSON schema with engine.mcp.session-timeout property
- Add docs section in mcp-gateway.md
- Add tests for extraction, validation, config building, and rendering

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/28633935-f9d4-454d-b410-68ff66ca2853

Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot AI changed the title [WIP] Support configurable session timeout in workflow frontmatter Support configurable MCP gateway session timeout via engine.mcp.session-timeout Apr 30, 2026
Copilot AI requested a review from lpcox April 30, 2026 16:56
@lpcox lpcox marked this pull request as ready for review April 30, 2026 17:07
Copilot AI review requested due to automatic review settings April 30, 2026 17:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a per-workflow configuration option (engine.mcp.session-timeout) to control MCP gateway session lifetime, validating it at compile time and emitting it into the generated gateway JSON config.

Changes:

  • Parse engine.mcp.session-timeout into EngineConfig.MCPSessionTimeout and propagate it into the built MCP gateway runtime config.
  • Render sessionTimeout into the gateway JSON block when set; add min/max duration constants and compiler validation (5m–12h).
  • Update schema and docs to document the new field; add unit tests covering extraction, validation, propagation, and rendering.
Show a summary per file
File Description
pkg/workflow/tools_types.go Adds SessionTimeout to MCPGatewayRuntimeConfig.
pkg/workflow/mcp_renderer.go Emits sessionTimeout into gateway JSON when non-empty.
pkg/workflow/mcp_renderer_test.go Adds rendering tests for sessionTimeout presence/absence.
pkg/workflow/mcp_gateway_config.go Propagates engine-level session timeout into gateway runtime config.
pkg/workflow/mcp_gateway_config_test.go Tests propagation behavior from EngineConfig into gateway config.
pkg/workflow/engine.go Extracts engine.mcp.session-timeout into EngineConfig.
pkg/workflow/engine_config_test.go Tests extraction behavior for the new engine mcp field.
pkg/workflow/engine_validation.go Validates duration format and bounds using new constants.
pkg/workflow/engine_validation_test.go Adds validation tests for valid/invalid durations and bounds.
pkg/workflow/compiler_orchestrator_workflow.go Hooks session-timeout validation into the file-based parse pipeline.
pkg/parser/schemas/main_workflow_schema.json Adds engine.mcp.session-timeout to the workflow schema.
pkg/constants/constants.go Introduces min/max duration constants for the new validation.
docs/src/content/docs/reference/mcp-gateway.md Documents sessionTimeout semantics, precedence, and changelog entry.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 13/13 changed files
  • Comments generated: 6

"properties": {
"session-timeout": {
"type": "string",
"description": "Session timeout for MCP gateway sessions as a Go duration string (e.g. \"30m\", \"4h\", \"6h\"). Must be between 5m and 12h. Empty or omitted uses the gateway default (6h). Longer timeouts benefit multi-hour workflows such as large-scale migrations; shorter values free gateway resources sooner.",
Comment on lines +84 to +87
// Validate optional engine.mcp.session-timeout configuration.
if err := c.validateEngineMCPSessionTimeout(workflowData); err != nil {
return nil, fmt.Errorf("%s: %w", cleanPath, err)
}
"session-timeout": {
"type": "string",
"description": "Session timeout for MCP gateway sessions as a Go duration string (e.g. \"30m\", \"4h\", \"6h\"). Must be between 5m and 12h. Empty or omitted uses the gateway default (6h). Longer timeouts benefit multi-hour workflows such as large-scale migrations; shorter values free gateway resources sooner.",
"examples": ["30m", "1h", "4h", "6h", "12h"]
Comment thread pkg/workflow/engine_config_test.go Outdated
Comment on lines +896 to +907
name: "extracts session-timeout using camelCase key",
frontmatter: map[string]any{
"engine": map[string]any{
"id": "copilot",
"mcp": map[string]any{
"sessionTimeout": "30m",
},
},
},
expectedTimeout: "30m",
},
{
| `trustedBots` | array[string] | No | Additional GitHub bot identity strings (e.g., `github-actions[bot]`) passed to the gateway and merged with its built-in trusted identity list. This field is additive — it extends the internal list but cannot remove built-in entries. |
| `keepaliveInterval` | integer | No | Keepalive ping interval in seconds for HTTP MCP backends. Prevents session expiry during long-running tasks. Use `-1` to disable, `0` or unset for gateway default (1500s = 25 min), or a positive integer for a custom interval. |
| `sessionTimeout` | string | No | Session timeout for MCP gateway sessions as a Go duration string (e.g. `"30m"`, `"4h"`, `"6h"`). Empty or omitted uses the gateway default (6h). Must be between 5m and 12h when set by the workflow compiler (infrastructure operators may override via `MCP_GATEWAY_SESSION_TIMEOUT` env var). |
| `opentelemetry` | object | No | OpenTelemetry configuration for emitting distributed tracing events for MCP calls. See Section 4.1.3.6 for details. |
Comment thread pkg/workflow/tools_types.go Outdated
PayloadSizeThreshold int `yaml:"payload-size-threshold,omitempty"` // Size threshold in bytes for storing payloads to disk (default: 524288 = 512KB)
TrustedBots []string `yaml:"trusted-bots,omitempty"` // Additional bot identity strings to pass to the gateway, merged with its built-in list
KeepaliveInterval int `yaml:"keepalive-interval,omitempty"` // Keepalive ping interval in seconds for HTTP MCP backends (0=default 1500s, -1=disabled, >0=custom)
SessionTimeout string `yaml:"session-timeout,omitempty"` // Session timeout for MCP gateway sessions as a Go duration string (e.g. "4h", "30m"); empty = gateway default (6h)
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 80/100

Excellent

Metric Value
New/modified tests analyzed 4
✅ Design tests (behavioral contracts) 4 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 4 (100%)
Duplicate test clusters 0
Test inflation detected Yes (all test files exceed 2:1 ratio vs. production lines added)
🚨 Coding-guideline violations 0

Test Classification Details

Test File Classification Notes
TestEngineMCPSessionTimeoutExtraction engine_config_test.go:873 ✅ Design Table-driven (4 rows); tests both key variants (kebab-case + camelCase) and absent-field edge cases
TestValidateEngineMCPSessionTimeout engine_validation_test.go:404 ✅ Design Table-driven (11 rows); full range of valid durations + 4 error paths (invalid format, too short, too long, bare integer)
TestBuildMCPGatewayConfig (2 new rows) mcp_gateway_config_test.go:372 ✅ Design Verifies session-timeout propagation into gateway config struct + nil-engine edge case
TestRenderJSONMCPConfig_SessionTimeout mcp_renderer_test.go:600 ✅ Design Verifies JSON output contains the field when set and omits it when empty; also asserts exact value

Score Breakdown

Component Score
Behavioral coverage (4/4 design tests) 40 / 40
Error/edge case coverage (4/4 tests) 30 / 30
Low duplication (0 clusters) 20 / 20
Proportional growth (all files > 2:1) 0 / 10
Total 80 / 100

Test inflation note: Every test file has a > 2:1 lines-added ratio relative to the production file it covers (e.g., mcp_renderer_test.go adds 71 lines vs. mcp_renderer.go's 3). This is mechanical because the new feature is spread thinly across many files while each test file adds comprehensive coverage. The tests themselves are high quality; the 10-point deduction is applied per rubric.


Language Support

Tests analyzed:


Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All 4 new/modified tests verify observable behavioral contracts with good edge-case and error-path coverage.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

References: §25178770892

🧪 Test quality analysis by Test Quality Sentinel · ● 620.2K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Test Quality Sentinel: 80/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 4 tests verify behavioral contracts with solid edge-case and error-path coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 47618f6

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review all comments

…ion, fix docs references

- Drop sessionTimeout camelCase alias in engine.go (schema only allows session-timeout)
- Remove camelCase test case from engine_config_test.go
- Add validateEngineMCPSessionTimeout call to ParseWorkflowString (compiler_string_api.go)
- Fix OpenTelemetry table reference: Section 4.1.3.6 -> 4.1.3.7 in mcp-gateway.md
- Update tools_types.go comment to reflect full precedence chain
- Update schema description to mention MCP_GATEWAY_SESSION_TIMEOUT env var precedence

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5441c30c-eea8-47fe-991f-07f56d21b15a

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 30, 2026

@copilot review all comments

Addressed all review comments in b432096:

  • camelCase alias droppedengine.go now only reads session-timeout (kebab-case), matching the schema. The misleading camelCase test case was removed.
  • String-API validationvalidateEngineMCPSessionTimeout is now called from ParseWorkflowString in compiler_string_api.go as well, so Wasm/browser/programmatic usage gets the same validation.
  • OpenTelemetry section reference fixed — table row now points to §4.1.3.7.
  • tools_types.go comment updated to reflect the full precedence chain: stdin config > MCP_GATEWAY_SESSION_TIMEOUT env var > built-in default 6h.
  • Schema description updated to mention the env var override, so the session-timeout property description is self-contained and accurate.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login &#43; &#34;/&#34; &#43; .name 64/pkg/tool/linux_amd64/vet ignore (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo conf�� get --local rgo/bin/sh nore (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv xterm-color git /usr/bin/git b/workflows --local e_modules/.bin/s--show-toplevel git rev-�� --show-toplevel git /usr/bin/git te &#39;**/*.cjs&#39; &#39;*node user.email p/bin/sh git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv set-url origin ache/go/1.25.8/x64/bin/go rkflow/js/**/*.jgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv tags/v4 git sv ons-test40347916git logs/command.sh /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git -bool l /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=e!../../../pkg/wogit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv Pnb4/h53APAPY0wxbJq6pPnb4 c /usr/bin/git - (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git npx prettier --wgit (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv ath ../../../.pr**/*.json (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv ath ../../../.prettierignore (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel /home/REDACTED/worrev-parse /usr/bin/git .js&#39; --ignore-pagit (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv /tmp/TestGuardPolicyBlockedUsersApprovalLabelsCompiledOutput3325709465/001 s/2/artifacts /usr/bin/git remote.origin.urgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --git-dir su /tmp/go-build3800670744/b404/cli.test mLsRemoteWithReagit mLsRemoteWithRearev-parse tions/setup/node--show-toplevel /tmp/go-build3800670744/b404/cli.test -tes�� (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignore --log-level=e!../../../pkg/wogit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git -C /tmp/gh-aw-test-runs/20260430-172227-7365/test-source-field-variant-2730901578/.github/workflowsgit config (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -m initial commit ache/node/24.14.1/x64/bin/node h ../../../.pretgit (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv k/gh-aw/gh-aw/.github/workflows/api-consumption-report.md -3lxG0HoYBiF /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv /tmp/gh-aw-test-runs/20260430-172227-7365/test-1123354278/.github/workflows remote /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv /tmp/gh-aw-test-runs/20260430-172227-7365/test-1123354278/.github/workflows rev-parse /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-04-23 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-03-31 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-01-30 (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name --get x_amd64/vet son (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 --local k/_temp/uv-python-dir/bash credential.helpegit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name --local 64/bin/bash (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 --local x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name --local 1/x64/bin/bash (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 --local cal/bin/bash (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name --get x_amd64/vet son (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 --local x_amd64/vet credential.helpegit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name --get x_amd64/vet son (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 ion-timeout-config cal/bin/bash credential.helpegit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name --get x_amd64/vet son (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 ion-timeout-config x_amd64/compile credential.helpegit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name --get 64/pkg/tool/linux_amd64/compile son (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 ion-timeout-config n-dir/bash credential.helpegit (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build3800670744/b404/cli.test /tmp/go-build3800670744/b404/cli.test -test.testlogfile=/tmp/go-build3800670744/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv tags/v6 bash sv OnlyCompiledOutpgit (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv rite &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-premote.origin.url --local k copilot.originalgit (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -template-expressions.md (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv json&#39; --ignore-path ../../../.pr**/*.json (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv ted-objects.md (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv g_.a --local nfig/composer/vendor/bin/sh copilot.originalgit (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion ignore (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ndor/bin/git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state bin/sh nore (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch get --local bin/node pull.rebase (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from pelikhan April 30, 2026 17:25
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot no MCPSessionTimeoutMax , let it be as high as needed

- Remove MCPSessionTimeoutMax constant from pkg/constants
- Drop upper-bound check from validateEngineMCPSessionTimeout (min 5m only)
- Replace "too long - 13h" test case with "valid duration 24h (no upper bound)"
- Update schema description, docs table, compliance rules, changelog, and ADR to reflect no upper bound

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4b9e19de-6066-4b7e-a4a9-340a513242e1

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 30, 2026

@copilot no MCPSessionTimeoutMax , let it be as high as needed

Done in b4f3831. MCPSessionTimeoutMax constant removed, the upper-bound check dropped from validateEngineMCPSessionTimeout (only the 5m minimum remains), and all references in schema, docs, ADR, and tests updated to reflect no upper bound.

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review all comments

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 30, 2026

@copilot review all comments

All comments are addressed in the current commits. Summary of the complete set:

  1. Schema env var precedence (b432096) — session-timeout description now documents the full precedence chain (this field > MCP_GATEWAY_SESSION_TIMEOUT env var > built-in default 6h).
  2. String-API validation (b432096) — validateEngineMCPSessionTimeout is called from ParseWorkflowString so Wasm/browser paths get the same validation.
  3. camelCase alias dropped (b432096) — only session-timeout (kebab-case) is accepted; schema and extraction are consistent.
  4. Misleading camelCase test removed (b432096) — test file updated to only test the supported kebab-case form.
  5. OpenTelemetry section reference (b432096) — table row updated from §4.1.3.6 to §4.1.3.7.
  6. tools_types.go precedence comment (b432096) — comment reflects the full chain.
  7. MCPSessionTimeoutMax removed (b4f3831) — no upper bound; only 5m minimum enforced; all references in schema, docs, ADR, and tests updated.

@pelikhan pelikhan merged commit 4e8b272 into main Apr 30, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/add-session-timeout-config branch April 30, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support configurable session timeout in workflow frontmatter

4 participants