🧪 Add missing edge case tests for serve.py record_line - #85
Ch3fUlrich wants to merge 1 commit into
Conversation
Introduces a new unit test, `test_record_line_edge_cases`, inside `tests/test-process.py` to cover parsing failures, incorrect JSON formats, missing keys, and invalid progress values for the `record_line` function in `lib/linux/serve.py`. This explicitly verifies that erroneous edge cases gracefully fail without corrupting the shared global RUN and LOG state. Co-authored-by: Ch3fUlrich <71930650+Ch3fUlrich@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: Adds unit tests for the
record_linefunction inlib/linux/serve.pyto cover failure points such as malformed JSON, invalid variable types, missing keys, and out-of-bounds calculations.📊 Coverage: Specifically validates the failure and silent-ignore pathways for
record_line, ensuring robust handling of malformed sub-process JSON events.✨ Result: Improved safety by asserting that edge cases do not corrupt the server's global state (
RUNandLOG), enhancing testing reliability and coverage.PR created automatically by Jules for task 15903551497709193731 started by @Ch3fUlrich