Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

perf(ci): verify the five ubuntu Pythons for web fetch in one job (#3032)

Call Whitee111251e0109
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 36f75a5eb..5639bb3c4 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -111,6 +111,7 @@ jobs:
pre-commit run --all-files
web-fetch-runtime:
+ name: web-fetch-runtime (${{ matrix.os }}, ${{ matrix.label }})
needs: [changes, build-linux-artifacts]
if: needs.changes.outputs.docs_only == 'false'
runs-on: ${{ matrix.os }}
@@ -118,16 +119,16 @@ jobs:
strategy:
fail-fast: false
matrix:
+ # Every leg is requested the moment the artifact build finishes, beside
+ # the install regression that sits on the critical path. Five ubuntu
+ # legs held runners for under a minute of setup each, so one ubuntu job
+ # verifies all five Pythons in turn, each in its own interpreter.
include:
- - {os: ubuntu-latest, python: "3.10"}
- - {os: ubuntu-latest, python: "3.11"}
- - {os: ubuntu-latest, python: "3.12"}
- - {os: ubuntu-latest, python: "3.13"}
- - {os: ubuntu-latest, python: "3.14"}
- - {os: ubuntu-24.04-arm, python: "3.12"}
- - {os: macos-15-intel, python: "3.12"}
- - {os: macos-15, python: "3.12"}
- - {os: windows-latest, python: "3.12"}
+ - {os: ubuntu-latest, label: "3.10-3.14", python: "3.10\n3.11\n3.12\n3.13\n3.14"}
+ - {os: ubuntu-24.04-arm, label: "3.12", python: "3.12"}
+ - {os: macos-15-intel, label: "3.12", python: "3.12"}
+ - {os: macos-15, label: "3.12", python: "3.12"}
+ - {os: windows-latest, label: "3.12", python: "3.12"}
defaults:
run:
shell: bash
@@ -140,17 +141,39 @@ jobs:
with:
name: vibe-wheel-linux
path: dist
- - name: Install frozen binary dependencies and wheel
+ - name: Prepare frozen requirements
run: |
python -m pip install --disable-pip-version-check --only-binary=:all: --no-deps uv==0.12.10
uv export --frozen --no-dev --no-emit-project --output-file fetch-requirements.txt
- uv pip install --system --require-hashes --only-binary=:all: --no-binary claude-agent-sdk --no-binary http-ece -r fetch-requirements.txt
- uv pip install --system --no-deps dist/*.whl
- uv pip install --system pytest pytest-asyncio jsonschema
python -c "from pathlib import Path; p=Path('ui/dist'); p.mkdir(parents=True,exist_ok=True); (p/'index.html').touch()"
+ # Each listed Python gets the same frozen binary dependencies, wheel and
+ # pytest selection in its own interpreter. Every version runs even after
+ # one fails, and each failure names its version.
- name: Verify native resources, pinned transports and disposable workers offline
+ env:
+ PYTHON_VERSIONS: ${{ matrix.python }}
run: |
- python -m pytest -q tests/test_model_hub_fetch_policy.py tests/test_model_hub_fetch_transport.py tests/test_model_hub_fetch_tls.py tests/test_model_hub_local_fetch.py tests/test_desktop_runtime_bundle_builder.py -k 'not packaged_cli_survives'
+ failed=""
+ for version in $PYTHON_VERSIONS; do
+ echo "::group::Python $version"
+ if python_bin="$(uv python find --system --no-project --python-preference only-system "$version")" \
+ && "$python_bin" -c "import sys; print(sys.executable, sys.version)" \
+ && uv pip install --system --python "$python_bin" --require-hashes --only-binary=:all: --no-binary claude-agent-sdk --no-binary http-ece -r fetch-requirements.txt \
+ && uv pip install --system --python "$python_bin" --no-deps dist/*.whl \
+ && uv pip install --system --python "$python_bin" pytest pytest-asyncio jsonschema \
+ && "$python_bin" -m pytest -q tests/test_model_hub_fetch_policy.py tests/test_model_hub_fetch_transport.py tests/test_model_hub_fetch_tls.py tests/test_model_hub_local_fetch.py tests/test_desktop_runtime_bundle_builder.py -k 'not packaged_cli_survives'
+ then
+ echo "::endgroup::"
+ else
+ echo "::endgroup::"
+ echo "::error::web-fetch-runtime failed on Python $version"
+ failed="$failed $version"
+ fi
+ done
+ if [ -n "$failed" ]; then
+ echo "web-fetch-runtime failed on Python:$failed"
+ exit 1
+ fi
ui-checks:
needs: changes
diff --git a/docs/plans/ci-critical-path.md b/docs/plans/ci-critical-path.md
index 8a44f5884..206799a82 100644
--- a/docs/plans/ci-critical-path.md
+++ b/docs/plans/ci-critical-path.md
@@ -150,3 +150,32 @@ shard, and the shards are not on the critical path. Compiling repository
sources adds 1.8 s. The only measurable gain came from pytest's own rewrite
cache, about 1.4 s for the contract job, and compileall does not produce that
cache.
+
+## October 2026: One Ubuntu Web-Fetch Job
+
+### Baseline
+
+`web-fetch-runtime` and the install regression become ready together, the moment
+the artifact build finishes. On the critical path, the install regression waited
+2.4 to 7.3 minutes for a runner in #3019's runs. Nine web-fetch legs were requested
+at that same moment. Five of them were `ubuntu-latest` legs, one per supported
+Python (3.10 to 3.14). Each leg took 45 to 63 seconds: 4 to 9 seconds to install
+and 31 to 41 seconds to test. The tests are mostly waits; locally, 40 seconds
+of wall time used 5.6 seconds of CPU.
+
+### Change and Invariants
+
+- One `ubuntu-latest` job verifies all five Pythons in turn. Each version uses
+ its own setup-python interpreter, found with `uv python find --system`, and
+ gets the same three `uv pip install --system` commands, the same wheel, and
+ the same pytest selection and flags. Every version runs even after one fails;
+ each failure is reported as an `::error::` naming its version, and the job
+ fails. The arm64, macOS, and Windows legs are unchanged.
+- At the build-finish moment, the workflow requests four fewer hosted jobs.
+ The scenario-evidence gate parses the same pytest arguments for this job.
+ The job uploads no junit report, so its matrix size changes no verdict.
+- `web-fetch-runtime` is not a required check, and no document or script
+ references its per-version job names.
+
+Measured durations and queue times for this pull request's runs are recorded
+in the PR.
diff --git a/tests/test_ci_pipeline.py b/tests/test_ci_pipeline.py
index af13cb6e1..4dcca0386 100644
--- a/tests/test_ci_pipeline.py
+++ b/tests/test_ci_pipeline.py
@@ -11,6 +11,8 @@ import sys
import pytest
import yaml
+from scripts.ci_scenario_evidence import pytest_commands
+
ROOT = Path(__file__).resolve().parents[1]
@@ -667,6 +669,77 @@ def test_required_gates_accept_skips_only_for_proven_docs_and_fail_closed(tmp_pa
assert (result.returncode == 0) == passes, (results, result.stdout, result.stderr)
+WEB_FETCH_TESTS = (
+ "-m pytest -q tests/test_model_hub_fetch_policy.py tests/test_model_hub_fetch_transport.py "
+ "tests/test_model_hub_fetch_tls.py tests/test_model_hub_local_fetch.py "
+ "tests/test_desktop_runtime_bundle_builder.py -k not packaged_cli_survives"
+)
+
+
[email protected]("failing", [(), ("3.11", "3.13")])
+def test_web_fetch_runtime_verifies_every_python_in_its_own_interpreter(tmp_path: Path, failing: tuple) -> None:
+ """One ubuntu job covers all five Pythons; every version runs, and each failure names its version."""
+ job = _jobs()["web-fetch-runtime"]
+ legs = job["strategy"]["matrix"]["include"]
+ assert job["strategy"]["fail-fast"] is False
+ assert [leg["os"] for leg in legs].count("ubuntu-latest") == 1
+ assert {(leg["os"], version) for leg in legs for version in leg["python"].split()} == {
+ *(("ubuntu-latest", version) for version in ("3.10", "3.11", "3.12", "3.13", "3.14")),
+ *((runner, "3.12") for runner in ("ubuntu-24.04-arm", "macos-15-intel", "macos-15", "windows-latest")),
+ }
+ step, = [step for step in job["steps"] if "PYTHON_VERSIONS" in step.get("env", {})]
+ assert step["env"]["PYTHON_VERSIONS"] == "${{ matrix.python }}"
+ # The evidence gate reads what this job selects from the workflow text.
+ assert pytest_commands(ROOT / ".github/workflows/lint.yml")["web-fetch-runtime"] == [(
+ "tests/test_model_hub_fetch_policy.py", "tests/test_model_hub_fetch_transport.py",
+ "tests/test_model_hub_fetch_tls.py", "tests/test_model_hub_local_fetch.py",
+ "tests/test_desktop_runtime_bundle_builder.py", "-k", "not packaged_cli_survives",
+ )]
+
+ # Stub uv and one interpreter per version; record every call they receive.
+ bin_dir = tmp_path / "bin"
+ bin_dir.mkdir()
+ calls = tmp_path / "calls.log"
+ (bin_dir / "uv").write_text(
+ "#!/bin/sh\n"
+ 'if [ "$1 $2" = "python find" ]; then for last; do :; done; echo "$STUB_BIN/python$last"; exit 0; fi\n'
+ f'echo "uv $*" >> {calls}\n'
+ )
+ for version in ("3.10", "3.11", "3.12", "3.13", "3.14"):
+ (bin_dir / f"python{version}").write_text(
+ "#!/bin/sh\n"
+ f'echo "python{version} $*" >> {calls}\n'
+ f'if [ "$2" = pytest ] && [ "{version in failing}" = True ]; then exit 1; fi\n'
+ )
+ for path in bin_dir.iterdir():
+ path.chmod(0o755)
+ (tmp_path / "dist").mkdir()
+ (tmp_path / "dist" / "avibe_os-1-py3-none-any.whl").touch()
+
+ result = subprocess.run(
+ ["bash", "--noprofile", "--norc", "-eo", "pipefail", "-c", step["run"]], cwd=tmp_path,
+ env={**os.environ, "PATH": f"{bin_dir}{os.pathsep}{os.environ['PATH']}", "STUB_BIN": str(bin_dir),
+ "PYTHON_VERSIONS": legs[0]["python"]},
+ capture_output=True, text=True, check=False,
+ )
+
+ assert result.returncode == (1 if failing else 0), result.stdout + result.stderr
+ log = calls.read_text().splitlines()
+ for version in ("3.10", "3.11", "3.12", "3.13", "3.14"):
+ interpreter = f"{bin_dir}/python{version}"
+ assert log.count(f"python{version} {WEB_FETCH_TESTS}") == 1
+ assert log.count(
+ f"uv pip install --system --python {interpreter} --require-hashes --only-binary=:all: "
+ "--no-binary claude-agent-sdk --no-binary http-ece -r fetch-requirements.txt"
+ ) == 1
+ assert log.count(f"uv pip install --system --python {interpreter} --no-deps dist/avibe_os-1-py3-none-any.whl") == 1
+ assert log.count(f"uv pip install --system --python {interpreter} pytest pytest-asyncio jsonschema") == 1
+ named = f"::error::web-fetch-runtime failed on Python {version}" in result.stdout
+ assert named == (version in failing)
+ if failing:
+ assert "web-fetch-runtime failed on Python: 3.11 3.13" in result.stdout
+
+
def test_lint_replaces_only_the_same_pr_or_branch_and_runs_no_release_listener() -> None:
# A shared global group would cancel unrelated PRs; master must cancel its
# own obsolete full run. Trigger scope is part of that scheduling contract.