Repository navigation
fix(crewmate): tell each crewmate's user what the upgrade did to it - #23602
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Both items come straight from #23010 review findings and reuse its one-time notice path. No existing code tells a user why their crewmate was left behind: the migration report's failure fields are read only inside What this change shipsInventory (6 items) — 6 justifiedIntent: a FIX. After the Crewmate 2.0 upgrade, each crewmate's user learns what happened to it: where to change a moved crewmate's worker kit, or why it was left behind.
[FIRST-PRINCIPLES-REVIEWED] d951911 Description read[DESCRIPTION-READ] e7f40dd46351704dc345a27cc77b3a15c1cfceeae9a1a66ad98475487dea26dd That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the left-behind notice reuses the existing one-time claim-and-flush path, uses its own owed/claimed files, and adds nothing a revert can't undo. Notes
[DESIGN-REVIEWED] d951911 Description read[DESCRIPTION-READ] 363e8b0867d1ba62e6267982d6b5765a6b66cf93395deae2425b01c630536c10 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 |
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 findings (all downgraded on adjudication)GPT 6.1 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- src/kiro_crew/dashboard/mate_thread_wakes.py:326 -- Unreadable-agent notices require the unreadable agent to start
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 is downgraded: blocking on it would cost more than the harm it prevents. F1 — LOW. The failure needs three things, all confirmed:
What's lost is only an explanatory notice. The crewmate's own agent can't start, so every message the user sends it fails loudly. Once the spec is fixed, the next start moves the crewmate, clears the stale record and sends the "moved" notice instead ( False positive or not applicable? A repository writer can comment: |
c75656c to
ca6c45c
Compare
…nged The one-time upgrade notice sent the user to Edit mate > Built From to see what the worker can do. That pane only shows the kit; it is changed in the same editor under Advanced, Worker's extra kit. The notice now names both.
The startup migration left a crewmate where it was (its worker would differ, its agent could not be read, its file or its repoint failed) with only a log line, so its user never learned it had not moved. The pass now owes that crewmate one notice naming why, delivered once in its own thread through the same O_EXCL claim as the moved notice.
ca6c45c to
d951911
Compare
Problem / Motivation
Goal: After the Crewmate 2.0 upgrade, every crewmate's user learns what happened to it: a moved one says where its worker's kit is changed, and one the migration left behind says why.
Two gaps from the #23010 review (CrysisDeu, minor items):
Why it matters
A user told where to look but not where to act has to hunt for the control that changes their crewmate's worker. A user whose crewmate silently stayed on the old setup thinks the upgrade happened to it, and has no way to learn what to fix so it moves at the next start.
Not a goal
session_create.py, which other open pull requests change, and follows them.What changed (motivation → approach → change)
Both are fixed in the crewmate's own thread, through the one-time notice path #23010 built (
mate_upgrade_notice, delivered bydashboard/mate_thread_wakes.pywith anO_EXCLclaim), so there is no new surface.upgrade_noticetext insrc/kiro_crew/crewmate_prompts.jsonnow also names where the kit is changed ("in the same window under Advanced, Worker's extra kit"). Only that sentence changes;test/fixtures/crewmate_prompts/all-met.golden.txtgets the same one-line edit (the rest of that golden already differs on main and is left alone).mate_config_migration._tell_keptruns at the end of a pass and owes each crewmate it left behind one notice (src/kiro_crew/mate_upgrade_notice.py:mark_kept_owed,members/<slug>/worker_kept_owed.json). The reason is the dry run's own reader-facing text, else a plain cause ("the agent it runs on could not be read" and so on).offer_upgrade_noticeclaims it once (claim_kept_notice,worker_kept_claimed.json) when no moved notice is owed, and the flush delivers it as one hidden[Worker upgrade]turn from the newupgrade_notice_keptpiece. The claim code is shared (_claim);claim_noticekeeps its signature. A crewmate that moves at a later start drops its unclaimed kept record (clear_kept_owed, besidemark_notice_owed), andclaim_kept_noticeanswers nothing once a moved notice is owed or claimed, so a moved crewmate never says it was left behind. A kept notice claimed while the thread is busy is flushed at the thread's next turn end, as a pending report is (note_turn_end).docs/system-specs/modules/crew-mode.md(the "tells its user once" paragraph) records both.Backwards compatibility
Compatible: a moved crewmate's notice is claimed and delivered as before; the kept notice uses its own two files, so it never blocks or replaces the moved one.
The diff changes the migration module (a take-away shape), though it removes nothing: it adds one step at the end of a pass. Readers of what it touches, from
origin/main:Reader: src/kiro_crew/dashboard/server.py:start_dashboard -- release -- calls
migrate_existing_crewmatesas before; the new_tell_keptstep only writes notice records and never raises;test_the_migration_owes_the_notice_only_for_crewmates_it_movedReader: src/kiro_crew/dashboard/mate_thread_wakes.py:offer_upgrade_notice -- chat --
claim_noticekeeps its signature and result, and a moved crewmate's notice is claimed first, as before;test_a_moved_crewmate_tells_its_user_once_and_never_on_a_later_startTests
Proof: PROVEN test/test_mate_upgrade_notice.py::test_the_notice_names_the_path_to_the_worker_tabs_as_the_dashboard_shows_it (head d951911)
test/test_mate_upgrade_notice.py:test_the_notice_names_the_path_to_the_worker_tabs_as_the_dashboard_shows_it: the notice names Advanced, Worker's extra kit.test_the_notice_names_the_editor_labels_the_dashboard_shows: those words are the English labels the editor renders (crewWorkerKitinen.manual.json).test_a_crewmate_the_migration_left_behind_tells_its_user_why_once: a crewmate whose worker would gainexecute_bashstays put, and its thread gets one notice naming that reason, not again on a later start; the moved crewmate owes none.test_a_left_behind_crewmate_that_moves_later_never_says_it_was_left: left behind at one start with its thread unopened, moved at the next; its thread gets the moved notice only.test_a_kept_record_left_beside_a_claimed_moved_notice_is_not_delivered: a stale kept record beside a claimed moved notice is never claimed.test_a_kept_notice_claimed_while_the_thread_is_busy_follows_its_next_turn_end: claimed while a message is queued, delivered at the next turn end.test_the_migration_owes_the_notice_only_for_crewmates_it_moved: unchanged behaviour, now on a shared setup helper.test_mate_upgrade_notice.py,test_mate_thread_wakes.py,test_mate_config_migration.pyand every test readingcrewmate_prompts(54 passed), lint, mypy, semgrep, docs-lint, andscripts/local-gate.py --base origin/main: backend passed (178); frontend failed the same 14 tests in the same 8 files as on fix(crewmate): fail closed on a cron whose crewmate file is gone #23529, none touched here, because this host serveswebsite/node_modulesfrom a symlink vite refuses (Denied ID .../node_modules/...); CI runs them.Manual verification
N/A — unit coverage sufficient: the notice is driven through the real claim and flush with the hidden-turn dispatch recorded; the model's wording of the reply is not tested here, as for the existing notice.
Related Issues
Follow-up to #23010.
Sibling sweep
Swept: git grep -n "logger.warning("crewmate migration" -- src/kiro_crew/mate_config_migration.py
Sibling: src/kiro_crew/mate_config_migration.py -- changed here
Sibling: src/kiro_crew/dashboard/server.py -- not affected -- it logs a failed pass as a whole; a pass that raised moved nobody and is retried at the next start
Pattern harvest
Not generalizable: the migration is the one boot pass that changes how a user's crewmate behaves; other boot passes change nothing a user sees.
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.