Skip to content

fix(mcp): code-index corruption refusals format park facts into a route detail #2280

Description

@ScriptedAlchemy

Split out of #2255, whose adapter half is fixed. Two MCP paths still raise a parked code-index refusal directly as a TraceDecayError::ProjectRoute, formatting the park's facts into its detail string:

  • tracedecay::mcp::server::code_index_publication_corrupt builds ProjectRoute { reason_code: "code_index_publication_authority_corrupt", detail: format!("{reason}; {remediation}") } from a CodeIndexConvergenceParkedV1.
  • Its callers are the admin sync tool (mcp/tools/handlers/info/status.rs, a CodeIndexDemandAdmissionV1::Terminal(parked) admission) and the background freshness probe (mcp/server/hook_writes.rs).

tracedecay sync / tracedecay init against a parked worktree therefore print the cause and remedy as one sentence, while every application surface now carries them as detail = {kind: parked, cause, remedy, retries_on_wake} (#2259). These refusals are not application problems, so they need either an application-problem rendering for the admin sync result or a typed route error that carries the parked detail. The branch_publication refusals mentioned in #2255 are cancellation errors (branch_publication_cancelled_error), not park facts, so they are not in scope here.

Reproduce: park a worktree (commit a file with mode 000, run tracedecay init), then run tracedecay sync; stderr shows project route error (code_index_publication_authority_corrupt): <reason>; <remediation>.

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