Skip to content

[deep-report] Add DefaultHTTPClientTimeout constant in pkg/constants (13+ days unfixed) #32883

Description

@github-actions

Problem

Four pkg/ sites still hardcode 30 * time.Second HTTP client timeouts. There is no DefaultHTTPClientTimeout constant in pkg/constants, so any tuning requires editing four files.

Sites:

  • pkg/parser/remote_fetch.go:522
  • pkg/cli/agent_download.go:45
  • pkg/cli/mcp_registry.go:50
  • pkg/cli/deps_security.go:139

This is Sergo Run 8 finding #aw_sg8a2, first filed 13+ days ago, still open as of Run 12 (#32753).

Fix

  1. Add const DefaultHTTPClientTimeout = 30 * time.Second to pkg/constants/constants.go (consistent with how MaxEffectiveTokens and DefaultEngine are stored).
  2. Replace all 4 literal sites with the constant.
  3. Add a unit test verifying the constant is the expected value.

Acceptance Criteria

  • Constant defined in pkg/constants
  • All 4 literal sites replaced
  • grep -rn '30 \* time.Second' pkg/ returns zero matches (or only constant definition)
  • Test coverage exists

Suggested Agent

Sergo / Copilot — trivial Go refactor.

Estimated Effort

< 1h


Source: DeepReport Intelligence Briefing 2026-05-17 — pulls from Sergo Run 12 (#32753), originally filed Run 8.

Generated by 🔬 DeepReport - Intelligence Gathering Agent · ● 24.9M ·

  • expires on May 19, 2026, 7:40 PM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions