Skip to content

refactor(template): remove dead Timeout field from template structs #493

Description

@lizhengfeng101

Description

PR #474 removed the per-task timeout logic from executeReviewFilter and ReLocateComment, along with the "timeout" values in task_template.json. However, the Timeout struct fields and the copy logic were left behind as dead code.

Currently the code still:

  1. Declares Timeout int on both manifestConversation and LlmConversation structs
  2. Copies the (always-zero) value in resolveConversation: conv := LlmConversation{Timeout: m.Timeout}
  3. Asserts on the zero value in template_test.go

Since there is no custom-template loading mechanism (templates are //go:embed-only), these fields serve no purpose.

Scope

  • File: internal/config/template/template.go
    • Remove Timeout int from manifestConversation (line 57)
    • Remove Timeout int from LlmConversation (line 217)
    • Simplify resolveConversation to not copy Timeout (line 73)
  • File: internal/config/template/template_test.go
    • Remove the Timeout == 0 assertion

Acceptance Criteria

  • Timeout field removed from both manifestConversation and LlmConversation
  • resolveConversation no longer references Timeout
  • Test assertion for Timeout removed
  • Tests pass (make test)
  • Code check passes (make check)

Context

Discovered during review of #474. The PR intentionally left struct fields in place to keep scope minimal; this issue tracks the follow-up cleanup.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions