Replace cmd2 REPL tests with prompt-toolkit coverage#83
Merged
sodejm merged 1 commit intoJul 22, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
sodejm
force-pushed
the
codex/remove-cmd2-tests-and-add-prompt-toolkit-coverage
branch
from
July 22, 2026 01:34
2a2b2ca to
fb6def7
Compare
sodejm
deleted the
codex/remove-cmd2-tests-and-add-prompt-toolkit-coverage
branch
July 22, 2026 01:37
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.
Motivation
cmd2legacy console and provide equivalent coverage against the prompt-toolkit/Rich REPL surface.modules list --jsonschema when invoked from the interactive REPL.--legacy-consoleflag with a stable error so callers are directed to the prompt-toolkit REPL.Description
--legacy-consolecode path inmain()with a stable rejection that emitsAncestryError("LEGACY_CONSOLE_UNAVAILABLE", ...)and returns exit code2, preventing the oldcmd2console from being started (file:src/ancestryllm/cli.py).parse_repl_invocationso a trailing--jsonsupplied in the REPL is moved to the global position before parsing, preserving the one-shot parser contract and JSON output semantics (file:src/ancestryllm/console/parser.py).cmd2-dependent test moduletests/modular/test_console_security.pyand expandtests/modular/test_repl_shell.pyto cover prompt-toolkit behavior for: secure history and secret handling, no-argument REPL startup, rejection of--legacy-console, preservation of one-shot command dispatch, andmodules list --jsonschema preservation (file:tests/modular/test_repl_shell.py).Testing
make setupand linting withmake lint, both completed successfully.pytestfor the modified REPL/history/parser specs using the venv Python, specificallytests/modular/test_repl_shell.py,tests/modular/test_repl_history.py,tests/modular/test_repl_router.py, andtests/modular/test_command_specs.py, and those tests passed (39 passed).make typecheckwhich reported no issues.make test) in this environment and observed unrelated failures due tosqlite3.Connection.enable_load_extensionbeing unavailable on the platform Python (affecting existing RootsMagic tests), not caused by these changes.Codex Task