Context
f347a0a46 (fix(index): require opt-in for linked worktree scopes) gates project-open code-index activation for a linked worktree behind sync.watch_linked_worktrees (default false). daemon::tests::runtime_identity::concurrent_same_identity_worktrees_keep_exact_server_and_scheduler_bindings predates that contract and still asserts the linked route serves tracedecay_files; it now correctly answers code-graph-unavailable.
While repairing that test (production fixes for the federated store locator, the scope-digest pairing, and the observability store-owner identity are landing separately), a lane prototyped the opt-in (sync.watch_linked_worktrees = true through the production configuration surface plus a wait on subscribe_serving_seats / generation publications for the boundary) and reverted it because indexing the linked route exposes three further defects, each needing its own root cause:
- Reopening the linked route fails with
a different retained runtime is already registered for this project — crates/tracedecay-daemon-service/src/invocation/registrars.rs (~line 1204) requires Arc::ptr_eq on a ports Arc that a reopen necessarily replaces. Same class as the observability-registry identity defect (store authority, not object identity, is the identity).
- Concurrent open intermittently blocks ~30 s at
linked phase=graph_admitted elapsed_ms=30070 and then fails project Context Scout durable owner is unavailable (crates/tracedecay/src/daemon/engine.rs ~line 183).
engine.shutdown_all() then exceeds the test's 5 s bound. The bound must not be extended; find what holds shutdown.
Acceptance
- With
sync.watch_linked_worktrees = true, a second worktree of the same project opens, indexes, reopens, and shuts down within the existing bounds, concurrently with the primary.
- No timeouts extended, no retries or polling added; waits are on typed signals (serving seats, publications, route cancellation).
concurrent_same_identity_worktrees_keep_exact_server_and_scheduler_bindings (or its restated successor) green on Linux and macOS CI.
Targets codex/tracedecay-total-redesign-plan-reopened (#707). Refs #863, #896.
Context
f347a0a46(fix(index): require opt-in for linked worktree scopes) gates project-open code-index activation for a linked worktree behindsync.watch_linked_worktrees(default false).daemon::tests::runtime_identity::concurrent_same_identity_worktrees_keep_exact_server_and_scheduler_bindingspredates that contract and still asserts the linked route servestracedecay_files; it now correctly answerscode-graph-unavailable.While repairing that test (production fixes for the federated store locator, the scope-digest pairing, and the observability store-owner identity are landing separately), a lane prototyped the opt-in (
sync.watch_linked_worktrees = truethrough the production configuration surface plus a wait onsubscribe_serving_seats/ generation publications for the boundary) and reverted it because indexing the linked route exposes three further defects, each needing its own root cause:a different retained runtime is already registered for this project—crates/tracedecay-daemon-service/src/invocation/registrars.rs(~line 1204) requiresArc::ptr_eqon a portsArcthat a reopen necessarily replaces. Same class as the observability-registry identity defect (store authority, not object identity, is the identity).linked phase=graph_admitted elapsed_ms=30070and then failsproject Context Scout durable owner is unavailable(crates/tracedecay/src/daemon/engine.rs~line 183).engine.shutdown_all()then exceeds the test's 5 s bound. The bound must not be extended; find what holds shutdown.Acceptance
sync.watch_linked_worktrees = true, a second worktree of the same project opens, indexes, reopens, and shuts down within the existing bounds, concurrently with the primary.concurrent_same_identity_worktrees_keep_exact_server_and_scheduler_bindings(or its restated successor) green on Linux and macOS CI.Targets
codex/tracedecay-total-redesign-plan-reopened(#707). Refs #863, #896.