Yicong-Huang opened a new issue, #4516:
URL: https://github.com/apache/texera/issues/4516

   ## Task Summary
   
   Two debugger-adjacent worker RPC handlers have no Python-side unit tests:
   
   - **`core/architecture/handlers/control/evaluate_expression_handler.py`** — 
backs the frontend's "watch variable" feature; builds a runtime context 
(`self`, `tuple_`, `input_`) from the worker context and forwards it to 
`ExpressionEvaluator.evaluate`.
   - **`core/architecture/handlers/control/replay_current_tuple_handler.py`** — 
`retry_current_tuple` chains the current tuple back onto the front of the input 
iterator and resumes USER + EXCEPTION pause types (used by debugger "step over 
an exception" flows).
   
   Both are small handlers (~20 lines) but on the critical path for the Udon 
debugger UX. Same gap pattern as #4509.
   
   ## Proposed Action
   
   Add `test_evaluate_expression_handler.py` and 
`test_replay_current_tuple_handler.py` next to the production files, following 
the pytest pattern from `test_debug_command_handler.py` (mock the worker 
context fields the handler reads, drive `async` methods via `asyncio.run`).
   
   Cover:
   
   - **EvaluateExpressionHandler**: runtime context contains the executor as 
`self`, the current input tuple as `tuple_`, and the current input port id as 
`input_`; the request expression is forwarded to 
`ExpressionEvaluator.evaluate`; the evaluator's return value is returned 
unchanged.
   - **RetryCurrentTupleHandler** (note: class name differs from file name): 
when the worker state is `COMPLETED`, the handler no-ops (no chain, no resume); 
otherwise it prepends the current tuple onto `current_input_tuple_iter` and 
resumes both USER_PAUSE and EXCEPTION_PAUSE; in either branch returns 
`EmptyReturn`.
   
   ## Priority
   
   P3 – Low (test-coverage gap)
   
   ## Task Type
   
   - [x] Testing / QA


-- 
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