feat: update test flow schema and remove two unnecessary test flow tables#18
Open
Karim-Agami wants to merge 1 commit into
Open
feat: update test flow schema and remove two unnecessary test flow tables#18Karim-Agami wants to merge 1 commit into
Karim-Agami wants to merge 1 commit into
Conversation
🧪 Test & Coverage Report
Coverage
|
Mo2Hefny
requested changes
Jun 17, 2026
| transition: z.record(z.string(), z.unknown()).nullable(), | ||
| }); | ||
|
|
||
| export const SerializedFlowSchema = z.object({ |
Member
There was a problem hiding this comment.
Schemas should be a contract in the coverit-contracts and added to the models/ folder instead of creating them using zod.
|
|
||
| export async function saveAllFlows( | ||
| sessionId: string, | ||
| payload: AllFlowsPayload, |
Member
There was a problem hiding this comment.
SerializedFlow and AllFlowsPayload may be redundant after adding the contracts and just using the same contract you will use for the schema as a type here.
| ); | ||
| } | ||
| if (flowsToInsert.length === 0) { | ||
| logger.info(`No flows to save for session ${sessionId}`); |
Member
There was a problem hiding this comment.
This should be an error and add a constants file for the errors/messages.
| `Saved flows for session ${sessionId}: ` + | ||
| `${stepsByFingerprint.size} unique steps, ` + | ||
| `${Object.values(payload).flat().length} total flows`, | ||
| `Saved flows for session ${sessionId}: ${flowsToInsert.length} total flows saved in bulk.`, |
Member
There was a problem hiding this comment.
Return a Promise<MessageResponse> and add types to the functions declaration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…e testflow table