Skip to content

fix(runtime): make pull() idempotent for already-installed models (is…#162

Merged
himanshu231204 merged 1 commit into
mainfrom
fix/156-m1-m3
Jul 19, 2026
Merged

fix(runtime): make pull() idempotent for already-installed models (is…#162
himanshu231204 merged 1 commit into
mainfrom
fix/156-m1-m3

Conversation

@himanshu231204

Copy link
Copy Markdown
Member

…sue #156)

BaseRuntime.pull() now short-circuits when the model is already installed, returning a successful PullResult(already_present=True) without re-downloading. This keeps repeated install()/load() calls cheap and avoids redundant network fetches — core package-manager behavior.

Added already_present field to PullResult. Updated tests: idempotent pull skips daemon pull(); non-installed still invokes it. Made test_info installed-field assertion environment-agnostic (was hardcoding installed=False, which broke when llama3:8b is actually present).

Summary

Changes

Testing

Checklist

  • Branch named per Git Workflow (feature/, fix/, docs/, refactor/, test/, chore/)
  • Not developed on main
  • Code follows AGENT.md coding standards (type hints, Pydantic v2, no generic Exception, no business logic in CLI)
  • domain/ and ports/ stay pure (no I/O, no framework imports)
  • Quality gates pass locally: ruff, mypy --strict, bandit, pytest
  • Docs updated if behavior changed
  • pyproject.toml and src/modeldock/__init__.py versions match (if release-related)

…sue #156)

BaseRuntime.pull() now short-circuits when the model is already installed, returning a successful PullResult(already_present=True) without re-downloading. This keeps repeated install()/load() calls cheap and avoids redundant network fetches — core package-manager behavior.

Added already_present field to PullResult. Updated tests: idempotent pull skips daemon pull(); non-installed still invokes it. Made test_info installed-field assertion environment-agnostic (was hardcoding installed=False, which broke when llama3:8b is actually present).

Co-Authored-By: Claude <noreply@anthropic.com>
@himanshu231204
himanshu231204 merged commit ab44eab into main Jul 19, 2026
29 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @himanshu231204!

Your pull request has been successfully merged into main. 🚀

Thank you for contributing to OpenAgentHQ and helping improve the project.

We truly appreciate your contribution and hope to see you back with more amazing PRs!

Happy Open Sourcing! ❤️

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.

1 participant