Skip to content

fix: add explicit error hint for coverage threshold failures in frontend test step#17937

Merged
FelixMalfait merged 2 commits intomainfrom
test-failure
Feb 14, 2026
Merged

fix: add explicit error hint for coverage threshold failures in frontend test step#17937
FelixMalfait merged 2 commits intomainfrom
test-failure

Conversation

@mabdullahabaid
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 13, 2026

Greptile Overview

Greptile Summary

Adds a helpful error step to the CI workflow that provides explicit guidance when frontend tests fail due to coverage threshold issues. When the test task fails, developers now see a clear message explaining that coverage thresholds might not be met and instructions to debug locally using npx nx run twenty-front:test:ci. This improves developer experience by making a common failure scenario (passing tests but failing coverage) more transparent and actionable.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a simple, non-invasive addition to the CI workflow that only adds a helpful error message step. It doesn't modify any existing behavior, only runs on failure conditions, and provides clear guidance to developers. The change is well-scoped, follows YAML syntax correctly, and enhances developer experience without introducing any functional risks.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/ci-front.yaml Adds helpful error message for coverage threshold failures in frontend test step - improves developer experience with clear debugging instructions

Last reviewed commit: 9f95577

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

run: |
echo "::error::The test task failed. If no individual test is failing, this is likely a coverage threshold not being met."
echo ""
echo "To debug locally, run: npx nx run twenty-front:test:ci"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The CI error message suggests npx nx run twenty-front:test:ci for local debugging, which doesn't replicate the CI's nx affected behavior, potentially masking issues.
Severity: MEDIUM

Suggested Fix

Update the CI workflow's error message to provide a command that more accurately replicates the CI environment. A more accurate command would be npx nx affected --configuration=ci -t=test --exclude='*,!tag:scope:frontend' which uses nx affected to mirror the CI's behavior of testing only impacted files.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/ci-front.yaml#L208

Potential issue: The CI workflow for frontend tests uses `nx affected` to run tests only
on changed files. However, if a test fails, the error message suggests developers run
`npx nx run twenty-front:test:ci` locally. While this command is valid, it runs tests on
the entire project, not just the affected files. This discrepancy can lead to situations
where a failure, such as not meeting a coverage threshold, cannot be reproduced locally,
causing confusion and wasted debugging time for developers. The local test run might
pass while the CI continues to fail.

@FelixMalfait FelixMalfait added this pull request to the merge queue Feb 14, 2026
Merged via the queue into main with commit 4f903fa Feb 14, 2026
62 checks passed
@FelixMalfait FelixMalfait deleted the test-failure branch February 14, 2026 09:28
@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫

node failed.

Log

Details
�[31mError: �[39m SyntaxError: Unexpected token 'C', "Contributo"... is not valid JSON
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:4259:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:6882:27)�[39m
�[90m    at readAllBytes (node:internal/deps/undici/undici:5807:13)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)�[39m
danger-results://tmp/danger-results-28b240f6.json

Generated by 🚫 dangerJS against 62c371d

@twenty-eng-sync
Copy link
Copy Markdown

Hey @mabdullahabaid! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

1 similar comment
@twenty-eng-sync
Copy link
Copy Markdown

Hey @mabdullahabaid! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants