Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
ci: pin the light gate and jarvisctl installs to uv.lock (#472)
Ruben Lütke04353a324a97
diff --git a/.github/actions/install-locked/action.yml b/.github/actions/install-locked/action.ymlindex 0eeea2379c..9a727301fb 100644--- a/.github/actions/install-locked/action.yml+++ b/.github/actions/install-locked/action.yml@@ -13,6 +13,14 @@ inputs:description: Space-separated test tools for a slim base install, pinned through the lock.required: falsedefault: ""+ tools-only:+ description: >-+ "true" skips the locked base set for light jobs: the project goes in+ without dependencies and only the `with` tools are installed, still+ pinned through the lock. No build cache is used (every light tool is a+ pre-built wheel), so a light job never seeds the shared cache.+ required: false+ default: "false"runs:using: compositesteps:@@ -32,6 +40,7 @@ runs:# wheels download faster than a cache restore would unpack them.- name: Restore the uv build cacheid: restore+ if: inputs.tools-only != 'true'uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5with:path: ~/.cache/uv-locked@@ -44,19 +53,21 @@ runs:UV_CACHE_DIR: ${{ steps.uv.outputs.cache_dir }}EXTRAS: ${{ inputs.extras }}TOOLS: ${{ inputs.with }}+ TOOLS_ONLY: ${{ inputs.tools-only }}run: |args=()+ [ "$TOOLS_ONLY" = "true" ] && args+=(--tools-only)for extra in $EXTRAS; do args+=(--extra "$extra"); donefor tool in $TOOLS; do args+=(--with "$tool"); donepython scripts/ci/install_locked.py "${args[@]}"- name: Prune the uv cache to source builds- if: steps.restore.outputs.cache-hit != 'true'+ if: inputs.tools-only != 'true' && steps.restore.outputs.cache-hit != 'true'shell: bashenv:UV_CACHE_DIR: ${{ steps.uv.outputs.cache_dir }}run: python -m uv cache prune --ci- name: Save the uv build cache- if: steps.restore.outputs.cache-hit != 'true'+ if: inputs.tools-only != 'true' && steps.restore.outputs.cache-hit != 'true'continue-on-error: trueuses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5with:diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 3e1b524d9a..df44b757e5 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -215,10 +215,13 @@ jobs:- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0with:python-version: "3.11"- - name: Install the light gate dependencies (no torch, no audio)- run: |- python -m pip install -e . --no-deps- python -m pip install typer platformdirs click httpx rich pyyaml==6.0.3 pydantic loguru python-dotenv packaging+ # Light on purpose (no torch, no audio), yet every version comes from+ # uv.lock: an upstream release cannot turn the gates red on its own.+ - name: Install the light gate dependencies from uv.lock+ uses: ./.github/actions/install-locked+ with:+ tools-only: "true"+ with: typer platformdirs click httpx rich pyyaml pydantic loguru python-dotenv packaging- name: Run every static gateenv:PRIVACY_PRIVATE_EMAILS: ${{ vars.PRIVACY_PRIVATE_EMAILS }}@@ -249,8 +252,11 @@ jobs:- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0with:python-version: "3.11"- - run: python -m pip install -e . --no-deps- - run: python -m pip install pyyaml==6.0.3 pydantic loguru python-dotenv packaging rich typer platformdirs click httpx+ - name: Install the light qualification dependencies from uv.lock+ uses: ./.github/actions/install-locked+ with:+ tools-only: "true"+ with: pyyaml pydantic loguru python-dotenv packaging rich typer platformdirs click httpx- name: Qualify plugin auth and disclose preview pluginsshell: bashrun: |@@ -555,11 +561,14 @@ jobs:python-version: "3.11"# --no-deps proves jarvis.cli_ctl imports and renders --help with only its# own light runtime deps: no torch, audio or GUI stack.- - name: Light install + import/--help smoke+ - name: Light install from uv.lock+ uses: ./.github/actions/install-locked+ with:+ tools-only: "true"+ with: typer platformdirs click httpx rich pytest pytest-asyncio pyyaml pydantic loguru python-dotenv packaging+ - name: Import/--help smokeshell: bashrun: |- python -m pip install -e . --no-deps- python -m pip install typer platformdirs click httpx rich pytest pytest-asyncio pyyaml pydantic loguru python-dotenv packagingpython -c "import jarvis.cli_ctl.__main__"python -m jarvis.cli_ctl --help- name: Base install from uv.lockdiff --git a/scripts/ci/install_locked.py b/scripts/ci/install_locked.pyindex 03c2d8e47c..f82c05baff 100644--- a/scripts/ci/install_locked.py+++ b/scripts/ci/install_locked.py@@ -18,11 +18,16 @@ exactly the locked set instead:4. ``--with`` installs extra test tools (``pytest`` ...) for jobs that keep aslim base install. Their versions, and every dependency they pull, areconstrained to the lock; a tool that is not in the lock is refused.+5. ``--tools-only`` skips step 2 for the light jobs (static gates, the+ jarvisctl import smoke) that deliberately avoid the heavy base install:+ the project goes in without dependencies and only the ``--with`` packages+ are installed, still pinned through the lock.Usage::python scripts/ci/install_locked.py --extra dev --extra telephonypython scripts/ci/install_locked.py --with pytest --with pytest-asyncio+ python scripts/ci/install_locked.py --tools-only --with typer --with httpxpython scripts/ci/install_locked.py --extra dev --dry-run"""@@ -83,13 +88,22 @@ def install_commands(find_links: Sequence[str] = (),tools: Sequence[str] = (),constraints: Path | None = None,+ base: bool = True,) -> list[list[str]]:- """Locked set with hashes enforced, then the editable project, then tools."""- commands = [- _uv(python, "pip", "install", "--python", python, "--require-hashes", "-r", str(locked))- + list(find_links),- _uv(python, "pip", "install", "--python", python, "--no-deps", "-e", str(ROOT)),- ]+ """Locked set with hashes enforced, then the editable project, then tools.++ ``base=False`` leaves the locked set out: only the project (without+ dependencies) and the lock-pinned tools are installed.+ """+ commands = []+ if base:+ commands.append(+ _uv(python, "pip", "install", "--python", python, "--require-hashes", "-r", str(locked))+ + list(find_links)+ )+ elif not tools:+ raise ValueError("a tools-only install needs at least one tool")+ commands.append(_uv(python, "pip", "install", "--python", python, "--no-deps", "-e", str(ROOT)))if tools:if constraints is None:raise ValueError("test tools need the lock as constraints")@@ -133,15 +147,23 @@ def main(argv: Sequence[str] | None = None) -> int:default=[],help="extra test tool, pinned through the lock",)+ parser.add_argument(+ "--tools-only",+ action="store_true",+ help="skip the locked base set: the project without deps plus the --with tools",+ )parser.add_argument("--dry-run", action="store_true", help="print the commands only")args = parser.parse_args(argv)+ if args.tools_only and (args.extra or not args.tools):+ parser.error("--tools-only takes --with tools and no --extra")python = sys.executablefind_links = pip_options()with tempfile.TemporaryDirectory(prefix="locked-install-") as tmp:locked = Path(tmp) / "locked.txt"constraints = Path(tmp) / "constraints.txt" if args.tools else None- _run(export_command(python, locked, extras=args.extra), args.dry_run)+ if not args.tools_only:+ _run(export_command(python, locked, extras=args.extra), args.dry_run)if constraints is not None:_run(export_command(python, constraints, all_extras=True), args.dry_run)if not args.dry_run:@@ -150,7 +172,12 @@ def main(argv: Sequence[str] | None = None) -> int:print(f"error: not pinned by uv.lock: {', '.join(missing)}", file=sys.stderr)return 1for command in install_commands(- python, locked, find_links=find_links, tools=args.tools, constraints=constraints+ python,+ locked,+ find_links=find_links,+ tools=args.tools,+ constraints=constraints,+ base=not args.tools_only,):_run(command, args.dry_run)return 0diff --git a/tests/unit/ci/test_install_locked.py b/tests/unit/ci/test_install_locked.pyindex 8fa3814e74..0838fe6409 100644--- a/tests/unit/ci/test_install_locked.py+++ b/tests/unit/ci/test_install_locked.py@@ -74,3 +74,40 @@ def test_ci_test_jobs_install_from_the_lock():assert any(step.get("uses") == "./.github/actions/install-locked" for step in steps), namefor step in steps:assert 'pip install -e ".[' not in step.get("run", ""), name+++def test_tools_only_leaves_the_locked_set_out(tmp_path):+ constraints = tmp_path / "constraints.txt"+ commands = install_locked.install_commands(+ "py", tmp_path / "locked.txt", tools=["typer"], constraints=constraints, base=False+ )+ assert len(commands) == 2+ assert "--require-hashes" not in commands[0]+ assert commands[0][-3:] == ["--no-deps", "-e", str(install_locked.ROOT)]+ assert commands[1][-3:] == ["-c", str(constraints), "typer"]+ with pytest.raises(ValueError):+ install_locked.install_commands("py", tmp_path / "locked.txt", base=False)+++def test_tools_only_refuses_extras_and_an_empty_tool_list():+ with pytest.raises(SystemExit):+ install_locked.main(["--tools-only", "--extra", "dev", "--with", "pytest", "--dry-run"])+ with pytest.raises(SystemExit):+ install_locked.main(["--tools-only", "--dry-run"])+++def test_light_ci_installs_are_pinned_through_the_lock():+ """The deliberately light jobs still take every version from uv.lock."""+ workflow = yaml.safe_load((ROOT / ".github/workflows/ci.yml").read_text(encoding="utf-8"))+ jobs = workflow["jobs"]+ for name in ("gates", "release-qualification", "jarvisctl"):+ steps = jobs[name]["steps"]+ light = [+ step+ for step in steps+ if step.get("uses") == "./.github/actions/install-locked"+ and step.get("with", {}).get("tools-only") == "true"+ ]+ assert light, name+ for step in steps:+ assert "pip install" not in step.get("run", ""), name