Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

The schema defines minimum: 1 for both tools.timeout and tools.startup-timeout, but runtime extraction in frontmatter_extraction_metadata.go accepted any integer value, including zero and negatives.

Changes

  • Modified extraction functions to validate minimum values and return errors for values < 1:

    • extractToolsTimeout(tools map[string]any) (int, error)
    • extractToolsStartupTimeout(tools map[string]any) (int, error)
  • Updated call sites in compiler_orchestrator.go to handle validation errors

  • Error messages follow existing patterns with actionable examples:

    tools.timeout must be at least 1 second, got 0. Example:
    tools:
      timeout: 60
    

Rationale

Provides defense-in-depth alongside schema validation. Catches invalid values during tools config processing even when schema validation is bypassed (e.g., through imports or programmatic construction).

Original prompt

This section details on the original issue you should resolve

<issue_title>[deep-report] Enforce minimum validation for tools.timeout and tools.startup-timeout</issue_title>
<issue_description>### Description
The schema defines minimum values for tools.timeout and tools.startup-timeout, but runtime validation does not enforce those constraints. Add minimum checks during tools config processing so 0/negative values are rejected with actionable errors.

Expected Impact

Aligns runtime behavior with schema constraints, preventing invalid timeouts that could cause MCP startup or tool execution failures.

Suggested Agent

Workflow Validation Agent

Estimated Effort

Fast (< 30 min)

Data Source

DeepReport Intelligence Briefing - 2026-01-23 (see discussion #11412)

AI generated by DeepReport - Intelligence Gathering Agent

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 23, 2026 19:09
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add minimum validation for tools.timeout and tools.startup-timeout Enforce minimum value validation for tools.timeout and tools.startup-timeout Jan 23, 2026
Copilot AI requested a review from pelikhan January 23, 2026 19:20
@pelikhan pelikhan marked this pull request as ready for review January 23, 2026 19:26
@pelikhan pelikhan merged commit bfd3317 into main Jan 23, 2026
117 checks passed
@pelikhan pelikhan deleted the copilot/enforce-minimum-timeout-validation branch January 23, 2026 19:32
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.

[deep-report] Enforce minimum validation for tools.timeout and tools.startup-timeout

2 participants