Topology ablation bench: read YAMS_BENCH_DAEMON_DATA_DIR so multiple
daemon spawns can share a stable data_dir. Lets the topology tuner's
persisted MAB state carry over between bench reps; without this, every
fresh DaemonHarness spawn cold-starts UCB1 and picks the alphabetically-
first arm. Pairs with the TopologyTuner persistence (already on HEAD).
Bench also gains per-surface vector-leg counters (vec_unique_doc_counts,
topology_weak_routing_applied, vector_tier_skip_reason, embedding_status,
vector_db_dim/query_embedding_dim) and a modeOf reducer for categorical
metrics — Phase F1-era richer attribution carried forward.
Docs: AGENTS.md / daemon_architecture / retrieval_precision_optimization /
PROMPT-eng-codex updates from the parallel sessions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SocketServer:
- Increase connection handler wait timeout from 100ms to 2s
- Increase accept loop wait timeout from 500ms to 3s
- Prevents race conditions where handlers are cancelled mid-operation
WorkCoordinator:
- Replace thread detach with extended join attempt
- Prevents use-after-free from detached threads accessing freed resources
Daemon Command:
- Increase shutdown wait timeout from 3s to 6s
- Increase default waitForDaemonStop timeout from 5s to 10s
- Allows time for graceful SocketServer shutdown
These changes address SIGABRT and SIGTERM issues during daemon shutdown
by ensuring async operations complete before resources are freed.