Harden context selection performance and reliability safeguards
Follow up to: #3582504 _**NOTE: Before working on this issue, verify it's still relevant and makes sense.**_ **Description:** Improve selector reliability under large datasets or unexpected slow paths. The precomputed scope index appears partly implemented already, so this issue should verify, harden, document, and complete any remaining work, plus add timeout/circuit-breaker behavior. **Includes:** - `4.5` Precomputed scope index - `7.3` Selection timeout circuit breaker **Scope:** - Verify the current scope index implementation is complete and correct. - Add missing tests, docs, or update-path hardening for the scope index. - Add a configurable selection timeout or circuit breaker. - Ensure failures degrade safely without fatal errors or runaway processing. **Acceptance criteria:** - Scope-index behavior is covered by tests for create, update, delete, and selection. - Selector has a bounded execution strategy for large datasets. - Timeout behavior is configurable and documented. - Degraded selection returns safe, observable results. [x] AI Assisted Issue
issue