feat: wire --local-repo-path into create command and add validation

- Add --local-repo-path to UNIVERSAL_ARGUMENTS in create.py so it is
  registered in the actual parser (not just help display)
- Add --local-repo-path to GITHUB_ARGUMENTS in arguments/github.py for
  the standalone github subcommand
- Forward --local-repo-path through create_command._route_github() to
  github_scraper
- Add local_repo_path to the config dict built from CLI args in
  github_scraper.main()
- Add early validation in GitHubScraper.__init__(): warn and reset to
  None if path does not exist, triggering a real GitHub API fallback
  instead of silently operating with an empty file tree (fixes #281)
- Update test_create_arguments.py count/names assertions (17 -> 18)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-02-20 07:28:49 +03:00
parent 23e620070d
commit c996e88dac
5 changed files with 31 additions and 4 deletions

View File

@@ -24,8 +24,8 @@ class TestUniversalArguments:
"""Test universal argument definitions."""
def test_universal_count(self):
"""Should have exactly 17 universal arguments (after Phase 2 workflow integration)."""
assert len(UNIVERSAL_ARGUMENTS) == 17
"""Should have exactly 18 universal arguments (after Phase 2 workflow integration + local_repo_path)."""
assert len(UNIVERSAL_ARGUMENTS) == 18
def test_universal_argument_names(self):
"""Universal arguments should have expected names."""
@@ -48,6 +48,7 @@ class TestUniversalArguments:
"enhance_stage",
"var",
"workflow_dry_run",
"local_repo_path", # GitHub local clone path for unlimited C3.x analysis
}
assert set(UNIVERSAL_ARGUMENTS.keys()) == expected_names
@@ -128,7 +129,7 @@ class TestArgumentHelpers:
"""Should return set of universal argument names."""
names = get_universal_argument_names()
assert isinstance(names, set)
assert len(names) == 17 # Phase 2: added 4 workflow arguments
assert len(names) == 18 # Phase 2: added 4 workflow arguments + local_repo_path
assert "name" in names
assert "enhance_level" in names # Phase 1: consolidated flag
assert "enhance_workflow" in names # Phase 2: workflow support