overengineeringstudio / overengineeringstudio/effect-utils
mr fetch can resolve a branch member to a stale commit unless --force is passed
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
Split out of #962, which is now scoped to the mr apply half (fixed in #963).
Problem
mr fetch can resolve a #<branch> member to a stale commit and only pick up the true remote
tip when passed --force.
Observed repeatedly in one session: mr fetch --apply resolved effect-utils#main to
b5e983b0 while GitHub's main was many commits ahead. mr fetch --force then resolved the
true tip. This happened across several repos, so it is not a single corrupted mirror.
A likely-related observation, unverified as the same cause: a canonical store worktree for
main sat at a commit that was not an ancestor of origin/main (f7215007d vs
2dcbfd8e1), i.e. the local mirror had diverged rather than simply lagged.
Why it matters
The lock is meant to record the resolved tip of the configured ref. If resolution reads a stale
mirror, mr fetch writes a lock entry that does not correspond to the remote ref it names, and
every downstream consumer inherits it — silently, because the lock looks perfectly well-formed.
Expected
mr fetch resolves a branch member to the current remote tip without needing --force, or
reports why it cannot.
Notes
Unlike the apply-side defect, this one writes the lock rather than the workspace, so the
mr apply drift guard added in #963 will not catch it — a stale-but-consistent lock and
workspace agree with each other.
Posted on behalf of @schickling
| field | value |
|---|---|
agent_name |
🌄 cl2-vale |
agent_session_id |
d1dbf622-1045-4840-aa99-085f5211d5cf |
agent_tool |
Claude Code |
agent_tool_version |
2.1.215 |
agent_runtime |
Claude Code 2.1.215 |
agent_model |
claude-opus-4-8 |
runtime_profile |
/nix/store/r0yyx5vd9frm4d8klx3i3c1930d9k2ix-coding-agent-runtime-profile/share/coding-agents/profile.json |
skills_manifest |
/nix/store/1rg1cdw91rx4gris2kh0sdwyd4d39nxf-agent-skills-corpus/share/agent-skills/manifest.json |
worktree |
livestore-contrib/schickling/2026-07-19-misc |
machine |
dev3 |
tooling_profile |
dotfiles@unknown-dirty |
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the mr fetch branch-member resolution path and how it writes the lock, then reproduce the stale result with and without --force across the affected repositories. Check how the canonical store worktree and remote tip are consulted. Done means mr fetch resolves the configured branch to the current remote tip without --force, or reports why it cannot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100