Repository navigation
feat(work-ledger): track a PR item until it merges and wake the conductor when it lands - #36914
iamwhatever wants to merge 1 commit into
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns block this. The rewrite happens in the store, a batched read is added to the existing probe, and the change follows the RFC's Decision A. Notes
[DESIGN-REVIEWED] 1ef5948 Description read[DESCRIPTION-READ] c35b50b25a6adf45cd6632a1273dd494eb39ce2d20dc684c3dcd2fefaa649ac5 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 accepted base RFC Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: a conductor learns when a worker's PR actually merges, closes, conflicts or goes red, without extra prompt text. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 1ef5948 Description read[DESCRIPTION-READ] 86c3034a9579c73843f5c9f2c4c7c19a962fd0c90dd4cce21271ddea7af96184 That sha256 names the PR description this verdict read. 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] 1ef5948 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
6b78ceb to
af2c00a
Compare
|
|
af2c00a to
60c002e
Compare
|
|
60c002e to
59b492a
Compare
|
…ctor when it lands
59b492a to
1ef5948
Compare
|
|
Too specific to the case related with PR |
The repository owner ruled the PR-specific land-tracking machinery over-engineered and closed its phase A code PR #36914 unmerged. Mark rfc-conductor-pr-land-tracking.md withdrawn so it no longer reads as an accepted decision, and add a withdrawn row to the RFC status vocabulary. Docs only; no behavior change. Co-authored-by: Joe Guo <zejiangg@amazon.com>
Problem / Motivation
Goal: A conductor's PR item stays open until its pull request merges, and the conductor is woken when it lands, with no new instruction in its prompt (Decision A of
rfc-conductor-pr-land-tracking).A worker pushes its PR green and reports done; the conductor closes the item at green and never learns whether the PR merged, because the work-ledger probe reads no PR state.
Why it matters
Landed and abandoned work was found late or never (#36540 and #36507 were found merged only by forced floor turns). The repository owner asked for a capability, not more prompt text.
Not a goal
What changed (motivation → approach → change)
pr_checksbar with arepois stored aspr_mergedwithready: "pr_checks"; the record reply saysacceptance_rewritten."until": "checks"opts out. A bar with no repo readsland_untracked.work_briefcarriesready_when: "pr_checks", so the worker is done at green.pr_merged+ workerdone+ verdictpendingreadsawaiting_landand does not count toward the goal's concurrency cap.gh_pr.fetch_states, 20 PRs per query, same transport). Wakes once on merged or closed; for an awaiting item, on a conflict or a red rollup per head. Backs off at the rate-limit floor until the reset.accept_evalpr_mergednames an open PR's stage (ready,running,red,conflicting,draft) in its evidence.Where: the rewrite and
awaiting_landinwork_ledger_rules.py(exported bysrc/kiro_crew/work_ledger.py), applied inwork_ledger_writes.py; the batched read inprobes/gh_pr.pyand the wakes inprobes/work_ledger.py(wired inprobes/__init__.py), their brief inledger_wake.py; the row flags and record reply indashboard/handlers/work_ledger_read.pyanddashboard/handlers/work_ledger_conductor.py; the tool text inmcp_work.pyandwork_vocab.py; the evaluator in bothbuiltin_skills/*/scripts/accept_eval.py.Both conductors get it with no rule change: the bar is rewritten by the store, and Ultra Mode and Bot conductors share the probe, ledger, evaluator and
ACCEPTANCE_SHAPES. The goal-conductor skill,docs/work-ledger.md, the session spec and the RFC (nowin-progress) describe it. The worker and conductor job-tool budgets intest_job_tools.pyrise by 50 for the two new description sentences.Cost: one GraphQL query per conductor per 300 s tick with a PR item, about 12 points an hour; the operator's
ghbucket, not the Actions token.Backwards compatibility
Breaking: a new
pr_checksbar with arepois stored aspr_merged, so an item written that way no longer passes at green. Writer sweep on origin/main @ 6fa4982: everycreateandacceptthroughapply_conductor_action/apply_acceptance_update(both conductors'work_ledger_record);create_bound_item(remote peer) stores the hub's already-rewritten bar verbatim; stored items keep their bar. Tests that pinned the verbatimpr_checksshape now usepr_mergedoruntil: "checks".Removes nothing: no field, route or key is removed; the change adds a stored form and three read flags.
Tests
test/test_work_ledger_land_tracking.py(new): the rewrite and its opt-outs, TBD promotion,ready_when,awaiting_land, the cap count,fetch_statesbatching, invalid-pair filtering and rate-limit backoff, the four wakes (once per fact, per head), unread and untracked PRs, and that a brief carries no PR text.test/test_accept_eval_pr_merged.py: the new argv, the stage text, and that both skills ship the same evaluator.Determinism: the new file passed 5 repeats and a reversed-order run.
Related backend tests run locally: 4,783 passed (
flock,-n 2). semgrep is not installed on this host, so the diff-scoped scan did not run locally.Manual verification
The GraphQL shape was run live against #36507 and #36618 for the RFC (#36753). It returned state, mergeable, head and rollup state, with
X-Ratelimit-Resource: graphql.Related Issues
Part of #36751
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)