Remove --legacy-console CLI option and add regression test#81
Conversation
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.
There was a problem hiding this comment.
💡 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".
|
|
||
| AncestryConsole(context or AppContext.build()).cmdloop() | ||
| return 0 | ||
| if not arguments: |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
--legacy-consolestartup path so CLI arguments are handled consistently by the normal parser path.modules list --jsoncontract while removing the legacy entrypoint.Description
main()that interceptedarguments == ["--legacy-console"]so non-empty argument lists are always parsed viabuild_parser().run_repl()whenargumentsis empty.tests/modular/test_repl_shell.pyto remove the legacy-console expectation and addedtest_main_rejects_legacy_console_like_unknown_or_unsupported_optionswhich asserts `[Codex Task