Skip to content

fix(extract): reject invalid CLI arguments#2026

Open
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/extract-cli-argument-validation
Open

fix(extract): reject invalid CLI arguments#2026
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/extract-cli-argument-validation

Conversation

@oleksii-tumanov

@oleksii-tumanov oleksii-tumanov commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse and validate graphify extract arguments from one declarative option schema
  • reject unknown options, missing values, unsupported empty/assignment forms, and extra positional arguments with exit code 2 before path or output work
  • enforce the documented 0–100 --exclude-hubs range during parsing instead of returning a conversion traceback
  • preserve supported spaced/inline forms, repeated-option semantics, and intentional empty PostgreSQL DSNs while omitting unknown option values from error output

Result

$ graphify extract . --unknown=value
error: unknown extract option: --unknown

Tests

  • python -m pytest tests/ -q --tb=short — 3511 passed, 33 skipped
  • python -m pytest tests/test_extract_cli_args.py tests/test_extract_cli.py -q --tb=short — 116 passed
  • python -m ruff check graphify/cli.py tests/test_extract_cli_args.py
  • all five tools.skillgen checks
  • graphify update .

Closes #2025.

Related to #2004.

@oleksii-tumanov
oleksii-tumanov force-pushed the fix/extract-cli-argument-validation branch from 5f293e1 to ec6a901 Compare July 19, 2026 07:40
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.

extract: validate unknown, missing and extra CLI arguments

1 participant