Rename Mode variants A/C to self-describing names #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Concern
The retrieval-mode enum uses opaque single letters:
pub enum Mode { C, A }(src/model.rs:58), parsed from the CLI tokens"c"/"a"(src/model.rs:64-65). Neither the code identifier nor the operator-facing token--mode aconveys what the mode does; a reader or operator must consult the design spec to decode them.What the letters currently encode
The lettering is not arbitrary — it traces a deliberate three-stage axis in the design ledger (
docs/specs/2026-05-18-alpha-id-icd-suggestion-design.md:60-63):Consequence: the A/C gap is meaningful (B is a reserved, deliberately-empty slot), so a rename has to preserve that the two shipped modes sit at opposite ends of a "lexical-only → hybrid" axis rather than being an unordered pair.
Surface a rename touches
Modeenum and itsFromStr(src/model.rs:57-69)--modeflag, default"c", on bothsuggestandeval(src/bin/alpha_id.rs:22,32)eval --mode bothexpansion to[Mode::C, Mode::A](src/bin/alpha_id.rs:147-148)format!("{:?}", mode)surfaced in JSON output (src/pipeline.rs:233)docs/glossary.md:23-29)--mode c|a(docs/specs/2026-05-18-alpha-id-icd-suggestion-design.md:200,202)tests/model_tests.rs:18-19,tests/pipeline_mode_c_tests.rs,tests/pipeline_mode_a_tests.rs,tests/eval_compare_tests.rs,tests/cli_tests.rs)The rename has two distinct facets that can be decided independently: the internal Rust identifiers, and the user-facing CLI token plus the diagnostics string (which together form a compatibility surface).
Proposal (unverified — naming to be ratified)
Mode::C→Mode::Lexical, CLI tokenlexicalMode::A→Mode::Hybrid, CLI tokenhybridThese map directly onto the glossary one-line definitions. Open questions for whoever picks this up:
c/aas accepted CLI aliases for backward compatibility, or hard-switch the tokens?modefield (degradedreporting) need a stable string contract for any downstream consumer (e.g. doctate)?