Skip to content

code-index: refused automatic demand on a disabled linked route should be a typed watch-policy refusal, not scheduler_unavailable #1115

Description

@ScriptedAlchemy

Follow-up from #1112 (17dc91a). Automatic reconcile demand (hooks, background refresh, startup catch-up) on a linked worktree without the sync.watch_linked_worktrees opt-in is now correctly refused, but the refusal still maps to retained_unavailable("code_index_scheduler_unavailable") — the same string a genuinely absent scheduler produces — and run_startup_catch_up_sync logs a WARN for every linked-worktree open, which is normal operation under the default policy, not a fault.

Make the refusal a typed watch-policy state (the code index already has CodeIndexAutomaticAdmissionV1::LinkedWorktreeDisabled and search answers reason: linked_worktree_disabled): hooks/host admission should receive that typed reason, the startup catch-up should log it at info (or not at all) rather than WARN, and the daemon unit test added in 17dc91a should assert the typed reason instead of the unavailable string. Path hints on the same route have carried the same mislabel since before #1112; fix both call sites together.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions