Fix/create testcase case type#346
Conversation
createTestCase never accepted case_type as an input, so values passed by
clients were silently dropped and the project default ("Other") was
applied. Add case_type to the schema and normalize it alongside priority
via a single form-fields lookup, matching updateTestCase behavior.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9bd1cb5 to
ad9d1a1
Compare
SavioBS629
left a comment
There was a problem hiding this comment.
Claude Code Review (automated) — 1 inline finding(s). Full report in the PR comment below. Verdict: Passed.
| case_type: z | ||
| .string() | ||
| .optional() | ||
| .describe( |
There was a problem hiding this comment.
[Low] .describe() exceeds the 120-char ceiling
This description is ~205 chars; tool-design.md sets a 120-char hard ceiling (target 60). It also encodes a defaulting rule in prose and lists internal names the handler's normalizeDefaultFieldValue already maps. It loads into every client's context on connect. Consistent with the already-over-budget priority field above, but that isn't a reason to add another.
Suggestion: Trim to ~60 chars, e.g. "Test case type display or internal name (per-project). Omit for project default." — and ideally trim priority in the same pass.
Reviewer: stack:code-reviewer
Claude Code PR ReviewPR: #346 • Head: ad9d1a1 • Reviewers: stack:code-reviewer SummaryFixes a customer bug where Review Table
Findings
Raised by other reviewers (not independently confirmed)
Verdict: PASS — small, well-tested, pattern-consistent fix; no blocking issues. Findings are Low-severity cleanups (trim descriptions, dedupe helper, add a v1-path test) suitable as follow-ups. |
…e_type prompt - Extract normalizeDefaultFields into TCG-utils/api.ts, shared by createTestCase and updateTestCase (removes the duplicated per-file helper; update keeps its automation_status quirk in the shared impl). - Trim the case_type .describe() to ~80 chars, under the tool-design 120 ceiling. - Add a test asserting normalized case_type reaches the v1 create body when template_id is set. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
No description provided.