xone-cli 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xone_cli-0.1.3 → xone_cli-0.1.4}/CHANGELOG.md +5 -0
- {xone_cli-0.1.3/src/xone_cli.egg-info → xone_cli-0.1.4}/PKG-INFO +1 -1
- {xone_cli-0.1.3 → xone_cli-0.1.4}/pyproject.toml +1 -1
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/__init__.py +1 -1
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/open_source_eval.py +24 -6
- {xone_cli-0.1.3 → xone_cli-0.1.4/src/xone_cli.egg-info}/PKG-INFO +1 -1
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_cli.py +1 -1
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_docs.py +3 -3
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_open_source_eval.py +34 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/LICENSE +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/MANIFEST.in +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/README.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/README.zh-CN.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/docs/feedback/open-source-feedback-ledger.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/docs/install.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/docs/product-foundation.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/docs/release.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/aider.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/anthropics-claude-code.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/cline.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/continue.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/desktop-commander-mcp.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/docker-mcp-gateway.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/github-github-mcp-server.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/microsoft-playwright-mcp.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/modelcontextprotocol-servers.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/openai-codex.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/openhands.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/upstash-context7.json +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/ops/constraints/main-entry.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/ops/constraints/production.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/ops/opt-overlay.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/ops/skills/evolution.md +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/setup.cfg +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/__main__.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/cli.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/evidence.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/lab.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/model.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/release.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/repo_context.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/risk.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/runbook.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli/tooling.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli.egg-info/SOURCES.txt +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli.egg-info/dependency_links.txt +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli.egg-info/entry_points.txt +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli.egg-info/requires.txt +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/src/xone_cli.egg-info/top_level.txt +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_evidence.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_release.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_repo_context.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_risk_lab.py +0 -0
- {xone_cli-0.1.3 → xone_cli-0.1.4}/tests/test_tooling.py +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
- Add a `curl` fallback for GitHub metadata refresh when Python's local certificate store cannot verify the GitHub API certificate.
|
|
6
|
+
- Keep open-source adoption evaluation from failing on macOS/Python certificate-store drift.
|
|
7
|
+
|
|
3
8
|
## 0.1.3
|
|
4
9
|
|
|
5
10
|
- Add `xone eval open-source` for repeatable, sanitized open-source adoption evaluation.
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import subprocess
|
|
5
|
+
import urllib.error
|
|
5
6
|
import urllib.request
|
|
6
7
|
from dataclasses import dataclass
|
|
7
8
|
from datetime import date
|
|
@@ -147,12 +148,7 @@ def normalize_repo_ref(value: str) -> str:
|
|
|
147
148
|
|
|
148
149
|
|
|
149
150
|
def fetch_github_metadata(repo: str, snapshot_date: date) -> dict:
|
|
150
|
-
|
|
151
|
-
f"https://api.github.com/repos/{repo}",
|
|
152
|
-
headers={"Accept": "application/vnd.github+json", "User-Agent": "xone-cli-open-source-eval"},
|
|
153
|
-
)
|
|
154
|
-
with urllib.request.urlopen(request, timeout=20) as response:
|
|
155
|
-
payload = json.load(response)
|
|
151
|
+
payload = _fetch_github_payload(repo)
|
|
156
152
|
return {
|
|
157
153
|
"source": payload["full_name"],
|
|
158
154
|
"source_url": payload["html_url"],
|
|
@@ -165,6 +161,28 @@ def fetch_github_metadata(repo: str, snapshot_date: date) -> dict:
|
|
|
165
161
|
}
|
|
166
162
|
|
|
167
163
|
|
|
164
|
+
def _fetch_github_payload(repo: str) -> dict:
|
|
165
|
+
request = urllib.request.Request(
|
|
166
|
+
f"https://api.github.com/repos/{repo}",
|
|
167
|
+
headers={"Accept": "application/vnd.github+json", "User-Agent": "xone-cli-open-source-eval"},
|
|
168
|
+
)
|
|
169
|
+
try:
|
|
170
|
+
with urllib.request.urlopen(request, timeout=20) as response:
|
|
171
|
+
return json.load(response)
|
|
172
|
+
except (urllib.error.URLError, TimeoutError, OSError) as exc:
|
|
173
|
+
try:
|
|
174
|
+
completed = subprocess.run(
|
|
175
|
+
["curl", "-fsSL", f"https://api.github.com/repos/{repo}"],
|
|
176
|
+
check=True,
|
|
177
|
+
text=True,
|
|
178
|
+
stdout=subprocess.PIPE,
|
|
179
|
+
stderr=subprocess.PIPE,
|
|
180
|
+
)
|
|
181
|
+
except (FileNotFoundError, subprocess.CalledProcessError) as fallback_exc:
|
|
182
|
+
raise RuntimeError(f"Unable to fetch GitHub metadata for {repo}: {exc}; fallback failed: {fallback_exc}") from fallback_exc
|
|
183
|
+
return json.loads(completed.stdout)
|
|
184
|
+
|
|
185
|
+
|
|
168
186
|
def clone_repo(record: dict, root: Path) -> Path:
|
|
169
187
|
root.mkdir(parents=True, exist_ok=True)
|
|
170
188
|
target = root / record["source"].replace("/", "-")
|
|
@@ -12,7 +12,7 @@ def _fake_tool(bin_dir: Path, name: str, body: str = "echo tool") -> None:
|
|
|
12
12
|
|
|
13
13
|
def test_version_outputs_package_version(capsys):
|
|
14
14
|
assert main(["--version"]) == 0
|
|
15
|
-
assert capsys.readouterr().out.strip() == "xone 0.1.
|
|
15
|
+
assert capsys.readouterr().out.strip() == "xone 0.1.4"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def test_doctor_json_reports_required_tools(tmp_path, monkeypatch, capsys):
|
|
@@ -30,9 +30,9 @@ def test_docs_and_package_metadata_stay_aligned():
|
|
|
30
30
|
assert "xone eval open-source --repos repos.txt" in Path("docs/install.md").read_text(encoding="utf-8")
|
|
31
31
|
assert "xone release verify --build --install --smoke" in Path("docs/release.md").read_text(encoding="utf-8")
|
|
32
32
|
assert 'name = "xone-cli"' in pyproject
|
|
33
|
-
assert 'version = "0.1.
|
|
34
|
-
assert __version__ == "0.1.
|
|
35
|
-
assert "## 0.1.
|
|
33
|
+
assert 'version = "0.1.4"' in pyproject
|
|
34
|
+
assert __version__ == "0.1.4"
|
|
35
|
+
assert "## 0.1.4" in changelog
|
|
36
36
|
assert 'xone = "xone_cli.cli:entrypoint"' in pyproject
|
|
37
37
|
assert "python -m pytest -q" in ci
|
|
38
38
|
assert "xone runbook --base HEAD~1 --head HEAD --dry-run" in ci
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import urllib.error
|
|
2
3
|
from datetime import date
|
|
4
|
+
from types import SimpleNamespace
|
|
3
5
|
|
|
4
6
|
from xone_cli.cli import main
|
|
7
|
+
from xone_cli.open_source_eval import fetch_github_metadata
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
def test_eval_open_source_json_outputs_sanitized_records(tmp_path, monkeypatch):
|
|
@@ -137,3 +140,34 @@ def test_eval_open_source_records_clone_failure_without_crashing(tmp_path, monke
|
|
|
137
140
|
assert failed_command["result"] == "fail"
|
|
138
141
|
assert failed_command["mode"] == "read-only"
|
|
139
142
|
assert payload["records"][1]["commands_run"][1]["name"] == "runbook-dry-run"
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def test_fetch_github_metadata_falls_back_when_urllib_cert_fails(monkeypatch):
|
|
146
|
+
def fail_urlopen(_request, timeout):
|
|
147
|
+
raise urllib.error.URLError("certificate verify failed")
|
|
148
|
+
|
|
149
|
+
def fake_run(command, check, text, stdout, stderr):
|
|
150
|
+
assert command == ["curl", "-fsSL", "https://api.github.com/repos/openai/codex"]
|
|
151
|
+
return SimpleNamespace(
|
|
152
|
+
stdout=json.dumps(
|
|
153
|
+
{
|
|
154
|
+
"full_name": "openai/codex",
|
|
155
|
+
"html_url": "https://github.com/openai/codex",
|
|
156
|
+
"stargazers_count": 1,
|
|
157
|
+
"forks_count": 2,
|
|
158
|
+
"open_issues_count": 3,
|
|
159
|
+
"default_branch": "main",
|
|
160
|
+
"language": "Rust",
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
stderr="",
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
monkeypatch.setattr("xone_cli.open_source_eval.urllib.request.urlopen", fail_urlopen)
|
|
167
|
+
monkeypatch.setattr("xone_cli.open_source_eval.subprocess.run", fake_run)
|
|
168
|
+
|
|
169
|
+
metadata = fetch_github_metadata("openai/codex", date(2026, 6, 15))
|
|
170
|
+
|
|
171
|
+
assert metadata["source"] == "openai/codex"
|
|
172
|
+
assert metadata["snapshot_date"] == "2026-06-15"
|
|
173
|
+
assert metadata["stars"] == 1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/github-github-mcp-server.json
RENAMED
|
File without changes
|
{xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/microsoft-playwright-mcp.json
RENAMED
|
File without changes
|
{xone_cli-0.1.3 → xone_cli-0.1.4}/fixtures/open-source-samples/modelcontextprotocol-servers.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|