Repository navigation
fix(autonudge): drop shadowing local probes import (F811 on main) - #16032
Conversation
…n main) #12781 added a function-local 'from kiro_crew import probes' in _is_work_ledger_monitor while #15675 bound probes at module level as a re-export, so main's Backend Lint fails with F811 at autonudge.py:1797. Read probes off the module binding and drop the now-stale lazy-import rationale from the docstring. No behaviour change.
|
kirocrew-ef's main-green fixer now owns this PR and will drive it to merge (it fixes the F811 that keeps main's Backend Lint red). Please don't push to this branch; if you need to, coordinate first. |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: make main's Backend Lint green again by removing the F811 shadowing import — a FIX.
Item 2 deletes a rationale comment that pinned the lazy import, but the description names it and the evidence is on main: [FIRST-PRINCIPLES-REVIEWED] aa69dd1 Description read[DESCRIPTION-READ] 686fa86837f1b2cf1000447f11d37cf0c8e8ecd02b7f17e14e6eca05b5d93dbe That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] aa69dd1 Description read[DESCRIPTION-READ] 9240be3b3fc1def29386ccff7d184081bda44623e92eee471a0aba3d9ac14a99 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 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 5.6 Review — ✅ no blocking findingsGPT 5.6 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: |
Reviving an inactive loop (update(active=True), keyed on an actual revival) now zeroes cycle_count and re-anchors created_ts, so a loop a cycle cap or wall-clock budget stopped runs again on a fresh allowance without the bound being raised first -- the Hermes /goal resume rule. Before this the timer re-stopped such a loop on its first tick, which is why the goal popover held its Play behind the bound and the user had to raise Max cycles before resuming. created_ts is the anchor because every reader of the runtime left already measures from it; a still active loop's settings save resets nothing. Two frame fixes the popover needs ride along: the autonudge_state frame carries stopped_reason and next_due_ts for every loop, not only a structured monitor's, and a reasonless pause reaching a loop a bound already stopped keeps the bound instead of stamping manual over it. The shadowing local probes import in autonudge.py (F811 on main) is dropped; main carries the same fix in #16032; this hunk disappears on rebase once it merges.
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed. Drops the function-local 'from kiro_crew import probes' that shadowed the module-level binding (F811 on main); the comparison now reads the binding the facade already re-exports. Docstring updated to match. No behaviour change.
Problem / Motivation
Goal: main's Backend Lint is green again.
flake8fails on main withsrc/kiro_crew/autonudge.py:1797:9: F811 redefinition of unused 'probes' from line 62. #12781 (0141ede260) added a function-localfrom kiro_crew import probesin_is_work_ledger_monitor, while #15675 had already boundprobesat module level as a re-export. Every open PR's merge ref now inherits the red (e.g. #15572, #16030).Why it matters
Every PR's Backend Lint is red until this lands, so nothing can reach readiness.
Not a goal
probesis imported (the facade already imports it at load).test_loop_watchdog.pycrash seen in some shards.What changed
probes.WORK_LEDGERoff the existing module binding.probesat load.No behaviour change: both bindings are the same module object.
Tests
flake8 src/kiro_crew/autonudge.py: clean.test/test_autonudge.py,test_autonudge_refactor_contract.py(includes the lazy-heavy-graphs import contract),test_autonudge_wake_judge.py: 875 passed.Manual verification
N/A -- lint-only fix, unit coverage sufficient.
Pattern harvest
Not generalizable: flake8 F811 already catches this class (a local import shadowing a module-level binding); it reached main only because #12781 and #15675 each passed lint alone and merged without a re-run on the combined tree.