CedarCopilot wants to merge 1 commit into staging from fix/board-result-parse-not-cast
Libra ran this behavior against the change and confirmed the check detects when it breaks.
Libra ran this behavior against the change and confirmed the check detects when it breaks.
Changed code: boardTool.ts.
Live on prod, 0 of 4 surfaces working, 2 days left
Libra found 4 production surfaces on prod but could not judge any of them yet. 4 surfaces had no requests at all. Libra checks hourly for 3 days after each deploy.
Follow-up to #2896, which merged while this last fix was still in review.
Greptile flagged two as casts that PR added, both against CLAUDE.md's NEVER cast rule and both at exactly the boundary the rule exists for.
message.result as BoardCreateResult in the board result badge. A tool result off the wire is genuinely untyped , the assertion was the compiler agreeing with a guess the server is free to invalidate, which is the shape of the PipelineWidget crash CLAUDE.md cites. Parsed with zod instead, and .catch({}) rather than a throw: a badge that cannot read its own result should render nothing, not take the transcript down through the error boundary.requestContext.get('runId') as string | undefined in boardTool, narrowed with a typeof check. The older casts on that same object are left alone , they predate this work.No behaviour change: every access was already optional-chained, so a malformed payload rendered a disabled badge before and still does. The difference is that it is now checked at runtime rather than asserted away.
turbo run types (both packages) โ
oxlint@1.78.0 --deny-warnings โ
vitest run src/mastra/tools/document/ , 219 passed โ
jest tests/modules/cedar-os , 38 passed โ
๐ค Generated with Claude Code
The PR appears safe to merge, with no actionable correctness, security, or repository-rule issues identified.
This PR replaces two unsafe type assertions at untyped runtime boundaries.
Reviews (1) ยท Last reviewed commit: "fix(greptile): parse the board tool resu..."
| Surface | Requests | Errors | p95 | Users | Verdict |
|---|---|---|---|---|---|
| /api/trpc/boards.listCards | 0 โ 0 | 0 โ 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| POST /api/trpc/boards.listCards | 0 โ 0 | 0 โ 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| execute_tool board | 0 โ 0 | 0 โ 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| trpc.boards.listCards | 0 โ 0 | 0 โ 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |