Skip to content

test(frontend): cover five small service and component gaps - #7988

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:cov/frontend-service-small-gaps
Open

test(frontend): cover five small service and component gaps#7988
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:cov/frontend-service-small-gaps

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Five small frontend gaps, bundled because each is only 3-4 lines alone.

Measured with the whole frontend suite on both sides — no --include and no name filter, so there is no false attribution — reading frontend/coverage/gui/lcov.info. The before state was the five specs restored to HEAD via git show HEAD:<exact single path>, hash-verified against scratch copies.

File Codecov-missed lcov detail
workflow-util.service.ts 4 → 0 lines 66/70 → 70/70; functions 13/18 → 18/18
breakpoint-condition-input.component.ts 4 → 0 branches 28/33 → 33/33; functions 7/8 → 8/8
workflow-version.service.ts 4 → 2 branches 55/59 → 57/59
user-config.service.ts 4 → 3 branches 30/33 → 31/33
nz-modal-comment-box.component.html branch arms closed

+15 fully-covered lines and +12 branch arms.

The one worth pointing at is workflow-util.service.ts: five of its eighteen functions had zero calls — four zero-caller methods plus a map lambda — behind a 94.6% line figure. That is the fourth time in this campaign the function counter found a gap the line counter hid.

Verification

38 mutations, all 38 killed, every one dying on behaviour rather than a compile error (a junit.xml was produced on all 38 runs, so the bundle compiled every time).

The first draft claimed "all 22 mutants killed, every one of the 17 new tests individually mutation-proven". At least ten semantic mutants were alive against it.

One survivor appeared during this pass and was fixed rather than dropped: the Enter-key twin of a creatorName-argument hole survived 26/26 after the first repair, because only the button path had been hardened. Both paths are now pinned.

Three of the first draft's claims were corrected:

  • A branch-count improvement on the comment-box template was presented as covering the [disabled] guards. Reading the raw records shows it did not.
  • One kill was mis-credited: under that mutant the test dies at TestBed.inject, before any assertion runs.
  • One reported failure message belonged to a different test than the row it was attached to.

Deliberately not included

Three regions are dead, and no mutant was attempted in them because one would survive vacuously: workflow-version.service.ts's else-arms at lines 174 and 198, and user-config.service.ts's private updateEntry guards.

One measurement subtlety is worth recording because it makes two honest counts disagree by one: for a multi-line statement in breakpoint-condition-input.component.ts, lcov emits BRDA:59,... with no DA:59 — that statement's line record is DA:58. A DA-restricted count reads 3 → 0 and a union count reads 4 → 0. Both reach zero, so the conclusion is unaffected, but the rule needs stating.

No production file is touched. The worktree used a real yarn install, not a node_modules junction — a junction is what emptied the main checkout's dependencies twice earlier in this campaign, since a recursive delete follows it and also reaches through yarn's portal link into frontend/tools/jschardet-stub.

Any related issues, documentation, discussions?

Closes #7986

How was this PR tested?

npx ng test --watch=false --include="**/workflow-util.service.spec.ts" --include="**/user-config.service.spec.ts" --include="**/workflow-version.service.spec.ts" --include="**/breakpoint-condition-input.component.spec.ts" --include="**/nz-modal-comment-box.component.spec.ts"
 Test Files  5 passed (5)

yarn format:ci passes. frontend/junit.xml and frontend/coverage/ are regenerated by every run and are not committed.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

Five files, each only 3-4 lines alone: +15 fully-covered lines and +12
branch arms, measured over the whole suite on both sides so there is no
false attribution.

The one worth pointing at is workflow-util.service.ts, where five of
eighteen functions had zero calls -- four zero-caller methods plus a map
lambda -- behind a 94.6% line figure. Fourth time in this campaign the
function counter found what the line counter hid.

38 mutations, all killed. The first pass claimed 22 killed and every test
individually proven; at least ten semantic mutants were alive against it.
One survivor appeared during the repair -- the Enter-key twin of a
creatorName hole -- and was fixed rather than dropped.

Three dead regions are left alone and named, since a mutant there would
survive vacuously.
Copilot AI lite review requested due to automatic review settings August 26, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Ma77Ball, @kunwp1
    You can notify them by mentioning @Ma77Ball, @kunwp1 in a comment.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.18%. Comparing base (7fbf64e) to head (e4ba3cf).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7988      +/-   ##
============================================
+ Coverage     93.14%   93.18%   +0.04%     
  Complexity     4654     4654              
============================================
  Files          1174     1174              
  Lines         47580    47580              
  Branches       5316     5316              
============================================
+ Hits          44318    44339      +21     
+ Misses         1785     1772      -13     
+ Partials       1477     1469       -8     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 7fbf64e
agent-service 99.32% <ø> (ø) Carriedforward from 7fbf64e
amber 89.23% <ø> (ø) Carriedforward from 7fbf64e
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 7fbf64e
config-service 86.73% <ø> (ø) Carriedforward from 7fbf64e
file-service 85.56% <ø> (ø) Carriedforward from 7fbf64e
frontend 95.75% <ø> (+0.10%) ⬆️
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 7fbf64e
pyamber 97.57% <ø> (ø) Carriedforward from 7fbf64e
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 7fbf64e

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan
aglinxinyuan requested a review from mengw15 August 26, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cover five small frontend service and component gaps

3 participants