Skip to content

Remove obsolete cmd2 console implementation#84

Closed
sodejm wants to merge 0 commit into
mainfrom
codex/remove-obsolete-cmd2-console-implementation
Closed

Remove obsolete cmd2 console implementation#84
sodejm wants to merge 0 commit into
mainfrom
codex/remove-obsolete-cmd2-console-implementation

Conversation

@sodejm

@sodejm sodejm commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Remove the legacy cmd2-based interactive console and adapters and preserve the default prompt-toolkit/Rich REPL and one-shot CLI paths.
  • Reduce a hard dependency on cmd2 and simplify module loading so command execution is handled by the transport-neutral CLI dispatcher.

Description

  • Replaced the old src/ancestryllm/console/app.py cmd2 implementation with a small compatibility facade AncestryConsole that subclasses the existing ReplApplication from console.shell and preserves cmdloop() behavior.
  • Deleted obsolete cmd2 adapter modules and helpers under src/ancestryllm/console/: command_sets.py, gedcom.py, rootsmagic.py, people.py, prompts.py, ocr.py, secrets.py, and providers.py.
  • Updated BUILTIN_MODULES entries in src/ancestryllm/core/modules.py to reference the one-shot dispatcher (ancestryllm.cli:run_tokens) and changed ModuleRegistry.load() to return descriptors without importing the old console adapters.
  • Removed cmd2 from pyproject.toml dependencies so runtime no longer requires the obsolete console package.

Testing

  • python -m pip install -e . completed successfully in the test environment.
  • Compiled the modified modules with python -m compileall and compilation succeeded without syntax errors.
  • Ran targeted pytest suites tests/modular/test_repl_shell.py, tests/modular/test_repl_router.py, and tests/modular/test_repl_history.py, and they passed (interactive REPL and router behavior preserved).
  • tests/modular/test_command_specs.py still contains a legacy expectation asserting that ModuleRegistry.load() imports the old console adapters, which no longer holds after this refactor; that test must be updated to match the new behavior (current run shows it failing for that legacy expectation).

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sodejm sodejm closed this Jul 22, 2026
@sodejm
sodejm force-pushed the codex/remove-obsolete-cmd2-console-implementation branch from 46be10c to bd2fbc3 Compare July 22, 2026 01:42
@sodejm
sodejm deleted the codex/remove-obsolete-cmd2-console-implementation branch July 22, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant