Skip to content

ci(desktop): allow tole-client as the desktop's one tole dependency - #1083

Merged
ajianaz merged 1 commit into
developfrom
ci/desktop-guardrail-client
Nov 21, 2026
Merged

ajianaz merged 1 commit into
developfrom
ci/desktop-guardrail-client

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What

The desktop guardrail accepts tole-client as the one tole crate tole-desktop may depend on, and tole-core in its closure only through tole-client. The per-crate size cap rises from 2,000 to 4,000 lines.

Why

tole-desktop has to use the typed client (#1040) to be a thin client of tole serve (#1029). tole-client depends on tole-core (default-features = false) for the wire types, so the old rule, which had an empty allowlist, refused the dependency. The rule is changed rather than bypassed. The 4,000 cap follows the owner rule D1 of 2026-11-20 (ideal 1,500 to 2,500, hard ceiling 4,000); the 500-line per-file cap is unchanged.

Changes

  • scripts/desktop-lint.py: ALLOWED_FOR_DESKTOP = {tole-client}.
    • tole-desktop may not list tole-core, tole-tui or tole-cli among its own dependencies, in any kind or target.
    • tole-tui and tole-cli are refused everywhere in its closure.
    • tole-core is refused unless it is reached through tole-client (the closure with tole-client's subtree pruned must have none).
    • tole-client must be the workspace crate, not a registry package.
    • The model crate stays free of every tole-* crate.
    • The size cap is now 4,000.
  • scripts/test-desktop-check.sh: new cases. A direct tole-core, including renamed, dev- and target-specific, is refused; tole-core through tole-client passes; tole-core through another crate next to tole-client is refused; tole-cli and tole-tui through tole-client are refused; tole-client in the model is refused; the 4,000-line cap is tested on both sides.
  • scripts/desktop-check.sh, AGENTS.md, docs/design/desktop/README.md and CHANGELOG.md say the same.
  • This PR does not add the dependency to tole-desktop itself; the supervisor PRs do.

Testing

  • bash scripts/test-desktop-check.sh: all cases pass, including the unreadable-directory case under setpriv. bash scripts/desktop-check.sh all on the real tree: ok (enforced rules; literals are advisory).
  • cargo fmt --all --check: pass. cora review --no-llm --base origin/develop after cora index: no issues.
  • The same set was also run on the whole stack of feat(desktop): run and supervise a local tole serve, connect through the client, keep remote servers ready #1029 branches (fmt, clippy of the workspace and of the no-default-features profiles, cargo test -p tole-desktop -p tole-desktop-model, face_parity, cargo check -p tole-desktop --features gpui).
  • Not run: scripts/review-local.sh (no LLM key); the CI Cora Review is the gate. The docs-only files in the change are excluded from the Cora review.

Part of #1029.

The desktop guardrail refused every tole crate. tole-desktop may now depend on
tole-client (#1040); tole-core is allowed in its closure only through
tole-client (its wire types), tole-tui and tole-cli stay refused everywhere,
and tole-desktop still cannot list tole-core, tole-tui or tole-cli among its own
dependencies in any kind or target. The model crate stays free of every tole
crate. The per-crate size cap rises from 2,000 to 4,000 lines (owner rule D1);
the per-file cap is unchanged.

Part of #1029.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 4712585 into develop Nov 21, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant