Commit 2721c10
fix: add fallback extraction for classify-issue-severity workflow
The structured_output field is not consistently available in the result
message, causing the workflow to fail with "Result exists: false".
Root cause analysis:
- structured_output only appears in result messages when the conversation
completes successfully with subtype "success"
- In GitHub Actions, the conversation may hit errors, permissions issues,
or other failures that prevent successful completion
- When this happens, the StructuredOutput tool is called but the result
message doesn't include the structured_output field
Solution - Implement robust fallback chain:
1. Try structured_output first (ideal path when it works)
2. Fall back to extracting from StructuredOutput tool call in execution file
3. Add debugging to show what messages exist for troubleshooting
This approach handles both the happy path and the edge cases where
structured_output isn't populated, ensuring the workflow works reliably.
Changes:
- Renamed step to "Extract Result with Fallback"
- Added EXECUTION_FILE environment variable
- Implement two-tier extraction:
* Primary: Use structured_output if available
* Fallback: Parse StructuredOutput tool call from execution file
- Added diagnostic output showing message types
- Improved error messages with emojis for clarity
Fixes workflow run: https://github.com/coder/coder/actions/runs/20149903506
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 8249ac8 commit 2721c10
1 file changed
+43
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | | - | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
152 | 191 | | |
153 | 192 | | |
154 | 193 | | |
155 | | - | |
156 | 194 | | |
157 | 195 | | |
158 | | - | |
| 196 | + | |
159 | 197 | | |
160 | 198 | | |
161 | 199 | | |
| |||
0 commit comments