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

   ### What changes were proposed in this PR?
   
   `test_operator.py` goes from 32 tests to 44, covering 
`SourceOperator.on_finish` and `BatchOperator`'s output-conversion arms.
   
   | Metric | Before | After |
   |---|---|---|
   | Codecov fully-covered lines **today** | 173/183 | **178/183** |
   | Codecov fully-covered lines **after #8040** | 171/183 | **178/183** |
   | Branch arms | 26/30 | **30/30** |
   
   **+5 fully-covered lines today, +7 after #8040, and the file reaches 100% 
branch coverage.** Lines 233 and 234 are line-hit with one arm untaken, so 
today's branch-less CI report already scores them covered; closing their second 
arm is mutation-proven but invisible until #8040 lands.
   
   **This is a small PR and I would rather say so than dress it up.** What 
makes it worth having is that it closes the file permanently: the five 
remaining gap lines (153, 177, 259, 293, 515) are `@abstractmethod` bodies, and 
a grep of `src/main/python` for 
`super().process_tuple|produce|process_batch|process_table|condition` finds 
**zero** production call sites. 178/183 is the ceiling, so nobody needs to 
re-derive this target.
   
   **Scope narrowed during assessment, and the original plan is worth 
recording.** This began as a three-file bundle also covering the four concrete 
partitioners and `proxy_server.py`. Both were dropped on measurement: the 
partitioners' base class is bare-`pass` stubs, and `proxy_server.py` is already 
at 90/95 with a 268-line spec, leaving 2 honest lines. Only `operator.py` 
survived.
   
   ### What matters about the two covered paths
   
   `SourceOperator.on_finish` is the uncovered production path of **every** 
Python source UDF. `BatchOperator._process_batch`'s `None` and non-DataFrame 
arms decide what a batch operator emits when its handler returns nothing, or 
returns something that is not a DataFrame.
   
   ### Verification
   
   Measured from `amber/` with the identical full-suite scope on both sides, 
`--cov-branch` passed explicitly (this branch lacks #8040's config), per-line 
`hits` and `condition-coverage` read out of `coverage.xml` by script rather 
than from the summary percentage. The before-state used main's spec extracted 
via `git show HEAD:` into a scratch dir and restored from that snapshot — never 
`git restore`.
   
   Two reviewers returned nine findings against the first draft; all repaired. 
**Three mutants survive and are reported rather than dropped**, all three 
genuinely equivalent: `!= 0` to `> 0` on a list length (non-negative by 
construction), and deleting `@overrides.final` from either method — 
`overrides.final` is `typing.final`, which enforces nothing at runtime. The 
last two prompted a docstring correction, since the original text claimed 
finality as the reason the method was worth testing.
   
   Full pyamber suite: `5 failed, 1171 passed, 7 errors` against main's `5 
failed, 1159 passed, 7 errors`. The `FAILED`/`ERROR` node-id sets were sorted 
and diffed — **identical by identity**, 12 entries. `ruff check` and `ruff 
format --check` pass on CI's exact scope. `git diff --numstat` is `226 0` — 
zero deletions.
   
   No production file is touched; `git diff -- 'amber/src/main/*'` is empty.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8043
   
   ### How was this PR tested?
   
   ```
   cd amber && python -m pytest -m "not integration" -q 
src/test/python/core/models/test_operator.py
   ```
   
   ```
   44 passed, 1 warning
   ```
   
   ### 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