Skip to content

Fix: --fields.description and --parameters.description truncated at first comma#3464

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-field-descriptions-comma-issue
Draft

Fix: --fields.description and --parameters.description truncated at first comma#3464
Copilot wants to merge 2 commits intomainfrom
copilot/fix-field-descriptions-comma-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Why make this change?

--fields.description splits description strings on commas, silently truncating any description containing one. For example:

dab update Products --fields.name "RecordIsActive" \
  --fields.description "Indicates whether the record is active. When false, the record may be historical"

Produces in dab-config.json:

{ "name": "RecordIsActive", "description": "Indicates whether the record is active. When false" }

This is particularly impactful for MCP scenarios where rich field descriptions are critical for LLM context.

What is this change?

fields.description and parameters.description in EntityOptions.cs were declared with Separator = ',', causing the CommandLine library to tokenize the description value on every comma.

  • Removed Separator = ',' from [Option("fields.description")]
  • Removed Separator = ',' from [Option("parameters.description")]
  • Updated help text to clarify descriptions may contain commas
  • Added TestUpdateFieldDescriptionWithCommas covering both comma-containing and plain descriptions

Multiple fields are specified by running one dab update call per field — the established pattern used throughout the existing samples. Each invocation accumulates into the entity's fields array in the config:

dab update Products --fields.name "RecordIsActive" --fields.description "Indicates whether the record is active. When false, the record may be historical"
dab update Products --fields.name "RecordIsSold" --fields.description "Indicates whether the record has been sold, with details, etc."

How was this tested?

  • Integration Tests
  • Unit Tests

Sample Request(s)

# Now correctly preserves the full description including commas
dab update Products \
  --fields.name "RecordIsActive" \
  --fields.description "Indicates whether the record is active. When false, the record may be historical and still exist, but is no longer actively used. Type: boolean"

Result in dab-config.json:

{
  "name": "RecordIsActive",
  "description": "Indicates whether the record is active. When false, the record may be historical and still exist, but is no longer actively used. Type: boolean",
  "primary-key": false
}

Copilot AI changed the title [WIP] Fix field descriptions to handle commas in strings Fix: --fields.description and --parameters.description truncated at first comma Apr 23, 2026
Copilot AI requested a review from Aniruddh25 April 23, 2026 23:10
@Aniruddh25
Copy link
Copy Markdown
Collaborator

@copilot, how would multiple fields be specified in the command line if the separator , is removed?

For example, when there are 2 fields, how do I specify the description for RecordIsSold?
dab update Products --fields.name "RecordIsActive, RecordIsSold" --fields.description "Indicates whether the record is active. When false, the record may be historical"

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 24, 2026

@copilot, how would multiple fields be specified in the command line if the separator , is removed?

For example, when there are 2 fields, how do I specify the description for RecordIsSold?
...

The intended design (as shown in the existing Aspire sample) is to run one dab update per field:

dab update Products --fields.name "RecordIsActive" --fields.description "Indicates whether the record is active. When false, the record may be historical"
dab update Products --fields.name "RecordIsSold" --fields.description "Indicates whether the record has been sold, with comma, etc."

Each call accumulates into the entity's fields array in the config. The comma separator on fields.description was not intentional — descriptions are free-form text that naturally contain commas, and the samples never showed a multi-field-per-invocation pattern. The fix keeps the established one-field-per-command usage working correctly while unblocking descriptions with commas.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Field descriptions cannot handle a comma in the string

2 participants