Skip to content

feat(doctor): tole setup cora — install or upgrade the cora binary the review flow needs #535

Closed

Description

@ajianaz

What problem does this solve?

The cora integration (auto-attached cora mcp, agent-as-reviewer review, cora_search) only exists when the cora binary is on PATH and at least 0.19. Where it is absent, tole degrades silently to the native fallback and the agent has no review tools: a cloud or fresh sandbox session (like the one this issue was written in) simply cannot review. tole doctor already reports cora as supported, too old, or not installed, but it only tells the user to install it.

Embedding cora into tole is not the answer for now:

  • cora-code is published on crates.io (0.20.0, Apache-2.0, a CLI crate; I have not confirmed a library target) with tree-sitter parsers for about a dozen languages enabled by default. That is a large binary-size cost on top of the HTTP MCP client work in feat(mcp): streamable-HTTP MCP client transport in tole-core (feature mcp) #530 (+3.1 MB already).
  • The ecosystem split (tole is the hands, cora is the code intelligence) keeps two release cycles independent; embedding would couple them.

Proposed solution

Make the dependency easy to satisfy instead of removing it:

  • tole setup cora (and tole doctor --fix for the cora row): when cora is missing or older than 0.19, offer to install or upgrade it. Interactive prompt by default, --yes for scripts; never silent, never inside a mission turn.
  • Source, in order of preference: a prebuilt release archive of cora-code for the platform, verified against a published checksum (to verify: whether cora-code publishes prebuilt archives; tole's own release workflow does, ci(release): prebuilt binary archives on GitHub Releases (mirror cora-code) #515), then cargo install cora-code --locked when a Rust toolchain is present, otherwise print the exact manual command.
  • Install location: the same directory logic as tole upgrade (user-writable, on PATH check, no sudo).
  • Only the cora binary is fetched; no config or credentials are created (review as agent needs no LLM key; BYOK keys stay the user's business).
  • tole doctor output names the command to run, so a coding agent that reads it can ask the user.

Alternatives considered

  • Embed cora as a library behind a cargo feature: revisit only if cora-code exposes a stable library API and the size cost is acceptable; separate issue then.
  • Do nothing: valid for a desktop with cora installed; not for sandboxes.

Acceptance criteria

  • tole doctor tells the user to run tole setup cora when cora is missing/too old.
  • tole setup cora installs a verified binary on the supported platforms, or prints the manual command when it cannot (tested against a local fake release server).
  • Checksum verification is mandatory for downloads; a mismatch aborts and leaves the old binary untouched.
  • Idempotent: running it with a supported cora present is a no-op.
  • Docs: README ecosystem section and docs/threat-model.md (download and execute trust, like tole upgrade).

Related: the review-gate issue (needs cora present), #530.

Activity

  1. added
    enhancement
    on Nov 10, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions