Skip to content

[PROD RELEASE] - Jan 26#27

Merged
jmgasper merged 1 commit into
masterfrom
develop
Feb 5, 2026
Merged

[PROD RELEASE] - Jan 26#27
jmgasper merged 1 commit into
masterfrom
develop

Conversation

@kkartunov

Copy link
Copy Markdown
Contributor

No description provided.

@kkartunov kkartunov requested a review from jmgasper February 4, 2026 12:56
const openPhasesRequiringScorecards = (challengeDetails.phases ?? []).filter(
const openPhasesRequiringScorecards = (
challengeDetails.phases ?? []
).filter(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 readability]
The parentheses around challengeDetails.phases ?? [] are unnecessary and can be removed for cleaner code. This change does not affect functionality but improves readability.

return true;
} catch (error) {
const err = error as any;
const err = error;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Casting the error to any was removed, which is generally good for type safety. However, ensure that the error handling logic correctly handles all expected error types, as removing the cast might lead to type errors if error is not of the expected shape.

return true;
} catch (error) {
const err = error as any;
const err = error;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 maintainability]
Casting error to any was removed, but consider using a more specific error type if possible. This can help with type safety and clarity when handling errors.

type KafkaModule = typeof import('@platformatic/kafka');

// eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
// eslint-disable-next-line @typescript-eslint/no-implied-eval

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 maintainability]
The removal of no-new-func from the ESLint disable comment could reintroduce a linting error if the rule is enabled in the future. Consider keeping it unless you are certain it won't be re-enabled.

return response.data;
} catch (error) {
const err = error as any;
const err = error;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Casting error to any was removed, which is generally fine, but ensure that the error object is consistently structured across different environments and error types. If error can be of different types, consider using a more specific type or interface to handle it safely.

return Array.isArray(response.data) ? response.data : [];
} catch (error) {
const err = error as any;
const err = error;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Similar to the change on line 95, removing the any cast from error is acceptable, but ensure that the error object is consistently structured. If there are different error types, consider using a more specific type or interface to handle it safely.

prismaMock.$queryRaw
.mockResolvedValueOnce([
buildReviewSummationRow({
aggregateScore: '24.03',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The aggregateScore is being set as a string ('24.03') but is later compared as a number in the test expectations. This could lead to unexpected behavior if not consistently handled as a number throughout the code. Consider ensuring that aggregateScore is consistently treated as a number to avoid potential type-related issues.

const passingScore = this.resolvePassingScore(row.minimumPassingScore);
const isPassing =
typeof row.isPassing === 'boolean'
const isPassing = hasAggregateScore

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The logic for determining isPassing has changed. Previously, it defaulted to aggregateScore >= passingScore if row.isPassing was not a boolean. Now, it defaults to false. Ensure this change is intentional and does not affect the expected behavior.

@jmgasper jmgasper merged commit 0423d4c into master Feb 5, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants