Repository navigation
fix: say why a crew's version is unknown and which side is newer - #32464
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The change only adds Notes
[DESIGN-REVIEWED] 0f4f586 Description read[DESCRIPTION-READ] 9c84ac675b22d674b79a29cc99a9bffa24297b8ed71d3248d609f5fd16e30cd4 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 Each difference comes from the defect reported in #25246. All readers of a crew's version now go through one helper, What this change shipsInventory (10 items) — 10 justifiedIntent: a person whose crew window refuses to chat learns whether the crew's version could not be read, or which side to update. FIX.
[FIRST-PRINCIPLES-REVIEWED] 0f4f586 Description read[DESCRIPTION-READ] 85e348d9dea0ce7a43865d41331da828c99b475f045c98240ba7917f2fed46e0 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: all three new notice sentences appear in the screenshots, and the blind reader read the older and newer cases correctly, including which side to update. Notes
[UX-REVIEWED] 0f4f586 Description read[DESCRIPTION-READ] 1fe243af10462b41318034a388e8d42bcbeb5de61cf87e4bba17ffc07e1ad160 That sha256 names everything this verdict read: the PR description, plus the 7 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 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: |
b1c3faa to
67e15f0
Compare
|
Rebased: main moved in The same push fixes the red Backend Tests shards: [operator: bolichen97] |
The crew window's mismatch notice printed "?" for a version it could not read, a placeholder "0" from a peer as if it were a release, and told the user to "update one" without saying which side was behind. Every reader of a crew's /api/version now treats an all-zero release as no version. An unknown version always carries its reason, the capabilities reply reports which side is newer, and the crew window and New chat on crew word each case. Closes #25246
67e15f0 to
0f4f586
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved. On head 0f4f586 the review checked these things:
- Every reader of a crew's version now goes through
known_version: capabilities, the versions route, the dispatch refusal, and the remote-update check. Which crews are accepted does not change, becauseversions_compatiblealready refused a0peer. aheadreuses_remote_is_behindwith the arguments swapped. A parametrized test covers older, newer and equal.- Each changed backend line has a test that fails when the line is reverted. The
build-abccase keeps a build id matching by equality. - All 13 catalogs translate the new keys. The merge with main is clean, and PR Readiness is green.
Done well: an unknown version always carries a reason code, because setdefault keeps the code the read failure reported.
- Optional: the New chat on crew wording in
website/src/pages/chat-sidebar/create.ts:372has no test that fails if it is reverted. A case withversion: ''in ChatSidebar.createMenu.test.tsx would pin it. - Optional: a crew that answers
0now shows the read-failed notice and no Update action. The body discloses this. If that state shows up often, a follow-up could offer Restart on that row. - Optional: open PR #21614 moves the old
version_mismatchcall intowebsite/src/hooks/folderCrew.ts. Whoever rebases it after this lands should send that call throughcrewVersionMismatchText(caps).
) The crew window's mismatch notice printed "?" for a version it could not read, a placeholder "0" from a peer as if it were a release, and told the user to "update one" without saying which side was behind. Every reader of a crew's /api/version now treats an all-zero release as no version. An unknown version always carries its reason, the capabilities reply reports which side is newer, and the crew window and New chat on crew word each case. Closes #25246 Backport note: en.context.json adds only the version_unknown line (the neighbouring elicitationCard.dismiss key belongs to unreleased #23973), and the instances.md rows take only this fix's sentences on release's row text. (cherry picked from commit 3ea0a5f)
Problem / Motivation
Goal: When a remote crew's version cannot be checked against this machine's, the crew window says why the version is unknown or which side is newer, and never shows a placeholder like
0or?as the crew's version.The crew window's mismatch notice read "This crew runs Kiro Crew {{peer}} but this machine runs {{local}}. Update one so they match." for every case:
?, with advice to update one side, although nothing was known to be out of date;0showed as "runs 0", as if it were a release;Why it matters
The notice is the only thing that explains why a crew window will not chat. When it reads the same for "could not read the version", "the crew answered nonsense" and "the crew is a release behind", people chase the wrong cause; the issue reports several multi-hour debugging sessions spent on a stale-cache theory that the banner pointed toward.
Not a goal
capability_unauthorized) in parentheses, the way the Remote Crew row already reports a failed version read.version_matchand every version refusal decide exactly as before.What changed (motivation → approach → change)
The window could not tell the cases apart because the capabilities reply carried only
version,version_matchandbehind, and the window printedversion || '?'into one sentence.<code>), so it cannot be checked against this machine's Kiro Crew<local>."<peer>, older than this machine's<local>. Update the crew to match."<peer>, newer than this machine's<local>. Update this machine to match."known_versioninapps/version.py, reads an all-zero release (0,0.0.0) as no version. Every place that reads a crew's/api/versiongoes through it: the capabilities reply andGET /api/instances/versions(dashboard/handlers_instances_peer.py), the crew dispatch refusal (dashboard/handlers/remote_dispatch_routes.py, which then says "an unknown version"), andpeer_version(instances/ssh_tunnel_manager_peer.py, so the remote update's check counts0as no answer). An unknown version always carries its reason: the carrier's failure code, orcapability_malformed_replywhen the crew answered without a usable version. The capabilities reply gainsahead, the same exact compare asbehindwith the two sides swapped.crewVersionMismatchTextincrew-window/crewWindowStore.ts, words the notice for both the crew window and New chat on crew (chat-sidebar/create.ts);types/index.gateway.tsgainsaheadand describes the unknown-version reason. The three strings are new keys in all twelve catalogs,en-XAis regenerated, anden.context.jsontells translators that{{code}}stays untranslated.docs/system-specs/modules/instances.mddescribesahead, the all-zero placeholder and the reason code.Backwards compatibility
Compatible: every field the capabilities and versions replies carried is still there with the same meaning for a real version; the capabilities reply only gains
ahead, and an unknown version gains a reason it lacked before.Reader: website/src/pages/settings/CrewVersionStatus.tsx:CrewVersionStatus -- crew page -- a crew answering
0shows its read-failed notice withcapability_malformed_replyinstead of a "Behind: remote 0" badge and Update (test_a_placeholder_zero_version_is_unknown_never_behind)Reader: website/src/components/RemoteUpdateOffer.tsx:RemoteUpdateOffer -- crew page -- a crew answering
0is listed among the crews whose version could not be read, not among the behind ones (test_a_placeholder_zero_version_is_unknown_never_behind)Reader: src/kiro_crew/instances/ssh_tunnel_manager_remote_ops.py:_await_peer_version_change -- crew page -- a crew answering
0after its restart ends the updateunverified, notsucceededwith version0(test_a_placeholder_zero_version_is_no_answer)Tests
test_remote_crew_capabilities.py: a peer answering0is reported as an unknown version withcapability_malformed_reply, a non-release build id still matches by equality, andbehind/aheadname the older side for an older, newer and equal peer.test_instances_remote_update.py: on the versions route a peer answering0is unknown and never behind, with its reason inerror; an update whose crew answers0after the restart endsunverified.test_session_control_crew.py: the crew dispatch refuses a crew answering0and calls its version unknown.CrewChatWindow.test.tsx: the window shows the older and newer sentences; the tunnel-down case asserts the unknown sentence with its code.Proof: PROVEN test/test_instances_remote_update.py::TestVersionsRoute::test_a_placeholder_zero_version_is_unknown_never_behind, test/test_instances_remote_update.py::TestUpdateJob::test_a_placeholder_zero_version_is_no_answer, test/test_remote_crew_capabilities.py::TestVersionGate::test_a_placeholder_zero_version_reads_as_unknown, test/test_session_control_crew.py::test_a_placeholder_zero_version_is_refused_as_unknown (head b1c3faa)
Manual verification
Rendered the real
CrewChatWindowthrough the existingcapture/remote-crew-update.html?view=windowpage on a local dev server, with the capabilities read answered by route interception for each case below, and checked that each frame shows its exact sentence. The "dev-box is not connected" line under the notice is the capture page's tunnel-less state, unchanged by this PR.Screenshots / video
Crew older, dark:
Crew newer, dark:
Version unknown, dark and light:
Related Issues
Closes #25246
Sibling sweep
Swept: git grep -nE "/api/version|crewWindow.version_mismatch" -- src/kiro_crew website/src
Sibling: website/src/pages/chat-sidebar/create.ts -- changed here
Sibling: src/kiro_crew/dashboard/handlers_instances_peer.py -- changed here
Sibling: src/kiro_crew/dashboard/handlers/remote_dispatch_routes.py -- changed here
Sibling: src/kiro_crew/instances/ssh_tunnel_manager_peer.py -- changed here
Pattern harvest
Not generalizable: the defect is one placeholder version string read as a release; every reader of a crew's version now goes through one helper, so there is no second spelling to catch.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license (see the Licensing section of CONTRIBUTING.md).