Skip to content

td comment/review: short issue ids fail FK-787 (normalize missing on insert) #199

@dallascrilley

Description

@dallascrilley

Repro (v0.44.0 and v0.45.0)

td comment ea7757 "x"     # FK-787
td comment td-ea7757 "x" # OK
td review ea7757          # FK-787 on auto-handoff insert

Root cause

GetIssue normalizes via NormalizeIssueID, but CLI insert paths pass the raw args[0]:

  • cmd/tree.go commentCmd / commentsAddCmd: comment.IssueID = issueID instead of issue.ID from GetIssue
  • cmd/review.go: newAutoReviewHandoff(issueID, ...) uses raw arg; GetLatestHandoff(issueID) same

API path HandleAddComment already uses issue.ID correctly (internal/serve/handlers_write.go:690).

Suggested fix

Use canonical issue.ID after GetIssue, or call db.NormalizeIssueID in AddComment/AddHandoff at DB layer.

Workaround

Always pass full td-xxxxxx ids to td comment and td review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions