fix: simplify JSON schema in classify-issue-severity workflow #21241
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the claude-code-action failure by simplifying the JSON schema that was too complex.
Problem
The previous fix (#21240) used a JSON schema with
allOfconditionals,if/thenlogic, andenumconstraints. This complex schema likely caused the claude-code-action to fail during the "Analyze Issue Severity" step.Error from run: https://github.com/coder/coder/actions/runs/20149538756
Solution
Simplified the JSON schema to match patterns used in claude-code-action's test workflows:
Removed complex conditionals
allOf,if/then, orconstchecksenumconstraints forstatusandseveritySimplified to basic schema
statusandreasoningseverityandnext_stepsas optional fieldsImproved formatting
claude_argsfrom single-line to multi-line with|Schema Comparison
Before (complex):
{ "allOf": [ { "if": {"properties": {"status": {"const": "classified"}}}, "then": {"required": ["severity"]} }, ... ], "enum": ["classified", "insufficient_info"], ... }After (simple):
{ "type": "object", "properties": { "status": {"type": "string"}, "severity": {"type": "string"}, "reasoning": {"type": "string"}, "next_steps": {"type": "array", "items": {"type": "string"}} }, "required": ["status", "reasoning"] }References
Supersedes
🤖 Generated with Claude Code