Repository navigation
refactor(toplevel): unchain the scope-reap audit outcome ternary - #15345
Conversation
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: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 1cd0ff1 Description read[DESCRIPTION-READ] 5b87071521e07568a1782cb44615e10024deaccd87503092869d6c02fd13f5ab 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 (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: make the scope-reap audit label choice readable, with no behaviour change — a FIX (readability refactor).
[FIRST-PRINCIPLES-REVIEWED] 1cd0ff1 Description read[DESCRIPTION-READ] d593615e9b0558ad9fd1f35934ed44c17e56fa8cceabfebeb4a0a039af973c1b That sha256 names the PR description this verdict read. 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: |
|
CI attribution: The four failures on this head are all in The same shard fails on unrelated PR heads on the same base, each with a different subset of that file's tests. One example is This PR changes one expression and one docstring in I am not rerunning the job, because the red reproduces across PRs. This needs a fix on |
82ad121 to
b799a34
Compare
|
Rebased: main moved in src/kiro_crew/context.py, src/kiro_crew/dashboard/chat_runner.py, test/test_member_essential_context.py, test/test_member_prompt.py since this head went green (64b0a33 -> f10a74d); CI re-running. Diff unchanged; static gates and 338 related tests pass locally on the rebased tree. |
|
CI attribution (head The one failure is |
reap_scopes picked the SEL outcome label for each reclaimable agent scope with a nested conditional inside the _sel_scope_reap call. It is now a guard-first if/elif/else that yields the same three labels (completed, refused, failed) for every input, in the same order. The _sel_scope_reap docstring listed only reclaimed and failed scopes; it now names all three outcomes it is called with.
b799a34 to
1cd0ff1
Compare
|
Rebased: main moved in test/test_session_control_revive.py since this head was built (f10a74d -> 867d7a4). The rebase picks up #15396, which settles each metadata rewrite before the read in the revive tests on Windows. That race is the |
|
Green age (head
This diff was cherry-picked onto |
|
Green age (head
I cherry-picked this diff onto |
Problem / Motivation
Goal: Make the agent-scope reap audit label readable at a glance, with no behaviour change.
reap_scopesinsrc/kiro_crew/session_scope_reap.pychose the SELoutcomelabel for each reclaimable scope with a chained conditional expression nested inside the_sel_scope_reap(...)call. It was the smallest actionable site the module-simplification detector found onmain.Why it matters
This label is an audit field that separates a refused reap (a tenant still holds the scope) from a failed one (the stop ran and left members behind). A reader checking which case gets which label had to untangle
a if x else (b if y else c)inside a call's arguments.Not a goal
subagent_manager/monitoring.py. It is another module and five open PRs touch that file.safety_override.py.failedrather thanrefused.What changed (motivation → approach → change)
The outcome is now picked by a guard-first
if/elif/elsejust above the call, and the call passesoutcomeas its fourth positional argument, as before.clearedrefusedlistTruecompletedFalserefusedFalsefailedThe
_sel_scope_reapdocstring said it fires "per reclaimed (or failed) scope". It is also called forrefused, which this module deliberately keeps apart fromfailed. The docstring now names all three outcomes.Backwards compatibility
Compatible: the same three labels come out for every input, in the same order relative to the summary counters and warnings. Both forms were run over every
cleared×refusedcombination and matched.Tests
No test changes. The suites that drive this function pass locally on the Python 3.12 CI-parity venv:
test_session_scope_reap.py,test_runtime_reconcile.pyandtest_spawn_audit.py(201 passed);test/e2e/test_process_chaos.pyskips on this host by design.Gates, all exit 0: flake8, isort, mypy,
check_black_formatting.py,check_subprocess_encoding.py,check_brand_name.py,check_harness_parity.py,docs_lint.py --test,docs-lint.sh,check_per_file_coverage.py --testandverify_vendor_manifest.py.scripts/scrub-lint.shis not in the tree; that scan runs in CI only.A five-lens review fleet checked the diff: AUTOSDE blocking rules, behaviour preservation, import semantics, security keystone and boot path, and comment accuracy. Four found nothing. The comment-accuracy lens found the stale docstring above; an independent refuter confirmed it predates this diff, so it was fixed here. Nothing was dropped.
Backend-only diff: nothing under
website/,.github/orscripts/changes, so CI'schangesjob reportsonly_backend=trueand the frontend suites were not run locally.Manual verification
N/A: unit coverage is sufficient. This refactors one expression and one docstring, and the expression was checked over every input combination.
Screenshots / video
Why no screenshot: backend-only refactor of one audit-label expression; nothing renders differently.
Related Issues
no linked issue: a readability sweep from the module-simplification campaign, not tracked by an issue.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)