Skip to content

sync: taiji 定制版同步最新基线 8d810b99e(LegionCard 样式统一 + 群聊 P0 修复) - #2262

Open
1688mengdie wants to merge 486 commits into
GCWing:mainfrom
BitFun-SIG:custom/taiji-unofficial
Open

sync: taiji 定制版同步最新基线 8d810b99e(LegionCard 样式统一 + 群聊 P0 修复)#2262
1688mengdie wants to merge 486 commits into
GCWing:mainfrom
BitFun-SIG:custom/taiji-unofficial

Conversation

@1688mengdie

Copy link
Copy Markdown

同步内容

taiji 定制版(custom/taiji-unofficial)同步最新基线 \8d810b99e\(相对上次合并基线 aa98261 前进,含上游合流 9b05dd0)。

本 PR 新增关键提交

  • \8d810b99e\ feat(UI): unify LegionCard style with CoreAgentCard surface
  • \2ba9a7ecd\ fix(P0): group chat auto-creates Claw session for missing member
  • \5b9999431\ fix(CI): gate local_download_name_key test import to platforms that use it
  • 上游合流 9b05dd0(centralize default feature ownership)+ dmg branding + harmonyos fixes

验证

  • 前端 type-check:web → 0 error
  • 前端 vitest → 3381 tests 全绿
  • cargo check bitfun-core/cli/desktop(--jobs 4)→ 0 error
  • cargo test bitfun-core → 144 passed 0 failed

t added 30 commits August 16, 2026 15:45
…nd call sites from coordinator + scheduler
…r bypass, worktree auth, format_role_display)
…l (CPO refinement)

- caller_is_owner_session: drop RBAC role check, always false after RBAC removal
  (no owner-bypass concept); authz gate degrades to created_by match OR ancestor
  verification (session_control_creator_marker + walk_ancestors + metadata chain)
- resolve_session_mutation_authorization: restore official fail-closed for orphan
  targets (R-WF-01 had wrongly changed it to fail-open), keep created_by + ancestor
  verification
- get_messages: narrow storage-path-index fallback for evicted sessions only
  (replaces the global effective_session_storage_path change that broke 79 tests)
- restore shared_authz_rejects_* + full read_authz official ancestor test suite
  (owner_bypasses tests dropped with RBAC); full core suite green 2456/0
R-WF-11: carry the seven-state display projection through the persisted
SessionMetadata so the frontend main-nav projection survives a restart.
serde alias displayState/display_state with skip_serializing_if none keeps
old metadata files readable and compact. All construction sites updated.
R-WF-11: add UiSessionMetadataField::DisplayState and merge branch so the
frontend save_session_metadata call with the displayState whitelist entry
lands on disk instead of being silently dropped by the merge.
R-WF-11: fill display_state from SessionSummary (list_sessions) and
Session::display_state (session_to_response restore paths) so the frontend
SessionInfo.displayState has a real backend data source.
…path

R-WF-11: buildSessionMetadata writes displayState from the in-memory session
as the source of truth (no existingMetadata fallback so clears reach disk),
and the save whitelist (UiSessionMetadataField + PersistenceModule fields)
includes displayState. Adds unit tests covering persist/hung/clear.
…aths

R-WF-11: close the backend-storage display_state -> frontend Session ->
SessionsSection chain:
- persisted-metadata construction reads metadata.displayState
- restore paths write SessionInfo.displayState via normalizeSessionDisplayState
- initializeFromDisk and loadSessionMetadataPage reconcile the runtime
  list_sessions projection (AgentSessionSummary.displayState) so historical
  metadata written before the field existed still projects seven states.
…rvives restart

sanitize_persisted_session_state no longer downgrades Processing to Idle.
A crashed-while-processing session restarts with its persisted Processing
and last_progress_at markers, so derive_display_state projects Hung instead
of silently degrading to Completed. Safe for the scheduler: can_start_new_turn
only accepts Idle/recoverable Error and the queued dispatcher short-circuits
on Processing, so a restored Processing session is never treated as running.

Adds save->load->derive interaction test proving the hung projection
survives restart (previously untested sanitize/derive interaction).
…g state (R-WF-11 P0-1)

- view restore: crash-leftover Processing (stale last_progress_at beyond
  DEFAULT_HUNG_TIMEOUT) keeps runtime state so display_state projects Hung
  when the user opens a stuck session; fresh Processing/Error still reset
- full restore: recovered hung session records explicit interrupt marker
  (recovered_after_hung_restore -> Interrupted projection, never silent
  Completed) and preserves the durable Processing + last_progress_at sidecar
  on disk even when other restore migrations trigger a persist
- add is_crash_leftover_hung_processing helper + re-export DEFAULT_HUNG_TIMEOUT
- tests: view restore keeps Hung; full restore records explicit handling and
  keeps disk evidence
…-WF-11 复审5 P1-1)

collect_expired_session_candidates only checked should_persist + idle timeout,
so a live turn with no phase refresh for >1h was selected as an idle-eviction
candidate. The cleanup task then pre-evict-saved the live Processing to disk
and removed it from memory, bypassing the Processing guard in
unload_session_from_memory. A later full restore misclassified the live turn
as a crash leftover (is_crash_leftover_hung_processing) and stamped it with
an explicit interrupt marker - the running turn was killed by idle eviction.

Fix: exclude SessionState::Processing from idle-eviction candidates at the
source (candidate collection), matching the unload path guard. Processing
sessions keep their in-memory presence; the disk Processing evidence stays
crash-leftover-only. Update the is_crash_leftover_hung_processing doc to
match (previously claimed eviction was impossible, which the bypass
contradicted). Add interaction tests: expired Processing is never selected as
a candidate, and the cleanup chain (collect -> pre-evict save -> remove_if)
leaves it untouched (no disk write, no memory eviction).
…sk/rwf11-state)

# Conflicts:
#	src/crates/assembly/core/src/agentic/tools/implementations/session_control_tool.rs
… AgentType (R-WF-02 批次2 P0-1)

- P0-1: #[serde(untagged)] ignores rename/alias on unit variants, so every
  builtin deserialized into Other(String) and serialized as null; hand-write
  Serialize (via as_str) + Deserialize (via From<&str>) covering all 5 builtins
- P0-2: fix record :64 corrected to real serde behavior (no false claim)
- P1-1: GroupChatView.test.tsx group-session fixtures agentType 'Claw' -> 'group'
- P1-2: registered as known boundary (R-WF-04 scope), reason recorded in fix log
- tests: agent_type_serde_deserializes_string_to_builtin_variants +
  agent_type_serde_serializes_builtin_variants_as_canonical_strings (negative
  assertions for all 5 builtins)
R-WF-03: group chat 9+ orchestration tool suite
- Keep all 9 group tools (create/invite/remove/send/history/list/fork/member_status/delete)
- Add 2 orchestration actions: update_member_tools (member tool set) + update_wiring (wiring definition), reusing group_workspace/validate_session_exists
- Sender identity = SOUL.name + agent type (metadata senderType, not text; cache protection)
- Fork keeps readonly semantics (branch_session inherits agent_type=group, no model response)
- list_group_chats keeps groupId output
- Register chain 6 items synced (materialization/registry/tool-provider-groups/aliases/agents/mod)
R-WF-04: send_group_message 纯落盘(write_group_turn_with_metadata),不走 start_dialog_turn 大模型路径;校验简化为只查群会话存在(get_session + 磁盘回退),非成员可发(开放投递);群聊会话无大模型响应。验收:非成员发送成功;群消息只落盘无模型调用(model_rounds 空 + 会话 Idle 断言)。
t added 29 commits August 22, 2026 14:22
…) before clippy - desktop build.rs requires resource roots to exist
… missing stage_scripts_command import in tests, unused native_path_identity import, useless format!, iter_mut().next() on array
A-3(2026-08-18 主人实测复发):Task 后台子代理完成时父会话收到
「元数据通知 + 最终消息」双通知——ReviewPropagation 极简 reminder
(review its output)与后台完成全文 follow-up turn(通知句+全文)
两条独立消息通道并存。R-AR 全文化后 follow-up 携带全文,reminder
仍为 P-19 时代遗留的极简元数据通道 → 双通道冗余。

修复:execute_hidden_subagent_internal 增加 suppress_review_propagation
参数——start_background_subagent(后台子代理)传 true 抑制 review
reminder(全文 follow-up 单通道投递);前台/调度路径传 false 保持
既有 review 提醒语义。防回退单测:
on_leaf_completed_suppressed_by_background_path_returns_none_even_with_parent
(suppress=true 时有 parent 也返回 None)。

溯源:ReviewPropagation(fork 初始 08-10 前已有)+ R-AR 全文化
(a0f3e0586 08-13 / 5392cd2 08-14 follow_up 改全文)= 双通道形成;
08-18 主人实测复发。commit a6a899e(P-19)时代的双极简通知未触发
主人骂,全文化后一极简一全文暴露。
…nd passes session_id + backend tool_api reads context)
…esktop (undocumented_unsafe_blocks x5, result_large_err, single_element_loop x2, needless_return x2, too_many_arguments)
…GS=-D warnings misreports configured_* helpers as unused (call sites live in all-targets modules)
…sion-control/file-read/browser-timeout config resolvers not yet wired to main flow (R-THR-01), misreported as unused under -D warnings
… 校验,封死外部窗口伪造 bitfun-widget:update 注入
…e react-refresh only-export-components for eslint 0-warning gate
根治(R-WF-25 回归):removed background-command lifecycle bridging into the
execution state machine. BACKGROUND_COMMAND_RUNNING event and the
IDLE->BACKGROUND->PROCESSING transitions are deleted; background command
visibility is carried by the display_state projection (isBusyDisplayState /
backgroundCommandActivityStore), not the turn lifecycle state machine.

兜底: startTurn marks transition(START) failure with isSessionBusy; sendMessage
and drainPendingQueue detect it and re-queue the message silently instead of
surfacing 'Thinking process error' / marking the queued item failed, so the
message runs once the session returns to IDLE.

Test: added queued-drain resurrect fallback test (drain gate passes IDLE, the
machine is revived non-IDLE, the drained message re-queues silently).
- 审计扩展:scripts/i18n-audit.mjs 新增 ui-english JSX 文本节点/属性检测
  + 专名豁免清单 scripts/i18n-ui-english-allowlist.json(BitFun/MCP)
- B 组 ReviewPlatformPanel 全部用户可见英文迁入 common.reviewPlatform.*
  (面板工具/标签/列头/状态决策认证标签/通知/loading 等)
- C 组散点:MCPInteractionDialog/MiniAppEntry/RemoteConnectDialog/FlexiblePanel/
  BranchesView/GraphView/WorkingCopyView/MiniAppScene/SceneBar/ArchivedSessions/
  BrowserPanel/BrowserScene 英文迁入 i18n
- A 组:patterns/团队模板 name/description 渲染接线 t(),
  AgentTeamComposer/AgentTeamCard 接 getCapabilityLabel,ReviewTeamPage 错误边界标题
- locales zh-CN/en-US/zh-TW 三语统一 key(common/components/panels-git/
  scenes-agents/scenes-miniapp)

验证:i18n:audit 0 warning;i18n:contract:test:ci 23/23;
web-ui tsc --noEmit 通过;vitest 521 文件 3909 测试全过;
appearance/theme 合约审计通过。
…resholds.knowledge_search.max_scanned_files

P2 R-B: surface the hard-coded MAX_SCANNED_FILES = 100_000 constant as a
Serde-defaulted field on KnowledgeSearchThresholds (default 100_000, unchanged
legacy behavior) and route the three consumption sites (search_dir depth/file-cap
guard, per-entry file-cap break, scan_file file-cap guard) through the resolved
parameter instead of the literal constant. clippy: too_many_arguments remains
suppressed on search_dir.
recover_machine_id() now reuses the Qoder CN CLI's persisted
~/.qoder-cn/.auth/machine_id (writing a fresh UUID back when the file is
absent) instead of always minting a new UUID on every call. Best-effort
read/write keeps the login flow robust when the file cannot be read or
written. Replaces the single fallback test with readback + writeback
assertions.
- ci-custom.yml: new gitleaks-secret-scan job (pin v8.30.1, fetch-depth:0, gated)
- .gitleaks.toml: allowlist verified false positives (code field names / sha256 / public key / test placeholders)
…onstructors (U-15 upstream evidence ledger)
@1688mengdie
1688mengdie force-pushed the custom/taiji-unofficial branch from c7d1dd6 to b3eafbc Compare August 24, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants