Repository navigation
test: assert the macOS watchdog arguments in the managed-grace fallback test - #33322
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Test-only fix. The test now covers both platform branches of [DESIGN-REVIEWED] 1f09534 Description read[DESCRIPTION-READ] ed919a51e6ba4b8cdff8ea6b327f31fba5fb7982c7204367c8cc5252b88740ed That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
…ck test #21821 made _open_loop_watchdog build the watchdog with the macOS page-in reader and its shorter paging grace cap when platform_compat.IS_MACOS is true. The fallback test still asserted the Linux-only call, so it failed on every macOS run. Run it on both branches and assert each one's call. Fixes #33311 Refs #21821
8cb8b20 to
1f09534
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving head 1f09534. The test now runs both branches of _open_loop_watchdog's platform_compat.IS_MACOS split and asserts each call: Linux with dump_file and exit_after only, macOS also with loop_major_faults=read_loop_pageins_under_pressure and paging_grace_max=PAGING_GRACE_MAX_SECS_MACOS, which matches heartbeat.py. All checks pass, including the eight macOS shards.
Problem / Motivation
Goal: Make main's macOS test suite pass again by testing the macOS watchdog call that #21821 added.
test/test_dashboard_server_composition_contract_owners.py::test_the_watchdog_budget_falls_back_to_the_managed_service_gracefails on every macOS run since #21821 (fac223579). Example: https://github.com/kirodotdev/KiroCrew/actions/runs/42498006520/job/128784632708Why it matters
Any PR that runs the macOS suite goes red on a test it never touched, and main's macOS lane stays broken.
Not a goal
What changed (motivation → approach → change)
Symptom: the test asserts
LoopStallWatchdog(dump_file="dump.txt", exit_after=40.0), but on macOS the call also carriesloop_major_faults=read_loop_pageins_under_pressure, paging_grace_max=120.0.Root cause: #21821 made
_open_loop_watchdoginsrc/kiro_crew/dashboard/server_runtime/heartbeat.pytake aplatform_compat.IS_MACOSbranch with those two extra arguments. The test was not updated, and Linux CI never takes that branch.Change: test-only. The test is parametrized over
IS_MACOS(False and True), pins it, and asserts the exact call for each branch. The expected call is built once as a dict so the flake-pattern ratchet's duration-kwarg count does not grow.Backwards compatibility
Compatible: test-only change; no product code is touched.
Removes nothing: the diff only widens one test to cover both platform branches.
Tests
test_the_watchdog_budget_falls_back_to_the_managed_service_grace[linux]locks in the Linux call.test_the_watchdog_budget_falls_back_to_the_managed_service_grace[macos]locks in the macOS call with the page-in reader andPAGING_GRACE_MAX_SECS_MACOS.IS_MACOSforced to True, the old assert fails on Linux with the sameActual: mock(..., loop_major_faults=..., paging_grace_max=120.0)seen in the macOS CI job.test/test_dashboard_server_composition_contract_owners.py+test/test_loop_watchdog.py105 passed, 1 skipped;test/test_flake_pattern_ratchet.py::test_no_changed_file_gains_a_flaky_shapepasses; black and isort clean.Proof: not provable -- test-only change
Manual verification
N/A — the macOS branch is covered by the parametrized case; the
ci:macoslabel runs the real macOS suite on this PR.Related Issues
Fixes #33311
Refs #21821
Sibling sweep
Swept: git grep -nE "_open_loop_watchdog|"LoopStallWatchdog"" -- test/
Sibling: test/test_loop_stall_dump_loop_thread.py:137 -- not affected -- its
_NoAlarmWatchdogforwards**kwargs, so the macOS arguments pass throughPattern harvest
Not generalizable: one stale assert on a call that gained a platform branch; the parametrized test now covers both branches.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.