fangorn/ex_git_objectstore
public
On merge to main, open a PR on fangorn/anvil bumping the ex_git_objectstore pin #81
Links
No links yet.
Problem
Anvil consumes ex_git_objectstore as a git dependency pinned by SHA in mix.lock. In dev it resolves via [path: "../ex_git_objectstore"] (mix.exs), but the Docker build and CI resolve the pinned SHA from the git remote.
Nothing bumps that pin. A fix can land on egos main and sit there indefinitely while Anvil keeps building against an older SHA — which is exactly the situation today: egos#78’s receive-pack fix and egos#75’s test isolation fix will both be invisible to Anvil until someone remembers to run mix deps.update ex_git_objectstore by hand.
Proposal
Gate a step on merges to egos main that opens a PR on fangorn/anvil updating the pin, so the bump goes through Anvil’s normal review and full test suite rather than landing unverified.
The PR is opened, never merged automatically. Anvil’s CI is the gate; a human merges.
Requirements
- Triggers only on a real merge to egos
main— not on feature branches, not on tags. - Updates
mix.lock’sex_git_objectstoreentry to the newmainSHA, and nothing else. - Opens a PR on
fangorn/anvilagainstmain, titled and bodied so a reviewer can see which egos commits are being pulled in. - Idempotent: if an open pin-bump PR already exists, update it in place rather than opening a second one. Repeated merges to egos main must not produce a pile of PRs.
- Never merges, never deploys.
- A failure to open the PR must fail the job loudly, not silently skip.
Known design constraint: credentials
The ANVIL_TOKEN the runner injects is a per-job token scoped to the dispatching repo and auto-revoked when the job ends. It cannot write to fangorn/anvil — repo scoping is enforced (job_api_token_repo_id, see fangorn/anvil#390).
So this step needs a cross-repo credential supplied as a CI secret with permission to push a branch and open a PR on fangorn/anvil. Provisioning that secret is an admin action and a prerequisite; the step must fail with a clear message when the secret is absent rather than half-working.
Gating gotcha
Use an exact branch comparison. branch contains 'main' is a substring match and matched feat/324-git-maintenance — see fangorn/anvil#234. The existing release step compares HEAD against origin/main because CI checks out a detached HEAD; follow that precedent.
Correction to this issue’s text — the spec above is wrong on one point.
The Requirements section says the bump “updates mix.lock’s ex_git_objectstore entry, and nothing else.” That would not work. The pin lives in two places, and mix.exs is the authoritative one:
| file | carries |
|---|---|
mix.exs (ex_git_objectstore_dep/0) |
ref: "<sha>" on the git dep — authoritative |
mix.lock |
the resolved SHA |
Mix treats a lock that disagrees with mix.exs as stale and re-resolves from the dependency, so a lock-only edit is a no-op. Both must move together.
Verified against origin/main: mix.exs pins ref: "228bb1ed4637ae81b0dc6be4801f86a55eff0888", while egos main is at 783dab7b — so Anvil is currently building against an egos commit two merges behind, which is the concrete case this issue exists to prevent.
The implementation on PR #51 does the right thing (both files); only this issue’s wording was wrong. Flagged so nobody reading it later builds the broken version.