Skip to content

fix(autonudge): drop shadowing local probes import (F811 on main) - #16032

Merged
bolichen97 merged 1 commit into
mainfrom
fix/autonudge-f811-probes
Oct 2, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/autonudge-f811-probes

Conversation

@bolichen97

@bolichen97 bolichen97 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: main's Backend Lint is green again.

flake8 fails on main with src/kiro_crew/autonudge.py:1797:9: F811 redefinition of unused 'probes' from line 62. #12781 (0141ede260) added a function-local from kiro_crew import probes in _is_work_ledger_monitor, while #15675 had already bound probes at 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

  • Changing when probes is imported (the facade already imports it at load).
  • The unrelated test_loop_watchdog.py crash seen in some shards.

What changed

  • Drop the local import; read probes.WORK_LEDGER off the existing module binding.
  • Drop the docstring's lazy-import rationale, which no longer holds since the facade imports probes at 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.

…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.
@bolichen97

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of aa69dd186a24c42cddce5cf46a53a81b026c9e92 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (2 items) — 2 justified

Intent: make main's Backend Lint green again by removing the F811 shadowing import — a FIX.

  1. Backend Lint passes on main again (the function-local probes import at autonudge.py:1797 is deleted; the comparison reads the existing line-62 module binding) — justified
  2. The docstring no longer claims probes is imported lazily to stay off the boot path — justified

Item 2 deletes a rationale comment that pinned the lazy import, but the description names it and the evidence is on main: src/kiro_crew/autonudge.py:62 already imports probes at module load as a re-export, so the pinned rationale was already void before this PR — the pin is reversed with evidence, not silence. Both bindings resolve to the same module object, so the zero-option (keep the stale docstring) would leave a false claim beside the code it describes.

[FIRST-PRINCIPLES-REVIEWED] aa69dd1

Description read

[DESCRIPTION-READ] 686fa86837f1b2cf1000447f11d37cf0c8e8ecd02b7f17e14e6eca05b5d93dbe

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of aa69dd186a24c42cddce5cf46a53a81b026c9e92 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed aa69dd186a24c42cddce5cf46a53a81b026c9e92 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] aa69dd1

Verdict parsed from the review's SHA-scoped output markers for commit aa69dd186a24c42cddce5cf46a53a81b026c9e92.

False positive or not applicable? A repository writer can comment:
/ai-review override fable aa69dd186a24c42cddce5cf46a53a81b026c9e92: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of aa69dd186a24c42cddce5cf46a53a81b026c9e92 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] aa69dd1

False positive or not applicable? A repository writer can comment:
/ai-review override gpt aa69dd186a24c42cddce5cf46a53a81b026c9e92: <one-sentence reason>

pepmach added a commit that referenced this pull request Oct 2, 2026
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.
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 2, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) October 2, 2026 00:51
@bolichen97
bolichen97 merged commit 1001b70 into main Oct 2, 2026
103 of 112 checks passed
@bolichen97
bolichen97 deleted the fix/autonudge-f811-probes branch October 2, 2026 00:52

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants