Repository navigation
refactor: backport the agents.py effort-levels split to 0.12.1 (batch 29) - #32184
Conversation
…e cap (#32123) agents.py reached 2,002 lines on main, over the 2,000-line cap, so the line-cap ratchet fails every PR. GET /api/effort-levels moves whole into handlers/agents_effort_levels.py, a plain module outside the owner composition; agents.py binds the same object, so routes, the handlers package and callers keep their import path. No behavior change. (cherry picked from commit a3fb5af)
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: this is a clean backport of an already-merged split that moves one route and keeps the facade binding and route identity, with nothing patching the moved function's dependencies through the facade. [DESIGN-REVIEWED] 0a10a0f Description read[DESCRIPTION-READ] d9a82eea9d125443bd382c11d967d407492e329bdce26288e9ddfcd2d676a948 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: this is a clean, behaviour-neutral move that AGENTS.md's 2,000-line cap requires on the release branch. What this change shipsInventory (4 items) — 4 justifiedIntent: get
[FIRST-PRINCIPLES-REVIEWED] 0a10a0f Description read[DESCRIPTION-READ] cde637eef3298e7667ac73a7564fe5fdffe0a3b875dd2a9cfbd78937d949bc28 That sha256 names the PR description this verdict read. 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: |
Problem / Motivation
Goal: Bring #32123, which moves the effort-levels route out of
src/kiro_crew/dashboard/handlers/agents.py, ontorelease/0.12.0as one commit, so that file is back under the 2,000-line cap after #32112 (the #31569 backport) took it to 2,002 lines.Why it matters
agents.pyis 2,002 lines onrelease/0.12.0, over the 2,000-line cap thatscripts/check_file_line_cap.pyenforces, because #32112 carried #31569 here as merged onmain. This is the follow-up #32112's body names.Not a goal
main; nothing is changed only here.CHANGELOG.mdchange. Cuttingv0.12.1-rc.Nand the bare tag follow docs/build/release.md and stay with the maintainers.agents.pykeeps the import path callers use.What changed (motivation → approach → change)
The main squash commit was cherry-picked with
-xontorelease/0.12.0@4d9f6b123e, keeping its original author.agents.pyunder the line capa3fb5af23d0a10a0fc0aNo hunk was resolved by hand; the pick's added and removed lines are identical to its main commit.
api_effort_levelsmoves tosrc/kiro_crew/dashboard/handlers/agents_effort_levels.py.agents.pygoes from 2,002 to 1,979 lines, andscripts/check_file_line_cap.pypasses on this branch.builder-security checked: the route keeps its path, method and auth; only the module that defines it changes.
Backwards compatibility
Compatible: the change is the one already merged on
main, and its own compatibility note applies unchanged. The route answers as before.Removes nothing: no route, setting or behaviour that 0.12.0 accepts is removed.
Tests
Proof: not provable -- other: a backport of a main commit whose proof ran on its own PR
release/*, so the related set was run here: every touched test file plus every test file that imports the agents handler or the effort-levels route, 121 files, one pytest process per batch of 20,-n 0. 5852 passed, none failed.scripts/check_file_line_cap.py: 0 failures.Manual verification
N/A - the change was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.
Screenshots / video
Why no screenshot: backend-only change.
Related Issues
Backport to the 0.12 line for 0.12.1 of #32123. Follow-up to #32112.
Sibling sweep
Siblings: none -- the source PR carried its own sibling sweep; this PR only carries that change.
Pattern harvest
Not generalizable: this PR only carries a change already on
main.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; see the Licensing section of CONTRIBUTING.md.