feat(cli)!: remove deprecated per-client boolean flags - #465
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
40ebeba to
f1caf3d
Compare
Update: Oracle review — addressed LOW finding + rebased on updated #464LOW: legacy-rejection guard was too narrowThe original `test_client_flags_legacy_long_flags_rejected` only checked `--claude`. Expanded to a table over all 19 removed flags with `--synthetic` called out explicitly — it's the only legacy flag without a matching `ClientId`, so its handling has always been special-cased and is the most likely to regress if anyone resurrects a boolean field. Also added a positive sanity sweep to verify `--client opencode`, `--client claude`, and `--client synthetic` all still parse, so the negative test cannot silently pass via an over-tight parser. Pushed as `f1caf3d test(cli): expand legacy-flag rejection guard to all 19 removed flags`. Rebased on updated #464Branch was rebased after `308b471` landed on `feat/cli-client-filter-flag`. The rebase pulls in:
So once #464 lands, this branch's diff collapses cleanly to just the removal commits with no carryover noise. Numbers (this branch only)
PR remains DRAFT — DO NOT MERGE until v3.0.0. |
467c10f to
d87330b
Compare
Removes all 32 hidden legacy `--<client>` boolean flags (opencode, claude, codex, …, synthetic). Use the canonical `--client/-c` flag instead (e.g. `--client opencode,claude`). Simplifies build_client_filter to resolve canonical `--client` values then fall back to `defaultClients`, drops the legacy[] array, the legacy_used collection, and the emit_legacy_client_flag_warning deprecation warning. Targets v3.2.0. Constraint: breaking change — removed flags now hard-error; landing in 3.2.0 per maintainer decision Confidence: high Scope-risk: moderate
d87330b to
7d137a4
Compare
The per-client flag removal (#465) is a breaking change, so the next release is v4.0.0, not v3.2.0. Update the migration notes in all four README locales and the main.rs doc comment accordingly.
…746) * docs: sync EN/ja/ko/zh-cn for unreleased clients + breaking flag removal Pre-v3.2.0 documentation sync for the unreleased range (v3.1.3..main): - #465: replace the now-false legacy per-client flag notices in ja/ko/zh-cn (they claimed the removed flags still work) with a v3.2.0 breaking-change migration note; add the same note to README.md (which had none). - #728: document the MiniMax Token Plan subscription source (distinct from the MINIMAX_API_KEY row) in all locales; port the entire Subscription Usage section into ja/ko/zh-cn (was English-only). - #718: add the Jcode table row + detail section to the locales missing them. - #726: document the TOKSCALE_FM_DEBUG env var in all locales. - #633: add the missing task-attributed report bullet to README.ja Key Features. - drift: add Junie to the frontend Source-filtering list (all locales). - #710: fix the MiMo Code repo link (XiaomiMiMo/MiMo -> XiaomiMiMo/MiMo-Code). - #717: disclose Command Code token usage is estimated (~4 chars/token). Confidence: medium Scope-risk: narrow Directive: ja/ko/zh-cn translations of the ported Subscription Usage section are machine-generated and should get a native-speaker review pass Not-tested: #713 Antigravity CLI detail section was not added — no English source section exists to port from * fix(report): feed real session content to the summarizer (#633) extract_content_for_session unconditionally returned metadata_only_content() (first_user_message hardcoded None), so the report summarizer never saw any conversation content and the four real per-client extractors were dead code. Add content_extractor::extract_session_content, which dispatches to the correct per-client extractor (opencode/claude/codex/gemini) and falls back to metadata-only — never erroring or panicking — for unknown clients, missing candidates, or unreadable/unparseable files. report.rs builds a SessionPathIndex once (session_id -> transcript file, plus opencode DBs) and threads it through run_summarizer so each payload carries the real first user message. Confidence: high Scope-risk: moderate Rejected: thread file paths through core's scanner/WikiEntry | too invasive; indexed at the report layer instead Not-tested: end-to-end opencode/codex/gemini extraction in report.rs (core dispatcher covers claude + all fallback paths; per-client extractors are pre-existing) * docs: name the breaking release v4.0.0 (was v3.2.0) The per-client flag removal (#465) is a breaking change, so the next release is v4.0.0, not v3.2.0. Update the migration notes in all four README locales and the main.rs doc comment accordingly. * fix(report): real Codex/Gemini extraction + (client,session_id) index keying Addresses automated review feedback on the #633 report-summarizer-content fix (PR #746). The summarizer still surfaced (none) for normal Codex/Gemini sessions and could mis-route cross-client session_id collisions. - content_extractor: parse the current on-disk Codex format (event_msg with payload.type == "user_message", text in payload.message) and skip harness-injected context blocks (<environment_context>/<system-reminder>/ <user_instructions>), mirroring sessions::codex. - content_extractor: Gemini extractor now handles chat-recording JSON (messages[].type == "user" / content) and falls back to scanning line-delimited JSONL; empty/whitespace user text is treated as not-found. - extract_session_content: an empty/whitespace first_user_message no longer counts as success, so scanning continues to a later candidate with real text. - report: SessionPathIndex is keyed by (client, session_id) to prevent cross-client collisions, and Gemini files are keyed by their in-file sessionId (via gemini_session_id_for_file) rather than the filename stem, since the wiki entry's session_id is derived from inside the file. - Added fixture-based regression tests for all of the above. Constraint: wiki session_id for Gemini comes from the in-file sessionId, not the path stem Rejected: match any leading '<' for Codex injected blocks | drops legit prompts starting with markup Confidence: high Scope-risk: narrow
Removes all 32 hidden legacy `--<client>` boolean flags (opencode, claude, codex, …, synthetic). Use the canonical `--client/-c` flag instead (e.g. `--client opencode,claude`). Simplifies build_client_filter to resolve canonical `--client` values then fall back to `defaultClients`, drops the legacy[] array, the legacy_used collection, and the emit_legacy_client_flag_warning deprecation warning. Targets v3.2.0. Constraint: breaking change — removed flags now hard-error; landing in 3.2.0 per maintainer decision Confidence: high Scope-risk: moderate
Removes all 32 hidden legacy `--<client>` boolean flags (opencode, claude, codex, …, synthetic). Use the canonical `--client/-c` flag instead (e.g. `--client opencode,claude`). Simplifies build_client_filter to resolve canonical `--client` values then fall back to `defaultClients`, drops the legacy[] array, the legacy_used collection, and the emit_legacy_client_flag_warning deprecation warning. Targets v3.2.0. Constraint: breaking change — removed flags now hard-error; landing in 3.2.0 per maintainer decision Confidence: high Scope-risk: moderate
…unhoyeo#746) * docs: sync EN/ja/ko/zh-cn for unreleased clients + breaking flag removal Pre-v3.2.0 documentation sync for the unreleased range (v3.1.3..main): - junhoyeo#465: replace the now-false legacy per-client flag notices in ja/ko/zh-cn (they claimed the removed flags still work) with a v3.2.0 breaking-change migration note; add the same note to README.md (which had none). - junhoyeo#728: document the MiniMax Token Plan subscription source (distinct from the MINIMAX_API_KEY row) in all locales; port the entire Subscription Usage section into ja/ko/zh-cn (was English-only). - junhoyeo#718: add the Jcode table row + detail section to the locales missing them. - junhoyeo#726: document the TOKSCALE_FM_DEBUG env var in all locales. - junhoyeo#633: add the missing task-attributed report bullet to README.ja Key Features. - drift: add Junie to the frontend Source-filtering list (all locales). - junhoyeo#710: fix the MiMo Code repo link (XiaomiMiMo/MiMo -> XiaomiMiMo/MiMo-Code). - junhoyeo#717: disclose Command Code token usage is estimated (~4 chars/token). Confidence: medium Scope-risk: narrow Directive: ja/ko/zh-cn translations of the ported Subscription Usage section are machine-generated and should get a native-speaker review pass Not-tested: junhoyeo#713 Antigravity CLI detail section was not added — no English source section exists to port from * fix(report): feed real session content to the summarizer (junhoyeo#633) extract_content_for_session unconditionally returned metadata_only_content() (first_user_message hardcoded None), so the report summarizer never saw any conversation content and the four real per-client extractors were dead code. Add content_extractor::extract_session_content, which dispatches to the correct per-client extractor (opencode/claude/codex/gemini) and falls back to metadata-only — never erroring or panicking — for unknown clients, missing candidates, or unreadable/unparseable files. report.rs builds a SessionPathIndex once (session_id -> transcript file, plus opencode DBs) and threads it through run_summarizer so each payload carries the real first user message. Confidence: high Scope-risk: moderate Rejected: thread file paths through core's scanner/WikiEntry | too invasive; indexed at the report layer instead Not-tested: end-to-end opencode/codex/gemini extraction in report.rs (core dispatcher covers claude + all fallback paths; per-client extractors are pre-existing) * docs: name the breaking release v4.0.0 (was v3.2.0) The per-client flag removal (junhoyeo#465) is a breaking change, so the next release is v4.0.0, not v3.2.0. Update the migration notes in all four README locales and the main.rs doc comment accordingly. * fix(report): real Codex/Gemini extraction + (client,session_id) index keying Addresses automated review feedback on the junhoyeo#633 report-summarizer-content fix (PR junhoyeo#746). The summarizer still surfaced (none) for normal Codex/Gemini sessions and could mis-route cross-client session_id collisions. - content_extractor: parse the current on-disk Codex format (event_msg with payload.type == "user_message", text in payload.message) and skip harness-injected context blocks (<environment_context>/<system-reminder>/ <user_instructions>), mirroring sessions::codex. - content_extractor: Gemini extractor now handles chat-recording JSON (messages[].type == "user" / content) and falls back to scanning line-delimited JSONL; empty/whitespace user text is treated as not-found. - extract_session_content: an empty/whitespace first_user_message no longer counts as success, so scanning continues to a later candidate with real text. - report: SessionPathIndex is keyed by (client, session_id) to prevent cross-client collisions, and Gemini files are keyed by their in-file sessionId (via gemini_session_id_for_file) rather than the filename stem, since the wiki entry's session_id is derived from inside the file. - Added fixture-based regression tests for all of the above. Constraint: wiki session_id for Gemini comes from the in-file sessionId, not the path stem Rejected: match any leading '<' for Codex injected blocks | drops legit prompts starting with markup Confidence: high Scope-risk: narrow
Breaking change — targets v3.2.0. Removes the deprecated, hidden per-client boolean flags (
--opencode,--claude,--codex, …); use the canonical--client/-cinstead. These flags have been hidden from--helpand emitting a deprecation warning since #464 (pre-v3.0.0), so the migration window is well past.Re-cut on current main (2026-06-18)
The original branch was ~2 months stale (19 flags then; main now has 32, and
build_client_filterishome_dir-aware). This branch was re-cut fresh on currentmain.What changed
ClientFlags.build_client_filter_with_defaultsto the single canonical--clientpath +defaultClientsfallback (drops the legacy mapping array andemit_legacy_client_flag_warning).id = "client_filter"/value_name = "CLIENTS"to the--clientarg (avoids a clap id collision now that the bool fields are gone; keeps the<CLIENTS>help placeholder).--client opencode | opencode,claude | synthetictests. ~61 legacy-flag sites incli_tests.rsmigrated to--client.Migration
tokscale --opencodetokscale --client opencodetokscale --opencode --claudetokscale --client opencode,claudetokscale --synthetictokscale --client syntheticVerified locally:
cargo build/clippy/fmtclean; 669 bin + 122 integration tests pass;--opencoderejected,--client opencodeworks.🤖 Re-cut with Claude Code