Skip to content

test: exercise real production wiring in acp/daemon memory-loop tests - #6179

Merged
bug-ops merged 2 commits into
mainfrom
fix/6170-acp-daemon-loop-test-wiring
Jul 12, 2026
Merged

test: exercise real production wiring in acp/daemon memory-loop tests#6179
bug-ops merged 2 commits into
mainfrom
fix/6170-acp-daemon-loop-test-wiring

Conversation

@bug-ops

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

Copy link
Copy Markdown
Owner

Summary

  • src/acp.rs's acp_memory_maintenance_loops_registered_on_connection_supervisor and src/daemon.rs's daemon_memory_maintenance_loops_registered_on_mem_supervisor regression tests reconstructed the memory-maintenance-loop spawn blocks inline with a mock TaskSupervisor, rather than invoking the real production wiring path (build_acp_deps/run_daemon). A broken or inverted config.memory.*.enabled guard in production would go undetected by either test.
  • Extracted the wiring into standalone spawn_acp_memory_maintenance_loops (src/acp.rs) and spawn_daemon_memory_maintenance_loops (src/daemon.rs) functions, mirroring the existing spawn_memory_maintenance_loops pattern already used in src/serve/deps.rs. Both build_acp_deps/run_daemon now call the extracted functions, and both regression tests now call them directly instead of reconstructing the spawn logic.
  • Pure test/production-coupling fix — no behavior change. All ten memory-maintenance loops still spawn identically, gated the same way, via TaskSupervisor::spawn.

Closes #6170

Test plan

@github-actions github-actions Bot added tests Test-related changes size/XL Extra large PR (500+ lines) documentation Improvements or additions to documentation labels Jul 12, 2026
@bug-ops
bug-ops force-pushed the fix/6170-acp-daemon-loop-test-wiring branch from df48698 to 58e07d2 Compare July 12, 2026 21:37
@github-actions github-actions Bot added tests Test-related changes and removed tests Test-related changes labels Jul 12, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 12, 2026 21:38
@bug-ops
bug-ops force-pushed the fix/6170-acp-daemon-loop-test-wiring branch from 58e07d2 to e614566 Compare July 12, 2026 21:39
@github-actions github-actions Bot added tests Test-related changes and removed tests Test-related changes labels Jul 12, 2026
bug-ops added 2 commits July 12, 2026 23:57
acp.rs and daemon.rs regression tests reconstructed the memory-maintenance-
loop spawn blocks with a mock TaskSupervisor instead of calling the real
production wiring, so a broken config gate would go undetected. Extract the
wiring into standalone functions mirroring serve/deps.rs's existing pattern
and have both tests call them directly.
The function extracted in #6170 was missing the #[cfg(feature = "acp")]
gate that its call sites (build_acp_deps, the regression test) already
carry, so it compiled unconditionally and failed to resolve AppBuilder
under feature bundles without acp/acp-http (bench, desktop, server, chat).
@bug-ops
bug-ops force-pushed the fix/6170-acp-daemon-loop-test-wiring branch from e614566 to 2d06014 Compare July 12, 2026 21:57
@github-actions github-actions Bot removed the tests Test-related changes label Jul 12, 2026
@bug-ops
bug-ops merged commit 404dcaa into main Jul 12, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/6170-acp-daemon-loop-test-wiring branch July 12, 2026 22:04
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 size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

acp.rs/daemon.rs memory-loop regression tests reconstruct production wiring instead of calling it

1 participant