fischer-agentkit/src/agentkit/server
chiguyong 47a437c5e3
Test / backend-test (pull_request) Has been cancelled Details
Test / frontend-unit (pull_request) Has been cancelled Details
Test / api-e2e (pull_request) Has been cancelled Details
Test / frontend-e2e (pull_request) Has been cancelled Details
fix(experts): resolve residual review findings from PR #13
Addresses 4 actionable findings (1 P1 + 3 P2) from ce-code-review of
feat/ui-ue-enhancement (PR #13), now merged to main (8066e0b).

P1 — expert_step payload alignment (_phase_executor.py)
  The thinking/tool_call/tool_result event payloads were missing the
  fields the frontend WsServerMessage contract requires
  (expert_name/expert_color/content/step). Frontend code consuming these
  events silently degraded. Now all expert_step broadcasts carry the
  full contract; tool_call/tool_result keep step_data for the raw payload.

P2 #1 — execute_stream CancellationToken registration (config_driven.py)
  execute_stream() bypassed BaseAgent.execute() and never registered a
  CancellationToken, so cancel_task() could not cooperatively cancel a
  streaming task. Now registers the token and cleans it up in finally.

P2 #2 — team_synthesis orphan milestone cleanup (orchestrator.py)
  If synthesis streaming was interrupted (cancel/exception), no terminal
  team_synthesis event was emitted, leaving the frontend streaming
  milestone spinning forever. Now an inner try/except emits a terminal
  team_synthesis with status=cancelled|error before re-raising, so the
  frontend can finalize the milestone. The success path also carries
  the synthesis_id.

P2 #3 — synthesis_id dedup (orchestrator.py + types.ts + chatStream.ts)
  Without an identifier, the frontend could not precisely match a
  team_synthesis terminal event to its streaming milestone (especially
  across retries/concurrent teams). The backend now injects a stable
  synthesis_id (`{plan.id}:synthesis`) into both team_synthesis_chunk
  and team_synthesis events; the frontend uses it for exact milestone
  matching and treats error/cancelled status as terminal.

Test updates
  - Updated test_thinking_events_forwarded_as_expert_step to assert the
    new payload contract (expert_id/name/color/content/step).
  - Added test_tool_call_events_forwarded_as_expert_step covering
    tool_call/tool_result payload shape (content=tool_name摘要 +
    step_data=原始 payload).

Verification
  - ruff check: clean
  - pytest tests/unit/experts/test_phase_executor_streaming.py: 14/14
  - npm run typecheck: clean
  - vitest: 126/127 (1 unrelated baseline failure in tauri-auth.test.ts)

Residuals doc: docs/residual-review-findings/feat-ui-ue-enhancement.md
2026-07-01 13:26:19 +08:00
..
admin fix(review): U3 atomic file writes for YAML + .env + skill config 2026-06-22 17:03:27 +08:00
auth refactor: tech debt Wave 3+4 (tools/skills/mcp/rag/calendar/auth/cli/quality/channels/telemetry/session/bus/documents Any 治理) (#11) 2026-07-01 08:08:36 +08:00
frontend fix(experts): resolve residual review findings from PR #13 2026-07-01 13:26:19 +08:00
routes feat: UI/UE enhancement — streaming, sticky header, hover actions, calendar tokens 2026-07-01 12:51:45 +08:00
static chore(prior): malformed tool call handling, auth whitelist, dev scripts, wave1 plan 2026-06-29 20:25:03 +08:00
utils fix(review): U3 atomic file writes for YAML + .env + skill config 2026-06-22 17:03:27 +08:00
__init__.py feat(agentkit): v2 Phase 1 - ReAct/LLM Gateway/Skill/Server + review fixes 2026-06-05 23:32:16 +08:00
_fallback_chain.py feat(agent): Wave 2 medium coupling (G4/G7/G9) (#5) 2026-06-30 09:09:33 +08:00
app.py refactor: tech debt Wave 1+2 (except Exception 收尾 + core/experts Any 治理) (#10) 2026-07-01 03:54:53 +08:00
client.py feat(streaming): Phase C - LLM streaming + ReAct events + SSE endpoint 2026-06-06 11:54:17 +08:00
client_config.py fix(config): unify config loading chain and protect ${VAR} references 2026-06-16 00:26:54 +08:00
config.py feat(agent): Wave 3 strategic coupling (G5/G6) (#6) 2026-06-30 09:17:19 +08:00
middleware.py fix: comprehensive code review fixes + WS test stability 2026-06-15 08:17:34 +08:00
runner.py fix(routing): U1-U6 路由优化 + 修复方案 + 代码审查修复 2026-06-20 19:31:49 +08:00
task_store.py fix(review): address all 14 P2 advisory findings 2026-06-06 18:20:46 +08:00