fix(guard): satisfy ruff format and repair stale/flaky tests#1307
Conversation
CI failed on `ruff format --check src/` because the lease snapshot dict comprehension exceeded the line-length budget and ruff format collapsed it to a single line. Apply the formatter output so the format check passes. Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge This PR resolves a CI formatting failure and repairs stale/flaky tests. The Files Reviewed (3 files)
Previous Review Summary (commit c88352b)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c88352b)Status: No Issues Found | Recommendation: Merge This PR resolves a CI formatting failure by collapsing a multi-line dict comprehension into a single line as Files Reviewed (1 file)
Reviewed by step-3.7-flash-20260528 · Input: 99.6K · Output: 4.2K · Cached: 281.9K |
`_RECEIPT_COMMAND_DETAIL_BACKFILL_LIMIT` was reduced from 1000 to 200 in the receipt backfill persistence change, but the assertion in `test_relaxed_redaction_sync_adds_recent_blocked_command_detail_backfill` still expected 1000. Update the expectation to match the constant. The AIBOM daemon status poll used a 1.0s timeout, which is too tight for shared CI runners under full-suite load and caused intermittent failures in `test_daemon_aibom_refresh_records_synced_on_success`. Increase the default to 5.0s; the happy path still returns in ~20ms. Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Summary
CI failed on the
ruff format --check src/step. After fixing the formatting, two additional pre-existing test failures surfaced that were previously hidden because the format check blocked them from running.Changes
src/codex_plugin_scanner/guard/runtime/command_queue.py— collapse the multi-line dict comprehension returned by_local_requests_snapshotinto the single-line formruff formatexpects. Formatting-only; no behavior change.tests/test_guard_receipt_redaction_cursor.py— fix stale assertion._RECEIPT_COMMAND_DETAIL_BACKFILL_LIMITwas reduced from 1000 to 200 in the receipt backfill persistence change, but this test still expectedlimit: 1000. Updated to200to match the constant.tests/test_guard_supply_chain_daemon.py— increase_wait_for_aibom_statusdefault timeout from 1.0s to 5.0s. The 1.0s timeout was too tight for shared CI runners under full-suite load, causing intermittent failures intest_daemon_aibom_refresh_records_synced_on_success. The happy path still returns in ~20ms.Verification
ruff format --check src/→ 334 files already formatted ✅ruff check src/→ OK ✅basedpyright --level erroron modified source → OK ✅pytest tests/test_guard_command_queue.py tests/test_guard_command_queue_stale_pending_result.py tests/test_guard_headless_daemon_api.py→ 129 passed ✅pytest tests/test_guard_receipt_redaction_cursor.py tests/test_guard_supply_chain_daemon.py→ all passed ✅CI fix
Resolves the failure on run https://github.com/hashgraph-online/hol-guard/actions/runs/28718065590/job/85162822350 — step 7
ruff format --check src/, plus two pre-existing test failures that were hidden behind the format check.