overengineeringstudio / overengineeringstudio/effect-utils
Megarepo: nested pin propagation for cross-repo PR stacks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
Problem
When validating a cross-repo PR stack before merging upstream, downstream repos pin the upstream member (e.g., effect-utils) to a PR branch via mr config pin. However, repos with nested megarepos (e.g., dotfiles contains repos/private-shared and repos/livestore) fail in CI because:
- The parent pins effect-utils to the PR branch ✓
- CI runs
mr apply --allwhich clones nested members (private-shared, livestore) - Nested members are cloned at their default branch (from the parent's lock)
- Nested members' own
megarepo.jsonstill references effect-utils atmain - Nested sync tries to clone effect-utils at
main→ store conflict with the parent's PR branch clone
Current tools
mr config push-refs --allpropagates refs from parent megarepo.json to nested members' megarepo.json through symlinks- But local symlinks point to default branch worktrees, not PR branch worktrees
- So push-refs modifications go to the wrong branch
Desired behavior
When a parent megarepo pins a member to a non-default ref, mr apply --all should ensure nested members can resolve that member consistently. Options:
- Ref propagation in apply: when cloning nested members, inject the parent's pinned ref into the nested member's config before nested sync runs
- Store-level dedup: if effect-utils is already in the store at a non-default ref, allow nested sync to reuse it instead of requiring an exact ref match
- Cascade pin workflow:
mr config push-refsshould be able to target PR branch worktrees (not just default branch symlinks)
Workaround
Merge upstream first (topological order), then downstream PRs validate against merged main.
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 mr apply --all and mr config push-refs --all, then inspect how nested megarepo.json files and store refs are resolved. Compare the three proposed approaches and determine which behavior lets nested members reuse the parent's pinned ref without a store conflict; done means cross-repo PR stacks validate in CI without the described workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100