Skip to content

Fix Docker image smoke-test failure caused by Typer/Click CLI incompatibility - #1

Merged
anascherif merged 2 commits into
mainfrom
copilot/fix-build-docker-image-job
Aug 18, 2026
Merged

anascherif merged 2 commits into
mainfrom
copilot/fix-build-docker-image-job

Conversation

Copilot AI commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

The Build Docker Image job failed at runtime when executing python -m erreetool.cli --help inside the built container. The failure came from a Typer/Click option parsing incompatibility that raised TypeError: Secondary flag is not valid for non-boolean flag.

  • CLI option declaration cleanup

    • Reworked the memory import mode toggle to avoid Typer generating an invalid secondary flag for Click.
    • Replaced the dual-flag merge/replace declaration with an explicit --replace switch while preserving default merge behavior.
  • Dependency compatibility pin

    • Added an explicit Click constraint (>=8.1.7,<8.2) alongside typer==0.12.3 in both packaging and runtime dependency manifests to prevent known incompatibilities in command/help rendering.
  • Regression guard for CLI construction

    • Added a focused CLI test that builds the Typer command tree to catch this class of startup/parsing breakage early.
# erreetool/commands/memory.py
def run(
    ...,
    replace: bool = typer.Option(
        False, "--replace", help="Replace existing memory instead of merging"
    ),
) -> None:
    ...
    elif subcommand == "import":
        _import_memory(input_file, not replace)

Co-authored-by: anascherif <211701424+anascherif@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build Docker Image Fix Docker image smoke-test failure caused by Typer/Click CLI incompatibility Aug 18, 2026
Copilot AI requested a review from anascherif August 18, 2026 20:24
@anascherif
anascherif marked this pull request as ready for review August 18, 2026 20:31
@anascherif
anascherif merged commit 059e837 into main Aug 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants