Dependency management: pinned lockfile + automated bump
mill depends on four sibling shared libraries, consumed as git
dependencies in pyproject.toml:
| Library | Where declared | Notes |
|---|---|---|
robotsix-llmio[openrouter_deepseek,claude_sdk] |
dependencies |
OpenRouter model construction, DeepSeek pin, per-tier reasoning, cost, retry/transient classification (agents/retry.py, agents/openrouter_cost.py are thin shims). |
robotsix-board |
dependencies |
Kanban-board frontend. Its line historically lacked an explicit @main ref (it resolved to the default branch implicitly); now normalized to @main to match the others — cosmetic, uv pins the resolved commit either way. |
robotsix-yaml-config |
dependencies |
Shared YAML config-cascade library. |
robotsix-modules |
dev group only |
Module-taxonomy JSON Schema + validation CLI. Dev/CI-only — used by the robotsix-modules validate step and the pre-commit hook; never imported by mill at runtime. Lives in the PEP 735 [dependency-groups] dev group, not a published package extra. |
All four are referenced as git+https://…@main. Left unpinned, every
fresh install re-resolves @main to whatever the latest commit is,
while stale local venvs keep the old build.
The pin + bump mechanism
This repo uses the pin + bump approach (mill-side, no changes to the library repos):
-
Pin. A
uv.lockis committed at the repo root and is the single source of truth for installs. It records concrete resolved commit hashes for all fourrobotsix-*git deps.maintherefore always builds reproducibly off those pinned commits — never off a moving@mainHEAD. -
Frozen gate. CI (
ci.yml) and theMakefileinstalltarget runuv sync --frozenwithout a precedinguv lock.--frozeninstalls strictly from the committed lock and fails the build if the lock is stale relative topyproject.toml. This is a hard CI gate, not advisory (see ci-policy.md). -
Bump. A scheduled workflow (
deps-bump.yml) runs weekly (cron) and onworkflow_dispatch. It delegates to the fleet reusabledamien-robotsix/robotsix-github-workflows/.github/workflows/deps-bump.yml, which runsuv lock --upgrade-packagefor each of the four first-party git deps (robotsix-llmio,robotsix-board,robotsix-yaml-config,robotsix-modules), refreshing their pinned commits to the latest@mainheads, then opens or updates a PR on the stable branchdeps/bump-uv-lock. That PR triggers the existingci.ymlonpull_request, running the full pytest suite (includingtests/agents/test_retry.py).
Note: the bump PR's CI fires only because it is created with a GitHub App installation token (minted from the existing
RELEASE_APP_PRIVATE_KEYsecret), not the defaultGITHUB_TOKEN. GitHub deliberately suppresses workflow runs for events created byGITHUB_TOKENto prevent recursion, so without the App token the gate would be silently bypassed.
Net effect: a new shared-lib commit can reach mill only through the
bump PR, whose CI runs the full suite. A semantic change that breaks
mill's contract surfaces in the bump PR (red CI blocks the merge) — it
can never land silently on main.
Never hand-edit
uv.lock. Regenerate it withuv lock(oruv lock --upgradeto advance the git refs) and commit the result.For a targeted advisory/CVE bump (a locked package flagged by
uv audit/pip-audit, e.g.anyio), the implement/ci_fix sandbox can regenerate the lock end-to-end without operator help:uv lock --upgrade-package <pkg>re-resolves only that package against PyPI through the egress allowlist (pypi.org/pythonhosted.org/github.comare permitted, everything else denied) and reuses the existinggit+httpspins, so no credentials are needed for public git deps. Only a full re-resolution that must advance a git rev still requires the temp-remove-git-deps workaround (or a humanuv lockwith credentials).
Trade-offs
- Adoption latency. A genuinely-wanted library change waits for the
next bump PR (up to a week, or trigger
deps-bump.ymlmanually viaworkflow_dispatch). This is the cost of gating; left unpinned, the change arrives instantly but ungated. - Double-merge for coordinated cross-repo changes. A change that must land in both a library and mill together requires two merges (the library, then mill's bump PR). Acceptable for the safety it buys.
- Earliest-catch vs. mill-scoped (the considered-and-deferred alternative). A consumer-contract job inside each library repo's CI (draft option 1) would catch a breaking change at the earliest point — before it even merges in the library. It is deliberately not done here: it requires modifying the external robotsix-llmio / robotsix-board / robotsix-yaml-config / robotsix-modules repositories, which are outside this mill repo and outside an implement agent's reach. Pin + bump is fully mill-side and "simplest to operate"; it catches breakage slightly later (in the bump PR rather than upstream) but with zero cross-repo coordination.
- Renovate
lockFileMaintenance(considered and rejected). An earlier iteration of this design considered enabling"lockFileMaintenance"inrenovate.jsonas an alternative way to refreshuv.lockperiodically. It was rejected: Renovate'spep621manager does not bumpgit+httpsversion refs, and lockfile maintenance requires the Renovate runner to haveuv+ GitHub network access to re-resolve the git deps — making it less deterministic than the self-contained scheduled workflow above. This option is historical only: the Renovate bot is not installed on this repo, sorenovate.jsonis dormant and never runs.
CI-monitor heuristic
When main (or a baseline) goes red and zero mill commits touch the
failing area, suspect a shared-lib bump first: check whether the
robotsix-* pinned commits in uv.lock recently advanced (i.e. via a
merged bump PR). The failure is most likely a shared-lib semantic change
the contract tests caught, not a regression in mill's own code.
Retroactive walkthrough: llmio PR #103 (is_rate_limited)
llmio PR #103 changed is_rate_limited from string-name matching to
isinstance checks. Because mill's deps were unpinned @main, that
commit propagated to mill main on the next fresh install, turning
tests/agents/test_retry.py red at main commit 57b902df — poisoning
every ticket baseline as a "pre-existing failure on main" and spawning
duplicate fix drafts (7eab, e2ec).
With pin + bump in place, that same llmio commit could not have
reached mill main directly. It would have entered only through a
bump PR — deps-bump.yml's uv lock --upgrade advancing the llmio pin
(the Renovate lockFileMaintenance alternative above was considered and
rejected, so the bump workflow is the only live mechanism). That bump
PR's CI would have run tests/agents/test_retry.py, gone red in the
PR, and blocked the merge — leaving main green and unpoisoned.
This ticket proves only that the gate would have caught it. The
separate fix — making the test_retry.py fixture construct the real
pydantic_ai.exceptions.UsageLimitExceeded so it survives both
string- and isinstance-based classification — is tracked by drafts
7eab/e2ec and is out of scope here.