Skip to content

Remove --legacy-console CLI option and add regression test#81

Merged
sodejm merged 2 commits into
mainfrom
codex/remove-legacy-console-option-from-cli
Jul 22, 2026
Merged

Remove --legacy-console CLI option and add regression test#81
sodejm merged 2 commits into
mainfrom
codex/remove-legacy-console-option-from-cli

Conversation

@sodejm

@sodejm sodejm commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Remove the special-cased --legacy-console startup path so CLI arguments are handled consistently by the normal parser path.
  • Preserve existing behaviors for no-argument REPL startup, one-shot command dispatch, and the modules list --json contract while removing the legacy entrypoint.

Description

  • Deleted the special conditional branch in main() that intercepted arguments == ["--legacy-console"] so non-empty argument lists are always parsed via build_parser().
  • Kept the no-argument REPL behavior which still calls run_repl() when arguments is empty.
  • Updated tests/modular/test_repl_shell.py to remove the legacy-console expectation and added test_main_rejects_legacy_console_like_unknown_or_unsupported_options which asserts `[

Codex Task

Remove the special --legacy-console entry point so it follows normal parser error handling.\n\n- Preserve default REPL startup and one-shot command dispatch coverage.\n- Add regression coverage comparing --legacy-console with unsupported option behavior.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86aa53e3b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/ancestryllm/cli.py

AncestryConsole(context or AppContext.build()).cmdloop()
return 0
if not arguments:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update docs before dropping legacy console flag

Now that non-empty arguments always fall through to the normal parser path here, ancestry --legacy-console exits with a usage error, but the shipped docs still advertise that exact command as the temporary cmd2 compatibility fallback in docs/CONSOLE.md:10-18 and docs/REPL_ARCHITECTURE.md:18-19,87-108. Users following those docs will lose the documented fallback, so the removal should update or delete those compatibility-path sections in the same change.

Useful? React with 👍 / 👎.

@sodejm
sodejm merged commit e3b7568 into main Jul 22, 2026
5 checks passed
@sodejm
sodejm deleted the codex/remove-legacy-console-option-from-cli branch July 22, 2026 01:15
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