Skip to content

fix(clone): accept multiple GitHub URLs and reject unknown flags (#2703) - #2711

Open
ousamabenyounes wants to merge 1 commit into
Graphify-Labs:v8from
ousamabenyounes:fix/issue-2703
Open

fix(clone): accept multiple GitHub URLs and reject unknown flags (#2703)#2711
ousamabenyounes wants to merge 1 commit into
Graphify-Labs:v8from
ousamabenyounes:fix/issue-2703

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

graphify clone used to silently drop every URL past the first, which is the exact multi-repo workflow issue #2703 asks about. It now clones each URL in turn and prints each destination path; unknown flags are rejected with a usage message, and --out is refused with multiple URLs to keep destinations unambiguous.

Test verification (RED → GREEN)

With the fix reverted, the new test fails (RED):

            ],
        )
>       with pytest.raises(SystemExit) as exc:
             ^^^^^^^^^^^^^^^^^^^^^^^^^
E       Failed: DID NOT RAISE <class 'SystemExit'>

tests/test_clone_cli.py:94: Failed
----------------------------- Captured stdout call -----------------------------
/tmp/fake/bar
_______________________ test_clone_rejects_unknown_flag ________________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x78e8b1661480>
capsys = <_pytest.capture.CaptureFixture object at 0x78e8b1763360>

    def test_clone_rejects_unknown_flag(monkeypatch, capsys):
        _stub_clone(monkeypatch)
        monkeypatch.setattr(
            sys,
            "argv",
            ["graphify", "clone", "https://github.com/foo/bar", "--nope"],
        )
>       with pytest.raises(SystemExit) as exc:
             ^^^^^^^^^^^^^^^^^^^^^^^^^
E       Failed: DID NOT RAISE <class 'SystemExit'>

tests/test_clone_cli.py:107: Failed
----------------------------- Captured stdout call -----------------------------
/tmp/fake/bar
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:481
  /home/ousama/www/public/ousamabenyounes/graphify/.venv/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:481: UserWarning: Skipping collection of '.hypothesis' directory - this usually means you've explicitly set the `norecursedirs` pytest config option, replacing rather than extending the default ignores.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_clone_cli.py::test_clone_multiple_urls_are_all_cloned - Ass...
FAILED tests/test_clone_cli.py::test_clone_branch_flag_applies_to_all - Asser...
FAILED tests/test_clone_cli.py::test_clone_rejects_out_with_multiple_urls - F...
FAILED tests/test_clone_cli.py::test_clone_rejects_unknown_flag - Failed: DID...
==================== 4 failed, 1 passed, 1 warning in 0.32s ====================

With the fix applied, the test passes (GREEN):

Uninstalled 1 package in 1ms
Installed 1 package in 3ms
============================= test session starts ==============================
platform linux -- Python 3.13.12, pytest-9.0.3, pluggy-1.6.0 -- /home/ousama/www/public/ousamabenyounes/graphify/.venv/bin/python
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /home/ousama/www/public/ousamabenyounes/graphify
configfile: pyproject.toml
plugins: cov-7.1.0, hypothesis-6.153.0, anyio-4.13.0
collecting ... collected 5 items

tests/test_clone_cli.py::test_clone_multiple_urls_are_all_cloned PASSED  [ 20%]
tests/test_clone_cli.py::test_clone_single_url_still_works PASSED        [ 40%]
tests/test_clone_cli.py::test_clone_branch_flag_applies_to_all PASSED    [ 60%]
tests/test_clone_cli.py::test_clone_rejects_out_with_multiple_urls PASSED [ 80%]
tests/test_clone_cli.py::test_clone_rejects_unknown_flag PASSED          [100%]

=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:481
  /home/ousama/www/public/ousamabenyounes/graphify/.venv/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:481: UserWarning: Skipping collection of '.hypothesis' directory - this usually means you've explicitly set the `norecursedirs` pytest config option, replacing rather than extending the default ignores.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================= 5 passed, 1 warning in 0.25s =========================

Full local suite

Command: env -u GEMINI_API_KEY -u GOOGLE_API_KEY -u OPENAI_API_KEY -u ANTHROPIC_API_KEY -u KIMI_API_KEY -u DEEPSEEK_API_KEY -u OLLAMA_HOST uv run --frozen pytest tests/ -q --tb=short && uv run --frozen python -m tools.skillgen --check && uv run --frozen python -m tools.skillgen --audit-coverage && uv run --frozen python -m tools.skillgen --schema-singleton && uv run --frozen python -m tools.skillgen --monolith-roundtrip && uv run --frozen python -m tools.skillgen --always-on-roundtrip

........................................................................ [ 87%]
........................................................................ [ 89%]
........................................................................ [ 91%]
........................................................................ [ 92%]
........................................................................ [ 94%]
........................................................................ [ 96%]
........................................................................ [ 97%]
........................................................................ [ 99%]
...................                                                      [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:481
  /home/ousama/www/public/ousamabenyounes/graphify/.venv/lib/python3.13/site-packages/_hypothesis_pytestplugin.py:481: UserWarning: Skipping collection of '.hypothesis' directory - this usually means you've explicitly set the `norecursedirs` pytest config option, replacing rather than extending the default ignores.
    warnings.warn(

tests/test_serve_http.py:17
  /home/ousama/www/public/ousamabenyounes/graphify/tests/test_serve_http.py:17: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
    from starlette.testclient import TestClient  # noqa: E402

tests/test_chunking.py::test_checkpoint_scopes_cache_writes_to_chunk_files
tests/test_chunking.py::test_out_of_scope_nodes_are_dropped_from_merged_result
  /home/ousama/www/public/ousamabenyounes/graphify/graphify/llm.py:2354: RuntimeWarning: semantic cache skipped out-of-scope source_file 'B.py'; the file was not dispatched for extraction
    _scs(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
4336 passed, 3 skipped, 4 warnings in 124.85s (0:02:04)
Uninstalled 1 package in 0.70ms
Installed 1 package in 5ms
check OK: 134 artifact(s) match committed output and expected/.
Uninstalled 1 package in 0.99ms
Installed 1 package in 4ms
audit-coverage OK: every per-host v8 heading single-homes in that host's render.
Uninstalled 1 package in 1ms
Installed 1 package in 4ms
schema-singleton OK: the file_type enum is the six-value superset everywhere.
Uninstalled 1 package in 1ms
Installed 1 package in 6ms
monolith-roundtrip OK: each monolith matches v8 modulo the enum unification.
Uninstalled 1 package in 1ms
Installed 1 package in 5ms
always-on-roundtrip OK: each always_on/*.md reproduces its former constant byte for byte.

Fix #2703

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Formal verification. No changes could be formally verified in this run.


Graphify review — findings

This PR updates graphify clone to accept multiple GitHub URLs in a single invocation, looping over each and printing its local path. It also adds argument validation—unknown flags are rejected with a usage message, and --out is disallowed when more than one URL is given. Accompanying changes update the CHANGELOG, the various skill/agent reference docs to reflect the multi-URL syntax, and related tests/generated skill fixtures.

No blocking issues surfaced. 3 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 495 functions depend on the 327 functions this change touches.

Health — this change adds coupling hotspots:

  • worse: dispatch_command() — 7 callers, 117 callees

Verification — 495 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 452 function(s) in the blast radius were not formally verified this run

Formal verification

Could not verify: Could not verify dispatch\_command.

The verifier did not have enough to check dispatch\_command, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 23 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)

· 1 more finding(s) on lines outside this diff (see the check run).

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.

Multi-Repo Analysis by Graphify

1 participant