Skip to content

feat(triage): add runtime validation for decision field in parseDecisions#181

Merged
keinstn merged 2 commits into
developfrom
agent/keinstn__baton-168
Jun 24, 2026
Merged

feat(triage): add runtime validation for decision field in parseDecisions#181
keinstn merged 2 commits into
developfrom
agent/keinstn__baton-168

Conversation

@keinstn

@keinstn keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a VALID_DECISIONS constant and runtime check in parseDecisions (scripts/triage/parse.ts) that throws a descriptive error when decision is missing or not one of ready|not_ready|needs_clarification
  • Follows the existing d.number error style
  • Adds a matching test case in test/triage-parse.test.ts

Closes #168

Test plan

  • npm run test — all 357 tests pass including new throws when decision.decision is not a valid value
  • npm run typecheck — clean

🤖 Generated with Claude Code

…ions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread scripts/triage/parse.ts Outdated
@keinstn

keinstn commented Jun 24, 2026

Copy link
Copy Markdown
Owner Author

[Baton Reviewer] Review: pass
Managed by Baton; do not edit the marker line manually.


All acceptance criteria are met:

  • VALID_DECISIONS constant and runtime check added in parseDecisions (scripts/triage/parse.ts)
  • Error thrown when decision is missing or not one of the three valid values, with descriptive message following existing style
  • Test case added in test/triage-parse.test.ts mirroring the decision.number pattern
  • CI: Lint, Typecheck, and Test (ubuntu-latest) all pass

The prior formatting finding (multi-line VALID_DECISIONS array) has been resolved in the second commit. PR is ready for human review.

…i-line style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@keinstn keinstn self-assigned this Jun 24, 2026
@keinstn
keinstn merged commit 9cddd9b into develop Jun 24, 2026
4 checks passed
@keinstn
keinstn deleted the agent/keinstn__baton-168 branch June 24, 2026 22:53
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.

Add runtime validation for decision field in parseDecisions

1 participant