Repository navigation
docs: CLI copy sweep — de-internalize help, truncate approval input echo (#102) - #104
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
ajianaz
added a commit
that referenced
this pull request
Sep 28, 2026
Resolves crates/tole-cli/src/main.rs: the scan-3 wave evolved the Mcp arm (plan-mode filter, loud-bail for pre/posttool hooks) while this branch added the Acp arm — both kept; the Acp arm gains the same loud-bail rule for unwired hooks and threads host.plan_mode through run_acp/open_session (plan-mode serves a read-only registry). Also takes develop's newer chat help copy (CLI copy sweep #104).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
CLI copy sweep (user-facing only — no core behavior changes):
E5,B3,B1) removed from theresume/sessions/chathelp lines (keptissue #55— genuinely useful cross-reference). Internal code comments untouched.input:echo now truncates to head 400 + tail 400 chars (… (+N more chars)…in the middle) instead of dumping the full payload. Head AND tail are kept by design (round-1 cora MAJOR): a head-only cut could hide a dangerous path/command suffix beyond the preview from the human approver; keeping both ends preserves the fail-closed posture. UTF-8-safe on char boundaries; short scalars (paths, commands — the security-relevant values) stay fully visible.resolving interrupted turn, pc=Planning…→resolving the interrupted turn…(no internal program counter in user chat).no sessions in <path> (dir does not exist)now ends with— start one with: tole chat(value → action).Why
Issue #102, from the 2026-09-19 UX audit (live E2E + source sweep): internal epic codes leaked into public
--help(OSS users don't know whatE5/B1/B3are), a largewrite_fileinput flooded the terminal before the y/N question, and the REPL exposed debug-speak.Changes
tole-cli/src/main.rs: 3 help doc-comments, 1 REPL notice, 1 empty-state line (wildcard bind replaces the now-unusedmid)tole-cli/src/approver.rs:INPUT_PREVIEW_HEAD/TAIL(400/400) +input_preview()(head+tail middle-elision) + 2 new unit tests (input_preview_short_input_passes_through,input_preview_long_input_truncates_middle_keeps_both_endsincl. multi-byte + pass-through edge)Testing
cargo fmt --all/cargo clippy --workspace --all-targets -- -D warnings/cargo test --workspace✅ (exit 0; both new tests green)cora review --stagedround 1: 1 MAJOR (head-only truncation could hide dangerous input) → fixed with the head+tail design → round 2: ✅ No issues foundtole-cli; core crate untouched (mobile profile unaffected)Closes #102