Skip to content

SuggestionRecord lifecycle is binary (submitted only) — no resolved/wontfix states #1874

Description

@Widthdom

Summary

SuggestionRecord (Models/SuggestionRecord.cs:49) tracks only CreatedAt and SubmittedToGitHub (boolean). There are no intermediate lifecycle states (pending review, resolved, won't fix, duplicate-of-N, superseded), no resolution timestamp, and no link to the upstream issue number after submission. Once a suggestion ships, it stays in the local store with submitted=true indefinitely with no signal whether the upstream issue was triaged or closed. Users running cdidx suggestions list (when implemented per just-filed C504) get a perpetually growing flat list with no way to know which entries are still open vs. long-resolved.

Where

  • src/CodeIndex/Models/SuggestionRecord.cs:49 (lifecycle fields)
  • src/CodeIndex/Cli/SuggestionStore.cs (no lifecycle transitions)
  • src/CodeIndex/Mcp/McpToolHandlers.cs:1927-1936 (TryAddAndSubmit — only sets submitted=true)

Suggested approach

(1) Replace SubmittedToGitHub boolean with a Status enum: Draft, SubmittedPendingTriage, OpenInUpstream, ResolvedInUpstream, WontFix, Duplicate, Superseded. Default new entries to Draft, transition to SubmittedPendingTriage on submit. (2) Add UpstreamIssueNumber, UpstreamUrl, LastSyncedAt, ResolvedAt fields. (3) Add a periodic background sync (or cdidx suggestions sync subcommand) that polls the GitHub API for issue state and updates local records. (4) Add a Supersedes / SupersededBy link so newer suggestions can mark older ones as obsolete. (5) Document the lifecycle in USER_GUIDE under "Suggestions" with state transition diagram. (6) Add migration logic for existing suggestion stores: submitted=trueSubmittedPendingTriage on first read. (7) Cross-link with #1618 (CreatedAt timing), #1574 (did-you-mean suggestions), and the just-filed C502/C504/C505 (suggestion query / CLI / submit fallback).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions