sync: taiji 定制版同步最新基线 8d810b99e(LegionCard 样式统一 + 群聊 P0 修复) - #2262
Open
1688mengdie wants to merge 503 commits into
Open
sync: taiji 定制版同步最新基线 8d810b99e(LegionCard 样式统一 + 群聊 P0 修复)#22621688mengdie wants to merge 503 commits into
1688mengdie wants to merge 503 commits into
Conversation
added 30 commits
August 16, 2026 18:45
…-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 断言)。
… disclose idle test P1-1: workflow_preset_spawns_multiple_groups no longer depends on get_global_coordinator global singleton (early-return idle). Test now builds its own isolated coordinator via new_isolated_test_coordinator (same construction chain as create_send_history_list_roundtrip_with_ real_coordinator), so WF-2 assertions always really execute. P1-2: removed 'runs after another test' order assumption - Rust tests run in parallel with no order guarantee; isolated coordinator has zero cross-test global side effects. P1-3: fix log now discloses the original idle test (section 3 claimed 35 passed including an idle test without disclosure). Also added delete_preset cleanup so no wf-rwf06-* preset residual remains. Verified: cargo check --features product-full 0e0w; group_room 35 passed (0.87s); workflow test alone 0.26s (not 0.00s); full lib 2495 passed.
…ingle-failure tests P0-1 (batch4 review): member back-mark (groupChats) was written into the group workspace domain but read from the member workspace domain -> cross-domain break -> replication silently no-op. Now write-side resolves the member's real workspace (memory config -> disk binding) and writes the back-mark into the member domain, matching the read side and delete_group. Tests: - replicate_member_turn_across_workspaces: member/group workspaces differ, back-mark lands in member domain, replication still succeeds - replicate_is_non_blocking_async: tokio::spawn path completes without panic - replicate_continues_when_single_group_fails: one broken group warns and continues, healthy group still receives the reply
P0-1 storage-domain unification + P1-1 async test + P1-2 single-failure test, verification evidence, and acceptance assertion mapping.
… keep tool spec cards compact)
…ming assert + P2 add_group_member warn-continue
… spec, and agentAPI mocks (run 31965568488 A/B/C/E)
added 12 commits
August 22, 2026 17:24
根治(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 合约审计通过。
…mermaid>uuid override/pnpm 10.34.4/yaml 2.8.3
…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
force-pushed
the
custom/taiji-unofficial
branch
from
August 24, 2026 23:17
c7d1dd6 to
b3eafbc
Compare
The trend chart's cache hit-rate polyline dropped null buckets and joined the remaining points into one polyline, so an idle stretch (all token counters at zero, no cache telemetry) was visually bridged by a high dashed line connecting the buckets on either side - the chart implied a ~97% hit rate over hours where the tooltip correctly showed no data. - split the hit-rate series into contiguous segments that stop at buckets without telemetry; an isolated point renders as a dot - add hover marker dots for every series so small values stay visible on a zero-baseline token axis (e.g. 276K next to a 20M peak reads as flat zero without an anchor) - format the tooltip hit rate with formatHitRate (two-decimal truncate) instead of Math.round for consistency with the summary cards
Splitting the hit-rate series at buckets without telemetry left isolated dots and blank stretches, which read as a broken chart. Idle buckets already draw every token series at zero, so plot the hit rate at 0% there too and keep one continuous dashed line; the tooltip mirrors the line with 0.00% instead of an en dash.
…me, agent-hooks guards Upstream base: 134a20c -> upstream/main 4c68f1c Behind 49 commits / ahead 487 local custom commits. Conflicts resolved per the four-principles policy: - ci.yml: keep local -D warnings gates + eslint max-warnings=0, adopt upstream build-impact classifier & windows matrix (principle-1 + 3 merge). - webview_recovery.rs: adopt upstream request_controlled_restart/request_desktop_exit. - ai-adapters chat.rs/responses.rs + core-types ai.rs: keep local CodeBuddy session/ conversation_request_id header injection AND adopt upstream output_schema field; keep Responses store=false disable (both sides preserved). - agents registry builtin.rs: tokio RwLock (local) + upstream from_builtin_agents / for_profile split (principle-4). - coordinator.rs: keep AcpClientPort/AgentDialogTurnPort imports and local rename broadcast assertion; adopt OUTPUT_SCHEMA_CONTEXT_KEY import + copy_output_schema_context. - edit_constraint_guard.rs: schema v7 + allow-set scope-replace (local) merged with upstream current_edit_constraint_state/check_with_state refactor + TEST state key. - execution_engine.rs: model_request_context gains both local (session_id, conversation_request_id) and upstream (output_schema context) parameters. - session_control_tool.rs / agent-runtime session_control.rs: keep compact action + short_name/model_id/worktree/detail fields; adopt upstream rename action end-to-end. - session_message_tool.rs: keep local ACP direct path + R-COMM-01 delivery gate. - state_manager.rs: keep BUG-04 cancel_state_if_not_terminal CAS guard; adopt apply_hook_input_rewrite (replace_effective_arguments + rejection preservation). - config types/service: DEFAULT_MAX_ROUNDS stays 50 (owner directive) but honors upstream semantics that explicit 0 disables the fixed round limit; legion top-level keys test kept alongside upstream telemetry downgrade tests. - tool-provider-groups/lib.rs: keep PlanList/PlanRead/PlanUpdate + group-chat tools in core.session/core.agent (local surface), adopt upstream atomic owner split; harness crate removed with upstream (modify/delete: local only had license.workspace line, no other customization -> follow upstream delete, principle-1 no custom content lost).
…e stats Upstream base: 4c68f1c -> upstream/main 3adf7be Behind 8 commits: minimal mode feature family (db09a81/06f980ce7/271fc9491 GCWing#2547) + usage-statistics fixes (6330839/13a49f7ad/54172dc82/3adf7be0b). Conflicts resolved per the four-principles policy: - modes/mod.rs + agents/mod.rs + catalog.rs: keep local group/Legion modes AND adopt upstream minimal mode registrations (principle-3 both-preserved). - agent-runtime agents.rs mode_presentation_rank: unified ordering agentic=0, minimal=1..Team=7, group=8, Legion=9 (local modes appended after upstream set). - default_model_id_for_builtin_agent: union of both sides incl. minimal/group/Legion. - registry query.rs Mode tool policy: keep R-WF-16 globally-disabled filter (local) and adopt apply_mode_tool_augmentation chain, then dynamic MCP merge; filters run last so hidden tools can never re-enter via augmentation. - persistence manager list_sessions: merge both tuple extensions - keep R-WF-11 seven-state display projection AND upstream legacy_minimal_agent flag for the "minimal" agent_type rewrite in SessionSummary. - mode_config_canonicalizer: adopt upstream apply_implicit_thread_goal_policy (extracted helper); local allow(clippy::too_many_arguments) dropped because the attributed fn takes 8 args <= threshold after upstream refactor. - prompt_catalog_contracts: both legion_mode and minimal-harness-v1 prompt entries. - agent_registry_contracts test: keep local indices (Legion at position 10 keeps specs[11]/specs[18] stable); default-model assertions now include minimal.
usage hit-rate semantics Adopted-from: GCWing#2534 (fix/usage-stat-chart-hit-rate, head 89c939f) Scope: drop cache_write metric from statistics pipeline + chart, keep hit-rate trend line continuous (gaps plot at 0%). Conflict resolution per commander directive: - cache_write display/aggregation tug-of-war with GCWing#2548 resolved in favor of GCWing#2534 in CHART PIPELINE (series dropped) while backend telemetry fields retained per GCWing#2548 data-retention (api types + test fixtures keep cacheWriteTokens). - Rate rendering merged: rateFor(number|null) + unconditional hover dot + tooltip value hoveredHitRate ?? 0 to mirror rendered line. Verification: cargo check -p bitfun-services-core --jobs 4 0e0w + pnpm type-check (recorded in sync-record-2534-adopt-20260827.md)
…re-existing on baseline, surfaced by type-check during GCWing#2534 adoption)
…opic backends
Zhipu (bigmodel.cn / api.z.ai) and OpenBitFun anthropic-wire gateways report
input_tokens as the FULL prompt (fresh + cached already included). The
converter previously summed input + cache_read + cache_creation assuming
native Anthropic disjoint-field semantics, double-counting cached tokens:
records showed inflated inputs (algebraically 254638 = 127790 + 126848) and a
halved apparent hit rate (about 48.6 percent vs the provider dashboard 92.21
percent which uses cached over fresh).
Introduce AnthropicUsageSemantics { Native, NonNative } and
Usage::into_unified(semantics). NonNative keeps prompt_token_count verbatim
and preserves cache_read and cache_creation as separate output fields; Native
(the From<Usage> default) keeps the existing total-context sum unchanged.
New quirks helper anthropic_usage_semantics_for_url() classifies zhipuai and
openbitfun hosts as NonNative (conservative Native default for unknown
gateways); send_stream resolves it before moving url and threads it through
the new handle_anthropic_stream_with_usage_semantics entry point.
Tests: non_native_backend_keeps_input_verbatim locks verbatim-input behavior
with the real reconciliation sample; native tests preserved via From default.
Also patch two pre-existing test initializers missing ModelRequestContext
fields that blocked cargo test on this baseline.
上游同步:GCWing/BitFun main @ 3adf7be 合入稳定版定制分支 custom/taiji-unofficial(含 minimal mode GCWing#2547、usage 统计修复、output_schema、 session rename 动作、agent-hooks 改造面等官方提交全量)。 冲突 29 处按四原则逐个解决: - ③并集并存:core-types ai.rs ModelRequestContext 三字段并存; execution_engine 四参签名双端适配;session_control Rename 白名单 + Compact/short_name/model_id/worktree/detail 本地参数组保留; modes/agents/builtin/catalog 注册并集(group/Legion + minimal); coordinator 双 helper 并存;edit_constraint_guard SCHEMA_VERSION=7 本地 保留 + 上游 state 重构收入;persistence manager 四元组投影融合; config service tests 相邻并存;prompt contracts 以合并后真实序断言 (Legion 保持 11 位);agents.rs presentation_rank 统一序 agentic=0, minimal=1..Team=7, group=8, Legion=9;default_model 并集; FlowChatStore 删除路径 allRemovedIds 融合 askUserQuestionDraftStore 清理; AgentsScene team editor 区块 + 上游 toolCatalog 状态提示并存; AgentsScene.test Batch B 本地组重建 + 上游 unsupported catalog 测试追加; webview_recovery / openai chat / responses / state_manager 按 B1 同名 文件同方案处置。 - ①主人定标保留:DEFAULT_MAX_ROUNDS=50(融合注释 0=关闭固定上限语义); session_message_tool ACP 直通 + COORD-03 权威判定;PlanList/PlanRead/ PlanUpdate + group-chat 工具集保留,submit_code_review 归位 core.review (上游原子拆分结构采纳);harness 引用随上游删除。 - ①modify/delete 归属裁定:harness/Cargo.toml 随上游删除—— merge-base..HEAD 该文件仅 license.workspace 一行、无实质定制, bitfun-harness 全仓零代码引用。 验证:cargo check default/agent-runtime/product-full 三组合绿、clippy 0 warning、fmt 干净、冲突标记全仓零残留(记录见 sync-record-20260827-04.md)。
- session_control_tool: resolve_effective_workspace 重命名 arm 去重—— Rename 独立分支(复用 rename_request helper),Cancel/Delete/Compact 保持会话绑定解析;List 补全 params.workspace 参数传递 - ModelRequestContext.output_schema 字段(上游新增)四处构造点补 output_schema: None:session_message_tool 直通投递、task/execution ACP 结果回投、coordinator 双处 follow-up 投递 - core Cargo.toml agent-runtime feature 组合补 "git"(K18/U-23 族: session_control_tool 无条件引用 service::git/worktree,与 B1 dev 版 同源同修,注释注明依据) - execution_engine: workspace_instruction_digest 的 external-sources 调用块与 BTreeMap 导入加 cfg(feature="external-sources") 门; 缓存 identity 构造点 external_sources 未用变量按 cfg 兜底(非 external-sources 编译下该开关仅参与 scope key 文案,语义不变) - clippy 归零处置:round_executor/coordinator cfg 分支必需 return 改尾表达式;stored_agent_profile_from_tool_selection 8 参契约函数 显式 allow(too_many_arguments);desktop window_state_support WINDOWPLACEMENT 字段初始化改结构体字面量 - cargo fmt 全仓归整(dialog.rs cancel_tool 等签名格式) 验证:cargo check --workspace --all-features 绿;clippy agent-runtime + --workspace --all-features 0 warning;fmt --check 干净。
…rate visualization (Adopted-from: GCWing#2534)
…ntics for non-native anthropic backends
Upstream: GCWing/BitFun main e07bfac chore(deps): upgrade h2 to 0.4.19 (RUSTSEC-2026-0258) Cargo.lock conflict resolved per upstream lockfile (h2 0.4.15 -> 0.4.19); local deps intact.
…828 B2 serial merge Merge taiji dev full-baseline HEAD 2923d0c (B1 two upstream rounds + GCWing#2534 adoption + anthropic.rs denominator fix): - dev-only: sealed pre-commit baseline, GCWing#2534 usage hit-rate visualization (token_usage/web-ui UsageStatisticsConfig/AssistantDefaultsPage/i18n) - anthropic.rs usage denominator semantics for non-native backends (8 files) - local customs retained: SessionControl compact/Rename chain, agent-runtime facade git feature, tool-provider-groups four tools, AgentsScene test suite, DEFAULT_MAX_ROUNDS=50, window_state struct init fix 6 conflicts resolved per the four principles (see sync-record-20260828-B2.md).
…n usage stats test (TESTFIX-USAGE-0828) Adopted-from GCWing#2534 pre-existing defect: the original PR commit (ab8a543) asserted data-cache-hit-rate-segment line/point attributes that its own chart implementation never rendered. The later adopted-baseline commit (3adf7be, upstream/main and full-baseline@2923d0cd4) rewrote the hit-rate rendering to a single continuous dashed polyline, but carried the stale segment/tooltip superset assertions forward, leaving the file red everywhere. Qualification: category 1 - upstream test defective against its own implementation; fix = align assertions with the adopted rendering behavior. Implementation is untouched. Changes (test file only): - Remove the two data-cache-hit-rate-segment querySelectorAll assertions. - Assert the adopted continuous-line shape instead: 3 token polylines + 1 dashed hit-rate polyline under .bitfun-usage-stats__trend-svg. - Align the tooltip expectation to the rendered semantics: an active telemetry gap resolves to 0.00% (line plots gaps at zero), not the stale '–'. - Rename the case to match the actual continuous-line contract. Evidence chain: upstream/main contains ab8a543..3adf7be as linear history (git merge-base --is-ancestor = 0); identical red reproduced at full-baseline@ 2923d0c; sync-record-20260828-B2.md section 7.7. Verified: vitest run of UsageStatisticsConfig.test.tsx + tokenUsageStatisticsApi.test.ts -> 11 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
同步内容
taiji 定制版(custom/taiji-unofficial)同步最新基线 \8d810b99e\(相对上次合并基线 aa98261 前进,含上游合流 9b05dd0)。
本 PR 新增关键提交
验证