aglinxinyuan opened a new pull request, #7957:
URL: https://github.com/apache/texera/pull/7957

   ### What changes were proposed in this PR?
   
   `dataset-detail.component.spec.ts` goes from 195 tests to 203, closing the 
residue left after an earlier pass — mostly the upload-progress paths.
   
   Measured from raw lcov counters, same spec filter on both sides, `rm -rf 
coverage` between runs:
   
   | Counter | Before | After |
   |---|---|---|
   | Lines hit | 412/414 | **414/414 = 100%** |
   | Branch arms | 193/203 = 95.1% | **200/203 = 98.5%** (10 missed → 3) |
   | Functions | 120/120 | 120/120 |
   | Codecov's metric | 411/422 = 97.4% | **420/422 = 99.5%** |
   
   Functions were already 120/120 with zero `FNDA:0` records both before and 
after — worth stating, because twice in this campaign a file sat at high line 
coverage with functions uncovered and a binding whose handler the spec called 
directly stayed `FNDA:0` while looking covered. Not the case here.
   
   ### Verification
   
   16 mutations, **all 16 killed**, each named in the mutation table with its 
exact failure message.
   
   The first draft reported no survivors. **Seven mutants survived its 202-test 
suite with exit 0** — including `.pop()` → `.shift()`, replacing a computed 
time-zone name with `""`, and several progress-index substitutions. All now 
die, and the search space additionally includes one mutant added on a fresh 
axis (the `", "` separator).
   
   Stated with the scope the reviewer correctly insisted on: **this reports the 
search space, not a proof about the file.** Sixteen mutants died; that is not 
the same claim as "the file is mutation-complete".
   
   Three repairs are worth naming because the original tests looked fine:
   
   - **The time-zone test was degenerate**, asserting on whatever the runner's 
ambient `Intl` formatter produced. It now stubs the formatter, so the assertion 
is about the component's own `.split(", ").pop()` parsing rather than the 
platform's output — and a second test covers the separator.
   - **Two single-index tests passed trivially.** "Ignores a hide request for a 
row that is gone" and the basename test each now assert a valid-index half 
alongside the invalid one, so an index substitution cannot slip through.
   - One reported failure mode was simply wrong and is rewritten: a mutant was 
described as surfacing a `TypeError` through a `.not.toThrow()` assertion, when 
the emission actually carries a valid percentage.
   
   ### Deliberately not included
   
   Two lines with three branch arms remain, and both are refused for the same 
reason: `percentage: progress.percentage ?? 
this.uploadTasks[taskIndex].percentage ?? 0` (line 647) and its twin in the 
error handler (line 678) fall through a `??` whose right operand no caller can 
produce. Verified in the final lcov — line 647 is hit 28 times with both arms 
at zero.
   
   After this bundle those are the **only** two lines in the file still 
carrying a missed arm, and the zero-hit set is empty.
   
   Also recorded honestly: **three** of the tests pin defensive paths 
production cannot reach (the first draft said two). They are kept because they 
document the guards, not because they earn coverage.
   
   No production file is touched, and the `node_modules` junction used for the 
run was removed before committing.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7955
   
   ### How was this PR tested?
   
   ```
   npx ng test --watch=false --include="**/dataset-detail.component.spec.ts"
   ```
   
   ```
    Test Files  1 passed (1)
   ```
   
   `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)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to