[Bug] vis reports legacy tool-triggered swarm sessions as active
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- developer-experience
Direzione di ricerca
La fix è in apps/vis/server/src/lib/context-projector.ts: non impostare swarm active quando rec.trigger === 'tool'. Aggiungi un test legacy tool-trigger e un test user-triggered enter in apps/vis/server/test/lib/context-projector.test.ts. Esegui questi test e vis typecheck; fatto quando vis corrisponde a engine replay per unmatched tool-triggered enter records.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The engine replay and foldWireRecordFacts now ignore a legacy unmatched swarm_mode.enter record whose trigger is tool, so an interrupted session written by an older version resumes with swarm mode off. The visual debugger has an independent projection path: apps/vis/server/src/lib/context-projector.ts still handles every swarm_mode.enter as swarm = { active: true, trigger: rec.trigger }, and ContextTab renders that state as a swarm mode pill.
The same persisted session can therefore be reported as swarm-off by the engine and transcript history, but swarm-on by vis until a later exit record appears.
Reproduction
- Open vis for an older wire containing
swarm_mode.enterwithtrigger: 'tool'and no matchingswarm_mode.exit. - Open the Context tab.
- Observe that
projectContext(...).swarm.activeistrueand the UI showsswarm mode, while engine replay andfoldWireRecordFactsleave swarm mode off.
Expected: vis mirrors the engine and transcript behavior for this legacy record. Actual: only vis reports swarm mode as active.
Affected population and severity
This affects vis users inspecting sessions written by versions that allowed model-started swarms, specifically wires with an unmatched tool-triggered enter record. It does not change engine execution or the released CLI behavior, but it can mislead debugging by showing a mode that is not actually active.
Suggested fix and tests
- In
apps/vis/server/src/lib/context-projector.ts, do not activate swarm forswarm_mode.enterwhenrec.trigger === 'tool'; preserve the existing behavior for manual/task triggers and exit records. - Extend
apps/vis/server/test/lib/context-projector.test.tsbesidetracks swarm mode enter/exitwith a legacy tool-trigger case that remains inactive, plus coverage that a subsequent user-triggered enter still activates swarm mode. - Run the vis server context-projector tests and vis typecheck.
Why this is separate from #4387
https://github.com/MoonshotAI/kimi-code/pull/4387 only back-syncs the already-released 2.3.2 hotfix. The vis projector and its test are unchanged between that PR's base and HEAD. Adding a new vis behavior fix to the back-sync would make main diverge from the released hotfix and expand its scope, so it is tracked here for a separate fix and release decision instead.
ticket: #813895
- Lingua principale
- TypeScript
- Stelle
- 7.9k
- Fork
- 1.3k
- Merge medio
- 1g 7h
- PR unite (30g)
- 96
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MoonshotAI/kimi-code
-
VS Code extension: clickable file links in chat drop the :line suffix, never jump to the lineAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
MoonshotAI/kimi-code#4398 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
MoonshotAI/kimi-code#4392 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
MoonshotAI/kimi-code#4381 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
MoonshotAI/kimi-code#4369 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
MoonshotAI/kimi-code#4368 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MoonshotAI/kimi-code
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
0️⃣ phase/new
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43640 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100