Summary
Runtime validation accepts newer suggestion categories, but generated Bash, zsh, fish, and PowerShell completions still advertise only the older category set.
Accepted but omitted values include:
security
performance
bug
cleanup
documentation
feature_request
Reproduced with locally built cdidx v1.45.1 at 81861a14c9396cd74190edc91392ab11abfa86f8.
Reproduction
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll suggestions add \
"dogfood" --category security --db <db> --json
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll help suggestions add
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll completions bash
The add command and detailed help recognize 14 categories. Generated completions expose the older eight.
Expected behavior
Parser validation, help/schema introspection, MCP metadata, and all generated shells expose the same authoritative category set and stable order.
Existing issue relationship
This is a regression/follow-up to:
Root-cause pointers
src/CodeIndex/Models/SuggestionRecord.cs:175-190 contains the canonical accepted set.
src/CodeIndex/Cli/CliFlagSchema.cs:644 contains a stale hard-coded subset.
src/CodeIndex/Mcp/McpToolCatalog.cs:831-832 already consumes the canonical set.
PR scope and implementation guidance
- Define the public category domain once and share it across validation, help, CLI schema, MCP metadata, and shell renderers.
- Avoid a per-shell patch or another copied list.
- Preserve stable serialized spellings, especially
feature_request.
- Add a contract test proving every advertised category is accepted and every accepted public category is advertised.
- Keep stored suggestions and export/import compatibility unchanged.
Acceptance criteria
- Runtime, root/command help, schema metadata, MCP, and all four generated shells expose the same category set and order.
- Every suggested category succeeds in
suggestions add.
- Invalid categories remain rejected with bounded guidance.
- Existing persisted records and exports remain compatible.
Tests, documentation, and changelog
Summary
Runtime validation accepts newer suggestion categories, but generated Bash, zsh, fish, and PowerShell completions still advertise only the older category set.
Accepted but omitted values include:
securityperformancebugcleanupdocumentationfeature_requestReproduced with locally built cdidx v1.45.1 at
81861a14c9396cd74190edc91392ab11abfa86f8.Reproduction
The add command and detailed help recognize 14 categories. Generated completions expose the older eight.
Expected behavior
Parser validation, help/schema introspection, MCP metadata, and all generated shells expose the same authoritative category set and stable order.
Existing issue relationship
This is a regression/follow-up to:
Root-cause pointers
src/CodeIndex/Models/SuggestionRecord.cs:175-190contains the canonical accepted set.src/CodeIndex/Cli/CliFlagSchema.cs:644contains a stale hard-coded subset.src/CodeIndex/Mcp/McpToolCatalog.cs:831-832already consumes the canonical set.PR scope and implementation guidance
feature_request.Acceptance criteria
suggestions add.Tests, documentation, and changelog
changelog.d/unreleased/fragment referencing Expand suggestion categories for security, performance, bug, cleanup, and feature findings #4423 and Add contextual enum-value completions consistently across all shells #4426.