fix: repair pre-existing watcher_pane tests#56
Merged
Conversation
Eight banner-copy/budget assertions were stale (title-cased rewording, gate-vs-env precedence, intentional just-started banner pinning); the section allocator was genuinely over-allocating on overflow. - Update stale banner/budget/sort tests to match intended behavior. - Fix _allocate_section_rows to scale expanded sections down proportionally on overflow (min(3,natural) floor) so the row total honors available_rows. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repairs 9 pre-existing failures in
tests/test_watcher_pane.py, deciding per-failure whether the test was stale or the code regressed.Stale tests (code was correct, tests updated)
test_exec_budget_reads_usagenever isolated_resource_gate(), which reads the real on-disk OC config; gate caps shadow the env caps the test sets. Added a monkeypatch stubbing the gate so the env-override path is exercised.test_critical_sorts_before_warning_sorts_before_infohad a premise that conflicts with the intentional "just started" INFO pinning (documented in code). Split into a pure severity-order test (started_at=0) and a test documenting the pinning.Real code regression (code fixed)
_allocate_section_rowsdid no overflow scaling and over-allocated far pastavailable_rows(42/31 vs a cap of 10). Added proportional down-scaling for expanded sections on overflow with amin(3, natural)per-section floor. Natural-fit,size_mult, collapsed, and empty paths preserved.Test plan
tests/test_watcher_pane.py: 27 passedschema_version0.2-vs-0.3 mismatch intests/test_cxrp_capture.py, unrelated)Files touched:
src/operator_console/watcher_status_pane.py,tests/test_watcher_pane.py,.console/log.mdonly.launcher.py/bootstrap.pyuntouched.🤖 Generated with Claude Code