Skip to content

refactor(acp): extract build_acp_agent seam and add skill-config regression test - #6227

Merged
bug-ops merged 2 commits into
mainfrom
fix/6221-acp-spawn-agent-test-seam
Jul 13, 2026
Merged

refactor(acp): extract build_acp_agent seam and add skill-config regression test#6227
bug-ops merged 2 commits into
mainfrom
fix/6221-acp-spawn-agent-test-seam

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #6221

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins (13444 passed, 0 failed)
  • RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"
  • gitleaks protect --staged — no leaks

@github-actions github-actions Bot added refactor Code refactoring without functional changes size/L Large PR (201-500 lines) documentation Improvements or additions to documentation labels Jul 13, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 13, 2026 17:18
@bug-ops
bug-ops force-pushed the fix/6221-acp-spawn-agent-test-seam branch 2 times, most recently from 36d199f to 50b4aab Compare July 13, 2026 17:19
bug-ops added 2 commits July 13, 2026 19:30
…ession test

spawn_acp_agent was the only one of the four Agent construction entry
points (runner.rs, daemon.rs, acp.rs, serve/agent_factory.rs) without a
real-Agent-level regression test proving with_skill_config/
with_skill_coldstart wiring reaches the built Agent — the other three
got one from #5819/#5867/#5827. Its existing coverage stopped at the
deps-assembly layer since spawn_acp_agent consumes the built Agent
directly (runs its session loop and returns ()), leaving no seam to
build through in a test.

Extract the isolated Agent::new_with_registry_arc(...)...
maybe_init_tool_schema_filter(...) builder chain into
build_acp_agent(BuildAcpAgentParams, channel), mirroring
build_daemon_agent/BuildDaemonAgentDeps in daemon.rs. Verbatim move,
no behavior change: everything before (tool-executor assembly,
session-persistence hydration) and after (with_acp_session, code
retrieval, memory, providers, run()) stays in spawn_acp_agent.

Add build_acp_agent_wires_skill_matching_config, mirroring the sibling
tests: builds a real Agent through the new seam with a distinguishable
confusability_threshold and asserts the value reaches
Agent::handle_skills's output, closing the coverage gap.

Closes #6221
@bug-ops
bug-ops force-pushed the fix/6221-acp-spawn-agent-test-seam branch from 50b4aab to 6407e21 Compare July 13, 2026 17:30
@bug-ops
bug-ops merged commit f27ce15 into main Jul 13, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/6221-acp-spawn-agent-test-seam branch July 13, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactor Code refactoring without functional changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

src/acp.rs spawn_acp_agent lacks real-Agent-level regression test for with_skill_config wiring

1 participant