Skip to content

Semantic owner registration must be its own project-owned task, not a step inside the code-index mount #908

Description

@ScriptedAlchemy

Context

install_semantic_activation_runtime_owner is called inside the code-index mount closure in crates/tracedecay/src/daemon/project_composition/code_index_activation.rs. A demand-driven activation can run before register_project_open_production_owners registers the configuration runtime, so the install fails with the typed "semantic activation reconciler requires a registered configuration runtime" error. Until 9c1fd5c5e that error was propagated with ? and aborted the whole text/graph mount: semantic readiness was gating code-index warming, the inversion of the lifecycle order (project open → feedback/session → LSP → code-index warming → semantic readiness). 9c1fd5c5e is a containment fix: it logs project_open_phase phase=semantic_activation_owner outcome=degraded and keeps the mount; the advisory-runtime owner re-registers the semantic owner idempotently on the first serving generation.

Durable shape (architecture review, 2026-09-06)

  • One project-owned semantic registration task, outside the code-index mount closure, triggered when both the configuration registration and the production semantic runtime exist. Source readiness then governs activation/restore work, not whether unrelated text/graph mounting succeeds.
  • Do not put it behind successful advisory mounting or first graph seating as its sole trigger. Reuse the deferred-ownership infrastructure (project_open_owners/advisory_runtime/deferred.rs), but keep semantic registration independently scheduled and cancellable.
  • Record a queryable semantic unavailable/degraded state (status/doctor), not just a warning line.
  • Preserve identity/policy refusals; clean up partial registration on failure.
  • The installer already requires the production semantic runtime, so moving it earlier without a later wake would lose registration.

Acceptance

  • Code-index mount success never depends on semantic owner registration.
  • A configuration-runtime registration race leaves a typed degraded semantic state that status reports and that heals without restart.
  • fresh_committed_project_open_mounts_feedback_before_lsp and the semantic activation journey stay green.

Targets codex/tracedecay-total-redesign-plan-reopened (#707). Refs #901, #753.

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