use getConvexSize and improve journal mismatch logging#203
use getConvexSize and improve journal mismatch logging#203ianmacartney merged 9 commits intomainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughReplaces custom size helpers with Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
commit: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/client/step.ts (1)
39-42:kind: "workflow"argsis still typedunknown, making the union collapse.Because
args: unknownon theworkflowvariant, TypeScript widens the entiremessage.target.argsunion tounknown(line 154), which forces theas Valueassertion at line 159. Aligning it with thefunctionvariant would let the compiler reason about the type throughout.♻️ Optional: tighten workflow args type
| { kind: "workflow"; function: FunctionReference<"mutation", "internal">; - args: unknown; + args: Record<string, any>; };And align
runWorkflowinworkflowContext.tsto passargs ?? {}consistently withrunFunction:target: { kind: "workflow", function: workflow, - args, + args: args ?? {}, },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client/step.ts` around lines 39 - 42, The workflow branch's args is typed as unknown which widens message.target.args to unknown; change the workflow variant's args type to the same tighter shape used by the function variant (the same param type used by FunctionReference/"mutation"/"internal") so the union doesn't collapse, update any related type alias where kind: "workflow" is declared, and adjust runWorkflow in workflowContext.ts to call runWorkflow with args ?? {} (mirroring runFunction) so callers consistently pass a non-undefined args object; refer to the symbols kind: "workflow", FunctionReference, message.target.args, runWorkflow, and runFunction when making these edits.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/client/step.ts`:
- Around line 39-42: The workflow branch's args is typed as unknown which widens
message.target.args to unknown; change the workflow variant's args type to the
same tighter shape used by the function variant (the same param type used by
FunctionReference/"mutation"/"internal") so the union doesn't collapse, update
any related type alias where kind: "workflow" is declared, and adjust
runWorkflow in workflowContext.ts to call runWorkflow with args ?? {} (mirroring
runFunction) so callers consistently pass a non-undefined args object; refer to
the symbols kind: "workflow", FunctionReference, message.target.args,
runWorkflow, and runFunction when making these edits.
8d0e55c to
8dca168
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/client/workflowContext.ts (1)
166-166:Record<string, any>is inconsistent with theRecord<string, unknown>declared inStepRequest.target.args.
args: Record<string, any> | undefinederases type safety unnecessarily — the value flows directly into aRecord<string, unknown>target. Usingunknownhere keeps the contract tighter.♻️ Align args type with StepRequest
- args: Record<string, any> | undefined, + args: Record<string, unknown> | undefined,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client/workflowContext.ts` at line 166, The args property currently typed as "Record<string, any> | undefined" in workflowContext.ts should be changed to match StepRequest.target.args by using "Record<string, unknown> | undefined" to preserve type safety; locate the args declaration (the args parameter/property in the WorkflowContext/StepRequest-related type or function) and replace the any-based type with unknown so the value flows into StepRequest.target.args without erasing type guarantees.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/client/workflowContext.ts`:
- Line 166: The args property currently typed as "Record<string, any> |
undefined" in workflowContext.ts should be changed to match
StepRequest.target.args by using "Record<string, unknown> | undefined" to
preserve type safety; locate the args declaration (the args parameter/property
in the WorkflowContext/StepRequest-related type or function) and replace the
any-based type with unknown so the value flows into StepRequest.target.args
without erasing type guarantees.

getConvexSizeinstead of bespoke handling - requires convex 1.31.7+