Skip to content

test(cli): smoke-test help for every command - #184

Merged
fu351 merged 1 commit into
DobermanCore:mainfrom
snowyukitty:test/cli-help-smoke
Jul 30, 2026
Merged

fu351 merged 1 commit into
DobermanCore:mainfrom
snowyukitty:test/cli-help-smoke

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Slice

What this PR does

  • adds an explicit matrix for the root app and every public command and command group
  • invokes each target with --help and verifies exit code 0, the complete usage path, and no traceback
  • automatically requires every eager registration while documenting how dynamic commands stay synchronized
  • preserves the existing startup guard against importing optional scientific and enterprise packages

Closes #176

Tests added (run in CI)

  • pytest tests/unit/test_cli_help.py -q: 31 passed
  • CLI-pattern unit suite: passed with 2 skipped
  • ruff check .
  • ruff format --check .
  • lint-imports: 2 contracts kept, 0 broken
  • pytest --cov=doberman --cov-report=term-missing --cov-fail-under=80: 2161 passed, 5 skipped; 91.97% coverage

Public-release safety (doberman-core only)

  • Contains nothing from the "not allowed" list: no enterprise/hosted code, no proprietary detection, no customer data, no secrets, no commercial-license code
  • Core still builds/tests/runs with NO enterprise package installed

Security checklist

  • Fails closed on error / uncertainty (runtime behavior is unchanged)
  • No secret, full file, or unredacted prompt logged or committed
  • Any guardrail/learning change is raise-only (no guardrail or learning behavior changed)
  • Every BLOCK/AUTH carries reason codes + a human explanation (not affected)
  • doberman-core does not import doberman_enterprise

Edge cases covered / Deviations from plan / Risks introduced

  • The matrix is intentionally explicit so dynamically discovered commands can be listed without invoking option callbacks, prompts, network access, or persistent state during discovery.
  • The eager-registration guard rejects missing ordinary commands and duplicate matrix entries.
  • Usage-path validation catches stale nested targets even when Click's eager --help handling exits successfully at a parent command.
  • Whitespace normalization keeps wrapped Rich help output deterministic for long valid command paths.
  • This is a test-only change; runtime behavior and public CLI text are unchanged.

AI assistance

AI assistance disclosure: This PR was developed with assistance from OpenAI Codex.

@snowyukitty
snowyukitty force-pushed the test/cli-help-smoke branch from 56ae7b3 to df01ec8 Compare July 29, 2026 09:19
@fu351
fu351 merged commit 372d707 into DobermanCore:main Jul 30, 2026
4 checks passed
@fu351

fu351 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

As mentioned in the other PR review would love for you to work on #200 as it directly follows on from the work you've already done, but also very happy for you to work on any of the other issues.
I'm about to make a linkedin post shouting out all the great contributions so far so if you could drop your linkedin handle that would be great!
@snowyukitty

@snowyukitty

Copy link
Copy Markdown
Contributor Author

Thank you — that’s very kind of you, and I really appreciate both the invitation and the shout-out. #200 does look like a natural follow-on from the plugin work; I’ll take a careful look and follow up on the issue separately.

I’m not very active on LinkedIn, so please feel free to credit me as snowyukitty on GitHub instead. Thanks again!

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.

tests: smoke-test --help for every Typer command and group

2 participants