Repository navigation
feat(work-ledger): let resource_status size the wave, not a fixed goal cap of 6 - #36312
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The change follows the owner's decision in RFC §7.2, and raising the default from 6 to 32 is easy to undo. Notes
[DESIGN-REVIEWED] 241423e Description read[DESCRIPTION-READ] 7998407a62cb4621e6e09dc2798ea86043c7ac67aebcdd939181f871d5f34035 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: the default change is the shape §7.2 of the base RFC What this change shipsInventory (7 items) — 7 justifiedIntent: let a goal conductor size each dispatch wave from host resources instead of a fixed six-open-item cap. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 241423e Description read[DESCRIPTION-READ] f2c8f24a38749a55d298ee2c3f2d325ce285aa4ef0d623ac21ac21aff2ead6e3 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: |
fac851a to
3f583fc
Compare
Code change approver recommendation: A person should decideWhy: the decider raised 2 possible problems and estimates a 55% chance that this change introduces a defect; a person should check them. The code change is sound: the default goal concurrency cap rises to the store's bound of 32, user-set caps and stored values are kept, the refusal text is fixed, and the host-pressure code the RFC depends on has already shipped. But the new resource_wave rule queues work outside the ledger on tight/unknown hosts. The 'nothing is queued' stop clause added to keep the patrol armed is missing from the goal-conductor skill's Stop conditions (SKILL.md:631, :870), which both the Ultra Mode and Bot conductors are told to follow. The round-close reset also records only open items, so the queue can be lost. The same stop-rule class the earlier review flagged is fixed on only some of its sites, so the PR's goal holds only on some paths. Requesting changes. Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
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 |
3f583fc to
cac35d6
Compare
|
Disposition (target=opus, gpt): fixed in cac35d6.
|
cac35d6 to
7e753fe
Compare
|
Disposition (target=opus, gpt; head cac35d6 findings at work_ledger_records.py:333): fixed in 7e753fe, with one case put to the maintainer.
|
|
Disposition (target=gpt; work_ledger_records.py:333, legacy unmarked cap of 6): rebutted, by ruling.
|
|
Disposition target=gpt span=c8fd8056d86e (head 7e753fe, work_ledger_records.py:328): rebutted by ruling, same class as issuecomment-6845926570.
|
7e753fe to
fb93fa4
Compare
|
Disposition target=first-principles span=b427d211bd59: fixed (decision record now on main).
|
6c0a83c to
fb628ee
Compare
|
Dispositions for head fb628ee (RFC §7.2 compatibility): target=first-principles span=b427d211bd59 -- fixed.
target=gpt span=c8fd8056d86e -- fixed.
target=fable (Opus, §7.3 ordering) -- accepted, by merge order.
|
fb628ee to
923e2e9
Compare
923e2e9 to
68f0227
Compare
|
Disposition target=fable (Opus, head 923e2e9, spec_prompts.py:174, queued work ends the patrol): fixed in 68f0227.
|
…l cap of 6 DEFAULT_GOAL_CONCURRENCY_CAP becomes MAX_ITEMS_PER_CONDUCTOR (32); the concurrency_cap field stays for a bound the user sets. The refusal says to wait for a seat instead of asking to raise it. Both conductors carry a shared resource_wave rule, so the Bot conductor reads resource_status before a wave.
68f0227 to
241423e
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review checked head 241423e. DEFAULT_GOAL_CONCURRENCY_CAP now equals the store's open-item bound. A goal with no user cap is refused item_cap_exceeded at 33 open items. A cap the user set still refuses goal_concurrency_cap_reached. Stored caps, the old 6 included, are read unchanged with no migration, as RFC section 7.2 says, and test_a_stored_cap_is_kept_across_goals_and_never_migrated pins that. The new legacy entry in SHIPPED_PATROL_MESSAGES matches main's PATROL_MESSAGE byte for byte. The arm-time check still requires the current text exactly. The posture words in resource_wave match resource_status.
Done well: the old 6-cap tests now set an explicit USER_CAP=6, so the refusal, seat-freeing and concurrent-create tests keep their strength and do not quietly test 32.
The design is signed off under the standing maintainer sign-off for changes by team members.
Optional:
goal-conductor/SKILL.md:870still ends the patrol when every ledger item is terminal, and its round-close reset (around line 691 to 705) can drop a queue that only the chat holds. #36298 has the matching lines. Consider naming the merge order in the body, or carrying the stop-condition clause here.round_close_resetinspec_prompts.py:409could also say "or while anything is queued".CONDUCTOR_MODE_SKILL_ANCHORS['patrol_final_report']could add a "nothing is queued" anchor, so the parity test catches that SKILL drift._PATROL_MESSAGE_BEFORE_QUEUE(conductor_patrol.py:93) is built from the live constant. A frozen literal, like the older entry, would stay correct when someone later rewords the message.
Problem / Motivation
Goal: A goal conductor, Ultra Mode or Bot, sizes each dispatch wave by host resources (
resource_status), not by a fixed cap of 6 open items.Every goal board is capped at 6 open items (
DEFAULT_GOAL_CONCURRENCY_CAPinsrc/kiro_crew/work_ledger_records.py). The 6 was never measured and does not follow the host. The refusal text tells the conductor to "ask the user" to raise it, while the conductor prompts say "never ask to raise it". The Bot conductor's rules never mentionresource_statusat all.Why it matters
A fixed 6 holds back a healthy host and does nothing for a starved one. The owner asked to stop micro-managing with a number and rely on resource probing.
Not a goal
concurrency_capfield: it stays for a bound the user sets.createorsession_create(the pressure RFC in docs(rfc): drop the fixed goal concurrency default; host pressure wakes the conductor #36304 covers that, as a separate PR).What changed (motivation → approach → change)
Fixed number below the store bound → drop the default to the store's own bound and let a prompt rule read the host → change:
work_ledger_records.py:DEFAULT_GOAL_CONCURRENCY_CAP = MAX_ITEMS_PER_CONDUCTOR(32). With no user bound, the store's open bound refuses first (item_cap_exceeded); a user-setconcurrency_cap=Nstill refusesgoal_concurrency_cap_reached.work_ledger_writes.py) and theconcurrency_capschema description (mcp_work.py): wait for a seat, do not ask to raise it.resource_wavein_LEDGER_CONDUCTOR_RULES(agent_parts/spec_prompts.py), rendered into the root charter and into the Bot'sconductor.patrolpiece (crewmate_prompts.json): callresource_statusbefore a wave;ampledispatches every ready item,tightorunknowndispatches one and queues the rest,criticaldispatches none.patrol_ends(agent_parts/spec_prompts.py): the patrol ends only when every ledger item is terminal and nothing is queued, so a goal with queued work keeps its loop armed. The same clause goes into the sharedpatrol_final_reportrule and the gateway's defaultPATROL_MESSAGE(conductor_patrol.py); the previous patrol text stays inSHIPPED_PATROL_MESSAGES, so loops already armed with it still pass the fire-time check (test_the_patrol_stays_open_while_work_is_queued_and_old_loops_still_pass).test/fixtures/crewmate_prompts/ledger.golden.txtrefreshed withscripts/crewmate_prompt_preview.py --fixture ledger --write.resource_statusdecides the wave; a bound the user set isconcurrency_cap" inspend_bounded, the Concurrency cap bullet ofbuiltin_skills/goal-conductor/SKILL.md, anddocs/work-ledger.md.Decision record:
docs/request-for-change/rfc-work-ledger-concurrency-cap.md§7 (statuspartial), merged to main in #36304.The Bot conductor can call
resource_status: it is in_CONDUCTOR_CORE_GRANTS(agent_parts/spec_grants.py), andtest_the_root_conductors_surface_is_on_the_crewmatesintest_mate_conductor_parity.pyholds every root-conductor grant on the crewmate's conductor too. This PR does not depend on thehost_pressurerecord.Backwards compatibility
Compatible: the default only rises (6 to 32, inside the existing 1..32 range) for boards with no stored cap; every stored cap, an old default 6 included, reads and refuses as before (RFC §7.2, no migration).
Removes nothing: the field, its validation, the refusal code and the 409 mapping all stay; only the default value and prompt wording change.
Tests
Proof: not provable -- other: default constant plus prompt text; the updated tests pin the new default
test_work_ledger_caps.py:test_with_no_user_bound_the_goal_cap_is_the_stores_open_bound(32 open, the 33rd refuseditem_cap_exceeded);test_a_user_set_concurrency_cap_refuses_past_it_and_says_wait(user cap 6 refuses, message says "wait for a seat" and not "ask the user"). Tests that relied on the old default now set a user cap of 6.test_a_stored_cap_is_kept_across_goals_and_never_migratedpins RFC §7.2: a stored 6 reads as 6, and a set cap (6 and 2) survives a reword and a new goal.test_agent_refactor_spec_bytes.py: conductor and ledger-conductor spec digests re-pinned from CI's printed digests (prompt text changed).test_conductor_agent.py: the charter and skill carry "resource_statusdecides the wave" and no "at most 6".test_mate_conductor_parity.py: the new shared ruleresource_wavemaps to its goal-conductor SKILL anchors inULTRA_SKILL_ANCHORS; the existing test proves it reaches the Bot conductor.test_agent_refactor_contracts.py:_CONDUCTOR_SYSTEM_PROMPTdigest updated for the new text.Locally (flock,
-n 2): the work-ledger, conductor, crewmate, mcp_work and parity test files, 787 + 150 + 68 passed.Manual verification
N/A — unit coverage sufficient: a constant and prompt text; the parity test renders the Bot conductor text.
Known limit (RFC §7.2): an upgraded board that already stored the old default 6 keeps 6 until a
goalwrite names a cap (work_ledger_record action=goal concurrency_cap=<N>) or the board is replaced; nothing on its header tells that 6 apart from a user who chose 6, so no read migrates it. New boards start at 32.Related Issues
Part of #36301
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)