Skip to content

Post-C.6 cleanup: delete legacy linenoise REPL (~4,235 LOC) #790

Description

@jsavin

Rationale

After C.6 (default flip — frontier-cli defaults to boxen REPL) ships and a release cycle passes without users / scripts hitting issues with the --plain fallback, the legacy linenoise REPL can be removed entirely.

This is the final step of the REPL schism resolution plan (planning/phase_c/REPL_SCHISM_EXECUTION_PLAN.md Section 8). Deferred to a separate PR specifically so the boxen REPL gets real-world exposure as the default before linenoise is gone for good.

Scope

Code to delete (~4,235 LOC):

  • frontier-cli/repl.c — the linenoise-driven REPL
  • frontier-cli/repl_eval.c / repl_eval.h — if scoped only to legacy path (verify via grep)
  • third_party/linenoise/ — bundled linenoise library
  • --plain CLI flag in frontier-cli/cli_parser.c — the fallback that selects linenoise
  • --debug-tui deprecation no-op shim (already a no-op alias after C.6) — fully remove

Code to clean up:

  • frontier-cli/boxen_repl.c constant duplication comments (lines around BOXEN_REPL_HISTORY_FILE, BOXEN_REPL_HISTORY_SIZE) that say "MUST stay byte-identical with repl.c:85-86 until linenoise REPL is removed in milestone C.6" — remove the comments and consolidate
  • frontier-cli/repl_completion.h — the adapter header introduced in C.0.2 (PR feat(repl): C.0.2 Tab completion for boxen REPL #769) to share completion logic; the boxen path can absorb the logic now
  • frontier-cli/repl_slash_resolver.{c,h} and frontier-cli/repl_slash_dispatch.h — if scoped only to legacy (verify); boxen has its own slash dispatch
  • frontier-cli/repl_palette_source.{c,h} — verify boxen path is the only caller; if so, fold under boxen_palette_backend or rename
  • frontier-cli/palette.c constant duplication — the repl.c constants comment can drop the "byte-identical with repl.c" qualifier

Issue #773 follow-up: extract dispatch_synthesized_script to a shared TU — this becomes simpler when there's only one REPL consumer, and can be folded into this cleanup.

Tests to delete: any pre-existing test that exercises the linenoise REPL specifically (search for --plain, linenoise-specific helpers, dispatch_slash_command direct callers in repl.c).

Tests to retain: anything in tests/repl_* that exercises shared infrastructure (slash resolver, palette source, completion logic) — keep but verify they still pass against the boxen-only build.

Manifest update:

  • CLAUDE.md ## /auto Test Manifest — remove any linenoise-specific notes

Constraints

  • DO NOT execute until C.6 has soaked. "Soaked" means at least one user-driven release cycle where the new default has been in use and no --plain fallback complaints have surfaced.
  • DO NOT delete in this issue's PR: frontier-cli/boxen_repl.c, frontier-cli/boxen_palette_backend.c, frontier-cli/boxen_completion_popup.c — those are the new REPL.
  • DO NOT delete: third_party/termbox2/ — boxen depends on it.

Exit Criteria

  • make -C frontier-cli clean
  • ./tools/run_headless_tests.sh all green
  • cd tests && make test-integration matches baseline character-for-character
  • ./tools/tui-tests/run.sh all green (TUI parity verified)
  • --plain flag removed; --debug-tui shim removed; only frontier-cli (no flag) launches the REPL
  • Release notes draft entry: "Removed legacy linenoise REPL and --plain fallback. The boxen REPL is now the only REPL."
  • LOC reduction verified (~4,235 LOC removed; track in PR description)

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1High priority - address soontype/refactorCode quality and structure improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions