Skip to content

feat(cli): report a missing maigret in prism modules - #516

Open
geoggrigori wants to merge 1 commit into
NovaCode37:mainfrom
geoggrigori:feat/cli-modules-maigret-binary
Open

geoggrigori wants to merge 1 commit into
NovaCode37:mainfrom
geoggrigori:feat/cli-modules-maigret-binary

Conversation

@geoggrigori

Copy link
Copy Markdown

Summary

Closes #514. prism modules now says whether maigret, which runs as a separate program, can actually run.

Changes

  • cli.py: a REQUIRED_BINARY table (maigret → maigret) and _find_maigret(), which resolves the binary the way modules/maigret_wrapper.py does: MAIGRET_BIN first, then the project's venv-maigret, then PATH via shutil.which. It only looks for the file and never runs it, so the listing stays instant.
  • describe_modules() adds "requires": "maigret" and "found": true|false to modules that need an external program. Other rows are unchanged (the existing whois exact-match test still holds); blackbird gets nothing, since it is pure Python.
  • Plain output, next to the key column:
$ python cli.py modules --type username
username
  blackbird
  maigret            program: maigret                     binary not found, skipped at scan time
  hudsonrock         HUDSONROCK_ENABLED                   required, not set, skipped at scan time

--json carries the same ("requires": "maigret", "found": false).

Type of change

  • New feature

Testing

  • New tests in tests/test_cli.py, patching shutil.which and the environment:
    • not found: plain output says "binary not found, skipped at scan time", and blackbird stays a bare line;
    • --json carries requires / found for maigret and nothing for blackbird;
    • found on PATH;
    • found through MAIGRET_BIN.
  • pytest tests → 571 passed; flake8 with CI's critical selection is clean on the touched files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HbB5TeSB4kZHBYDnQaSmBS

`prism modules` answers "what will actually run?" from API keys, but
maigret depends on a separate program: without it the module is
reported skipped at scan time, while the listing showed it as ready.

describe_modules() now adds `requires` and `found` to modules that need
an external program. maigret is looked up the way maigret_wrapper does
it (MAIGRET_BIN, then the project's venv-maigret, then PATH via
shutil.which) without running it. The plain output says
"binary not found, skipped at scan time"; --json carries the same.

Closes NovaCode37#514

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HbB5TeSB4kZHBYDnQaSmBS
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for the first pull request here. CI needs a maintainer to approve the run before it starts, so it may sit for a bit before anything happens. pytest tests/ -q passing is the main thing I look at.

@github-actions github-actions Bot added the python Pull requests that update python code label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prism modules: report a missing maigret install

1 participant