Regression-test gaps for six previously-fixed bugs (userdata, websocket, execution cache)
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
# Regression-test gaps for six previously-fixed bugs (userdata, websocket, execution cache)
While auditing recent bug-fix history on `master` (@ `9db05e0`), I found six merged fixes that repaired real user-facing bugs but landed without regression tests. Each is a candidate for a small targeted test so the bug class can't silently return. Filing as one consolidated issue to keep noise low.
| # | Fix commit | What it fixed | Suggested regression test |
|---|-----------|---------------|---------------------------|
| 1 | `9a870b510` | Non-atomic userdata writes could corrupt files on interrupted write | Write via the userdata API, kill/interrupt mid-write (or assert temp-file+rename pattern is used), verify original content intact |
| 2 | `0737b7e0d` | Invalid workflow filenames previously produced a 500 instead of 400 | POST userdata with invalid filename characters → assert 400 |
| 3 | `24dc581dc` | Concurrent userdata directory creation raced (mkdir EEXIST) | Parallel first-writes to the same new user dir → both succeed |
| 4 | `136c93cb4` | Changing only `class_type` on a node did not invalidate the execution cache | Execute, mutate only `class_type` with identical inputs, re-execute → assert re-execution (cache miss) |
| 5 | `8e2c99e3c` | Websocket removed from the client set during broadcast iteration → RuntimeError | Broadcast while a client disconnects mid-iteration → no exception, remaining clients receive message |
| 6 | `89f15894d` | Network errors during websocket send crashed the sender loop | Inject send-time `ConnectionResetError` → sender continues serving other clients |
Four other recent fixes in the same window already have coverage (verified). Happy to send PRs for any of these if maintainers agree they're worth having — items 2, 3, and 5 are cheap pure-pytest additions; 1 and 6 need small fault-injection helpers; 4 needs an execution-cache harness.
Contributor guide
Research direction
Start by reading the six referenced fix commits on master and locating the userdata API, execution-cache harness, and websocket broadcast and sender-loop tests. Run the existing pytest coverage around those entry points, then add targeted regression tests for the six listed behaviors; done means each previously fixed failure is reproduced and remains covered without breaking existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100