Skip to content

feat(DCP-2338): Add multiple_choice_with_unit instruction type#287

Merged
ajmalkhan-eng merged 5 commits intomainfrom
DCP-2338-aitb-x-gmu-slice-2-cli-multiple-choice-with-unit-instruction
Jan 28, 2026
Merged

feat(DCP-2338): Add multiple_choice_with_unit instruction type#287
ajmalkhan-eng merged 5 commits intomainfrom
DCP-2338-aitb-x-gmu-slice-2-cli-multiple-choice-with-unit-instruction

Conversation

@ajmalkhan-eng
Copy link
Contributor

Adds support for a new instruction type that combines a value dropdown with a unit selector (e.g., height in CM/inches, weight in KG/lbs).

Changes:

  • Add InstructionTypeMultipleChoiceWithUnit constant
  • Add UnitOption struct with Label and Value fields
  • Add unit_options and default_unit fields to instruction structs
  • Add validation requiring at least 2 unit options
  • Add comprehensive tests for the new instruction type

Adds support for a new instruction type that combines a value dropdown
with a unit selector (e.g., height in CM/inches, weight in KG/lbs).

Changes:
- Add InstructionTypeMultipleChoiceWithUnit constant
- Add UnitOption struct with Label and Value fields
- Add unit_options and default_unit fields to instruction structs
- Add validation requiring at least 2 unit options
- Add comprehensive tests for the new instruction type
@prolific-snyk
Copy link

prolific-snyk commented Jan 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ajmalkhan-eng ajmalkhan-eng marked this pull request as ready for review January 28, 2026 10:01
@ajmalkhan-eng ajmalkhan-eng requested a review from a team as a code owner January 28, 2026 10:01
script-this
script-this previously approved these changes Jan 28, 2026
Copy link
Contributor

@script-this script-this left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coupla suggestion otherwise LGTM. ✅

- Make default_unit required for multiple_choice_with_unit instructions
- Extract workspace_id to top-level const with standard test ID format
- Add test case for missing default_unit validation
@ajmalkhan-eng ajmalkhan-eng merged commit 0811b31 into main Jan 28, 2026
4 checks passed
@ajmalkhan-eng ajmalkhan-eng deleted the DCP-2338-aitb-x-gmu-slice-2-cli-multiple-choice-with-unit-instruction branch January 28, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants