Repository navigation
feat(work-ledger): a host_pressure level change releases a person-wait hold once - #36657
iamwhatever wants to merge 2 commits into
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the fingerprint change is the cause-level fix, and the base already records the decision for it in the What this change shipsInventory (4 items) — 4 justifiedIntent: a conductor paused by host memory pressure still gets its resume turn when memory frees, even when every open item is waiting on a person. FIX.
[FIRST-PRINCIPLES-REVIEWED] d0da21d Description read[DESCRIPTION-READ] 57e2d8e1188e239a6b644da6b9304090448def1aa8485ea215ee8ecb14b38b62 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The fold aims at the hold's real blind spot: queued work is off-ledger, so the fingerprint moves once per level change. The replaced "stays held" pin was reversed by an RFC §12 amendment, not reframed as a gap. Notes
[DESIGN-REVIEWED] d0da21d Description read[DESCRIPTION-READ] 2f60cad2f2c71bb9085dafc840e064012de2d5f0e0c1c72a3d4ef7aa79143830 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 |
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: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] d0da21d Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: Request changesWhy: the decider found 2 problems and estimates an 80% chance that this change introduces a defect, at or above the 80% level where it asks for changes. The PR's own change works as described: it folds Problems found:
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
|
Closing per the owner's ruling: scope shrinks to a prompt rule (check |
Lands after #36481. This branch is stacked on it: the first commit (
db6c4413e2) is #36481 itself; this PR's own change is the second commit only. It rebases onto main once #36481 merges.Files carried from #36481 (reviewed there, not here)
docs/request-for-change/README.md,docs/request-for-change/rfc-work-ledger-resource-pressure.md,src/kiro_crew/agent_parts/spec_prompts.py,src/kiro_crew/builtin_skills/goal-conductor/SKILL.md,src/kiro_crew/conductor_wake.py,src/kiro_crew/crewmate_prompts.json,src/kiro_crew/dashboard/handlers/work_ledger.py,src/kiro_crew/dashboard/handlers/work_ledger_read.py,src/kiro_crew/dashboard/handlers/work_ledger_refusals.py,src/kiro_crew/docs/work-ledger.md,src/kiro_crew/host_pressure.py,src/kiro_crew/notifications/resource_pressure.py,src/kiro_crew/probes/work_ledger.py,src/kiro_crew/work_ledger.py,src/kiro_crew/work_ledger_records.py,src/kiro_crew/work_ledger_store.py,src/kiro_crew/work_ledger_writes.py,test/conftest.py,test/conftest_resets.py,test/fixtures/crewmate_prompts/ledger.golden.txt,test/test_agent_refactor_contracts.py,test/test_agent_refactor_spec_bytes.py,test/test_work_ledger_host_pressure.py,test/test_work_ledger_tools.pyProblem / Motivation
Goal: A conductor whose board waits only on people still gets its pause and resume turn when host memory pressure changes level, so queued work resumes after
clear.The owner asked: "然后conductor/worker协调的时候,如果注意到资源非常紧张,应该记录到ledger,然后wake up conductor,让它能够根据当前资源消耗,主动暂停工作". #36481 records host pressure and wakes the conductor. But the person-wait hold runs before the probe. When every open item waits on a person (
approvalorneeds_human),person_wait_fingerprintdoes not move, so theclearwake is held too. Queued work is not on the ledger, so it never resumes.Why it matters
A conductor that paused at
tightcan stay paused for days after memory frees, as long as its open items wait on a person.Not a goal
What changed (motivation → approach → change)
The accepted RFC amendment rfc-work-ledger-resource-pressure.md §12 (merged in #36589) decides that a pressure level change is a new fact the patrol must see.
person_wait_fingerprintnow appends|pressure:<episode>:<level>whenhost_pressure.read_record()returns a fresh record. A level change moves the fingerprint, so_holds_for_person_waitreleases once; the delivered turn records the new fingerprint, so the next tick at the same level holds again. A 30 s refresh or the critical re-alert keeps the same episode and level and releases nothing. The fingerprint docstring andmonitor-architecture.mdname the new release case.Backwards compatibility
Compatible: the fingerprint string is compared only with a copy the same code took; a loop with an old stored fingerprint releases at most once.
Removes nothing: the hold gains one release case and keeps every other rule.
Tests
test/test_work_ledger_host_pressure.py::test_a_pressure_level_change_releases_a_person_wait_hold_oncereplaces RFC §5 test 7's "stays held" test: a board waiting on an approval is held undertight, atightrefresh stays held,tight->clearmoves the fingerprint once, and a repeatcleartick holds again. It fails with the fold reverted (checked locally).Determinism: the file passed 3 repeats in a row, and the 557 tests in every file that names
person_wait_fingerprintor_holds_for_person_waitpassed under-n 2(xdist order).Manual verification
N/A — unit coverage sufficient; the fold is one string join read by the existing hold.
Related Issues
Closes #36588
Checklist