Commit f6bd077
fix(BA-6887): reference the real from_status/to_status columns in kernel history conditions
KernelSchedulingHistoryConditions.by_from_phase/by_to_phase referenced
KernelSchedulingHistoryRow.from_phase and .to_phase. Those columns exist
under different names: the table defines from_status and to_status, so
either factory would have raised AttributeError once its condition was
evaluated.
The names drifted from an incomplete rename. BA-3061 first created
kernel_scheduling_history with from_phase/to_phase columns. BA-3062 then
renamed them to from_status/to_status by editing that not-yet-released
migration in place, but the query conditions added in the same change kept
the old names. The stale reference later survived the move from
repositories/scheduling_history/options.py into this module (BA-5127).
Two things kept it hidden: nothing calls either factory yet, so the closure
was never evaluated; and the cast() wrapper kept the bad attribute access
away from the type checker.
Rename to by_from_status/by_to_status to match both the column names and the
equivalent session factories, and drop the now-unneeded cast(). Renaming
outright is safe as there are no callers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5c2b415 commit f6bd077
2 files changed
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 4 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 427 | + | |
431 | 428 | | |
432 | 429 | | |
433 | 430 | | |
434 | 431 | | |
435 | | - | |
| 432 | + | |
436 | 433 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 434 | + | |
441 | 435 | | |
442 | 436 | | |
443 | 437 | | |
| |||
0 commit comments