文件最后提交记录最后更新时间
test(core): session fixture invariant tests (benchmark automation Stage 1) Commits two clean hermes session jsonls to tests/fixtures/: - session_p0_sprint_clean.jsonl (2026-04-22 21-11-34, 7 turns, full post-P0 behavior: #5 auto-stop nudge fired, multi-step task completed, markdown summary, no continuation placeholders) - session_404_recovery.jsonl (2026-04-22 20-12-44, 4 turns, #4 path ranking + #14b read_file preferred-over-bash-cat exercised) New tests/session_fixture_invariants_test.rs runs 6 assertions per fixture when present: - no (continuing...) / (completed) / Continue. placeholders (would indicate continuation recovery mechanism was re-introduced) - no "summarize and stop instead of continuing" directive (old #5 nudge wording that caused weak models to skip user-requested steps) - no sed -i / perl -pi / awk -i inplace shell-workaround tool calls (P0 #2 anti-bypass regression check) - every bash ToolResult output carries exit: N / killed: marker (P0 #3 exit-code-in-marker regression check) - meta: collector sees Assistant content (catches jsonl schema drift that would silently make all other asserts trivially pass) Explicit limits — does NOT catch regressions whose fixture is never refreshed, and does NOT run a real replay harness. Stage 2 (a real ReplayProvider + minimal AgentLoop test harness driving recorded responses back through the framework) is tracked as P1 #14d in project_095x_roadmap.md, ~1.5 day of infra work — deferred until regression evidence warrants the investment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 1 个月前
feat: add comprehensive hook system with webhook and async batch support - Implement hook framework with 13 extension points * Message, Turn, Tool, Session, and System level hooks * Pre/post execution hooks with modify/deny capabilities * Priority-based hook ordering - Add webhook support for remote HTTP integration * Synchronous webhook mode * Custom headers and authentication * Automatic retry with exponential backoff - Implement async webhook with batch sending * Non-blocking event queue (< 1ms latency) * Configurable batch size and flush interval * Background tokio task processing * Reduces HTTP requests by 90-98% - Add CLI commands for hook management * 'atomcode hooks list' - view loaded hooks * 'atomcode hooks paths' - show config paths * 'atomcode hooks test' - test individual hooks - Include 6 built-in engineering hooks * Tool audit logging * Turn statistics * Auto git commit * Session summary * Error reporting * Response validation - Fix existing test failures * self_update version comparison logic * Windows path JSON escaping in read tests * Edit test Windows compatibility - Add comprehensive documentation * Hook usage guide * Complete timing reference * Webhook integration guide * Async webhook guide * CLI command guide - Add example hooks (shell scripts) * Tool call logger * Auto git commit * Code review helper Tested: 305+ tests passing, build successful Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> 10 天前
Merge feat/telemetry-v2 into release/v4.20.1 Integrates the atomcode-telemetry crate (new) with the MCP support, Ollama function-calling, and background-commands features from release. Key resolutions: - CLI Commands enum: kept both Mcp(McpCli) and Telemetry { action } variants - atomcode_tuix::run(): added mcp_registry + mcp_connect_rx + telemetry params - LoopCtx: added both mcp_registry/mcp_connect_rx/mcp_reload and telemetry fields - runner.rs: kept telemetry scope + tel_return! macro; added unwrap_doubly_nested_args from HEAD into v2's ToolCallDone arm; preserved HEAD's async ToolRegistry API - bash.rs: merged HEAD's enhanced netcat/mknod security detection with v2's code structure improvements; added visit_f64 to lenient deserializer - agent/mod.rs: took HEAD's emit_rich_context_stats().await form - daemon/main.rs: kept register_sync form + telemetry Disabled("daemon") init - commands.rs: took HEAD (mcp, background, init; no /fixissue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 1 个月前
Merge feat/telemetry-v2 into release/v4.20.1 Integrates the atomcode-telemetry crate (new) with the MCP support, Ollama function-calling, and background-commands features from release. Key resolutions: - CLI Commands enum: kept both Mcp(McpCli) and Telemetry { action } variants - atomcode_tuix::run(): added mcp_registry + mcp_connect_rx + telemetry params - LoopCtx: added both mcp_registry/mcp_connect_rx/mcp_reload and telemetry fields - runner.rs: kept telemetry scope + tel_return! macro; added unwrap_doubly_nested_args from HEAD into v2's ToolCallDone arm; preserved HEAD's async ToolRegistry API - bash.rs: merged HEAD's enhanced netcat/mknod security detection with v2's code structure improvements; added visit_f64 to lenient deserializer - agent/mod.rs: took HEAD's emit_rich_context_stats().await form - daemon/main.rs: kept register_sync form + telemetry Disabled("daemon") init - commands.rs: took HEAD (mcp, background, init; no /fixissue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 1 个月前
Merge feat/telemetry-v2 into release/v4.20.1 Integrates the atomcode-telemetry crate (new) with the MCP support, Ollama function-calling, and background-commands features from release. Key resolutions: - CLI Commands enum: kept both Mcp(McpCli) and Telemetry { action } variants - atomcode_tuix::run(): added mcp_registry + mcp_connect_rx + telemetry params - LoopCtx: added both mcp_registry/mcp_connect_rx/mcp_reload and telemetry fields - runner.rs: kept telemetry scope + tel_return! macro; added unwrap_doubly_nested_args from HEAD into v2's ToolCallDone arm; preserved HEAD's async ToolRegistry API - bash.rs: merged HEAD's enhanced netcat/mknod security detection with v2's code structure improvements; added visit_f64 to lenient deserializer - agent/mod.rs: took HEAD's emit_rich_context_stats().await form - daemon/main.rs: kept register_sync form + telemetry Disabled("daemon") init - commands.rs: took HEAD (mcp, background, init; no /fixissue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 1 个月前
chore(core): 清理既有编译告警 合并后 cargo check 暴露的存量告警(均在 atomcode-core,与本次合并无关): - 移除未使用 import(glob/bash/hook_test/webhook_test/hook_integration_test) - 去掉多余 mut、未使用变量改 _result(turn/tests、plugin/loader) - 死代码测试辅助函数加 #[allow(dead_code)](engine、config_loader) - RAII Guard 的 TempDir 字段加 #[allow(dead_code)](plugin_integration) - script_runner trait-bound 断言 require_hook::<ScriptHook>(); 改为真正调用, 消除 path_statement 告警 - hook_integration_test::create_test_runner 改 async 并 .await registry.register (register 是 async,原先 future 被丢弃,MockEchoTool 实际从未注册——顺手修掉) 验证:cargo check --workspace --exclude atomcode-codingplan-crypto --tests 零告警零错误。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 2 天前
chore(core): 清理既有编译告警 合并后 cargo check 暴露的存量告警(均在 atomcode-core,与本次合并无关): - 移除未使用 import(glob/bash/hook_test/webhook_test/hook_integration_test) - 去掉多余 mut、未使用变量改 _result(turn/tests、plugin/loader) - 死代码测试辅助函数加 #[allow(dead_code)](engine、config_loader) - RAII Guard 的 TempDir 字段加 #[allow(dead_code)](plugin_integration) - script_runner trait-bound 断言 require_hook::<ScriptHook>(); 改为真正调用, 消除 path_statement 告警 - hook_integration_test::create_test_runner 改 async 并 .await registry.register (register 是 async,原先 future 被丢弃,MockEchoTool 实际从未注册——顺手修掉) 验证:cargo check --workspace --exclude atomcode-codingplan-crypto --tests 零告警零错误。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 2 天前
fix: clear file_read_counts at turn start to prevent cross-turn false-positive blocking Bug: the file read-region guard that detects repeated reads of the same region was carrying counts across turns. After context compression removes file content from conversation history, the model needs to re-read those files 鈥?but accumulated counts from the previous turn could cause legitimate reads to be incorrectly flagged as a loop. Fix: clear file_read_counts at the beginning of run_with_filter(), so each turn starts from a clean state. The guard remains effective for detecting looping reads within a single turn. Regression test: file_read_counts_clear_between_turns() drives a region to the 3-call cap in turn-1, simulates the turn boundary by clearing counts, then verifies the same region can be read legitimately in turn-2 without premature blocking. Also fix missing plugin_root: None in hooks_integration test helper. 29 天前
feat(mcp): skip non-protocol stdout lines from noisy stdio servers Some third-party MCP servers incorrectly print status logs to stdout after initialization, causing an immediate transport error. Change the stdio transport to skip plain-text lines (up to 100) between protocol messages instead of bailing, making these servers usable while still failing on truly malformed or infinite non-protocol output. - recv_jsonrpc_response now loops past non-JSON/Content-Length lines - Add MAX_SKIP_LINES=100 guard to prevent infinite loops - Add env-gated noise (MCP_TEST_STDOUT_NOISE_AFTER_INITIALIZED) to mock test server for testing this scenario - Add integration tests for both noisy and clean stdio servers 29 天前
Merge feat/telemetry-v2 into release/v4.20.1 Integrates the atomcode-telemetry crate (new) with the MCP support, Ollama function-calling, and background-commands features from release. Key resolutions: - CLI Commands enum: kept both Mcp(McpCli) and Telemetry { action } variants - atomcode_tuix::run(): added mcp_registry + mcp_connect_rx + telemetry params - LoopCtx: added both mcp_registry/mcp_connect_rx/mcp_reload and telemetry fields - runner.rs: kept telemetry scope + tel_return! macro; added unwrap_doubly_nested_args from HEAD into v2's ToolCallDone arm; preserved HEAD's async ToolRegistry API - bash.rs: merged HEAD's enhanced netcat/mknod security detection with v2's code structure improvements; added visit_f64 to lenient deserializer - agent/mod.rs: took HEAD's emit_rich_context_stats().await form - daemon/main.rs: kept register_sync form + telemetry Disabled("daemon") init - commands.rs: took HEAD (mcp, background, init; no /fixissue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 1 个月前
Merge remote-tracking branch 'origin/release/v4.24.1' into release/v4.24.1 2 天前
fix(runner): normalize tool calls before conversation finalization to prevent tool_call/tool_result mismatch Move merge_edit_calls to run before finalize_stream_with_tool_calls, so the assistant message in conversation history declares exactly the same number of tool calls as the ToolResult messages appended later. Without this, the next provider request receives an assistant message with more tool calls than results, causing a parity mismatch. Also add assert_tool_call_result_parity test fixture invariant that catches this class of bug automatically. 1 个月前
fix(session): 压缩后保住原始 prompt,/resume 不再开局就是 tool_call bug: /resume 后滑到顶部看不见自己最初问的 prompt,直接是 list_directory / bash / read_file 一串 tool 调用;session JSON 文件里也没有原始 prompt 的痕迹。 根因:hard_truncate_to_target (agent/mod.rs:3178) 找"last user message"作为 sacred 锚点,但 agent 在 turn 过程中会以 Role::User 注入 3 种合成消息: [Additional context from user]: ...、 `Output limit hit. ...[Context was compressed. ...]`。这些合成消息让 last_user_idx 指向了某条注入而非真实原始 prompt,触发压缩时原始 prompt 在 drain(0..keep_from) 里被一并砍掉,落盘 JSON 也丢失。 修复(opencode 子集): 1. Messagesynthetic: bool 字段。#[serde(default)] + skip-if- false,旧 session.json 反序列化默认为 false,序列化时常见 false 不 写盘,无 bloat。新增 Message::synthetic_user() 构造器。 2. 3 个合成注入点改用新的 Conversation::add_synthetic_user_message, 该方法 merge 逻辑保留既有 synthetic 标(real + synthetic 文字 append 后不会被错误升级为 synthetic)。 3. hard_truncate_to_target sacred 集合从 {last_user} 扩展为 {first_real_user, last_real_user},两个 anchor 都 filter !m.synthetic。first 保会话锚点供 /resume,last 保当前任务上下文。 单 prompt 场景下两者重合,compaction 宁可超 budget 也不丢 prompt (tier 1/2 仍可降 token,tier 3 在这种场景退化为 no-op 是设计取舍)。 4. session.rs::auto_name_from_messages、event_loop::apply_session_messages 主信号改用 synthetic 字段,次信号保留 bracket-prefix 启发式作为旧 session 兜底,避免老 JSON /resume 标题退化。 参考:opencode 的 message-v2.ts synthetic part 字段 + replay 机制 是公认的"原始 prompt 保护"工程化做法;DeepSeek-TUI 只在 metadata.title 存截断版,不能恢复完整 prompt。我们抄了 opencode 的 synthetic 字段 + 双 anchor sacred,没抄 replay(那是单独的"压缩后给模型重新喂上下文" 机制,不在本 bug 范围)。 测试(12 个新): - message.rs: 5 个 — 构造器 / serde 默认 false / 不序列化 false / 序列化 true / 反序列化兼容 - conversation/mod.rs: 3 个 — syn 注入标记 / syn 合并到 real 保 real / syn 合并到 syn 保 syn - agent/mod.rs: 3 个 — 复现 bug 场景验证原始 prompt 保留 / 多轮场景 验证 last real 跳过尾部 syn / 空 conv 不 panic - event_loop session_naming tests 全过(legacy bracket fallback 还在) 跨 provider/render/test fixture 共 19 处 Message {} 字面量补全 synthetic: false(脚本批量,brace-aware,跳过 -> Message { 函数签名)。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 10 天前
fix(setup): address code review issues - sync fn, --force reinstall, setup hint robustness 14 天前
Merge feat/telemetry-v2 into release/v4.20.1 Integrates the atomcode-telemetry crate (new) with the MCP support, Ollama function-calling, and background-commands features from release. Key resolutions: - CLI Commands enum: kept both Mcp(McpCli) and Telemetry { action } variants - atomcode_tuix::run(): added mcp_registry + mcp_connect_rx + telemetry params - LoopCtx: added both mcp_registry/mcp_connect_rx/mcp_reload and telemetry fields - runner.rs: kept telemetry scope + tel_return! macro; added unwrap_doubly_nested_args from HEAD into v2's ToolCallDone arm; preserved HEAD's async ToolRegistry API - bash.rs: merged HEAD's enhanced netcat/mknod security detection with v2's code structure improvements; added visit_f64 to lenient deserializer - agent/mod.rs: took HEAD's emit_rich_context_stats().await form - daemon/main.rs: kept register_sync form + telemetry Disabled("daemon") init - commands.rs: took HEAD (mcp, background, init; no /fixissue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 1 个月前
chore(core): 清理既有编译告警 合并后 cargo check 暴露的存量告警(均在 atomcode-core,与本次合并无关): - 移除未使用 import(glob/bash/hook_test/webhook_test/hook_integration_test) - 去掉多余 mut、未使用变量改 _result(turn/tests、plugin/loader) - 死代码测试辅助函数加 #[allow(dead_code)](engine、config_loader) - RAII Guard 的 TempDir 字段加 #[allow(dead_code)](plugin_integration) - script_runner trait-bound 断言 require_hook::<ScriptHook>(); 改为真正调用, 消除 path_statement 告警 - hook_integration_test::create_test_runner 改 async 并 .await registry.register (register 是 async,原先 future 被丢弃,MockEchoTool 实际从未注册——顺手修掉) 验证:cargo check --workspace --exclude atomcode-codingplan-crypto --tests 零告警零错误。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> 2 天前
Merge feat/telemetry-v2 into release/v4.20.1 Integrates the atomcode-telemetry crate (new) with the MCP support, Ollama function-calling, and background-commands features from release. Key resolutions: - CLI Commands enum: kept both Mcp(McpCli) and Telemetry { action } variants - atomcode_tuix::run(): added mcp_registry + mcp_connect_rx + telemetry params - LoopCtx: added both mcp_registry/mcp_connect_rx/mcp_reload and telemetry fields - runner.rs: kept telemetry scope + tel_return! macro; added unwrap_doubly_nested_args from HEAD into v2's ToolCallDone arm; preserved HEAD's async ToolRegistry API - bash.rs: merged HEAD's enhanced netcat/mknod security detection with v2's code structure improvements; added visit_f64 to lenient deserializer - agent/mod.rs: took HEAD's emit_rich_context_stats().await form - daemon/main.rs: kept register_sync form + telemetry Disabled("daemon") init - commands.rs: took HEAD (mcp, background, init; no /fixissue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> 1 个月前