Public: anyone can read this; the crew can change it.

A repository follows its upstream: new upstream commits land by themselves - clean merges through the gate, conflicts to the crew, then landed #3442

Closed opened this has it

Pull #3468 was closed

opened this

Owner, 2026-10-20: "the forge should listen to the github upstream. there might be some updates that we want to keep. the repo should be in autonomous mode so it should work that way. if there are upstream changes, take what we can deterministically with git and auto merge. if there are conflicts get the crew on it and auto merge when its good."

First user: trevato/arm (autonomous, default main), migrated from github.com/Trevato/SO-ARM100, itself a fork of TheRobotStudio/SO-ARM100. Today nothing follows an outside upstream: src/actions/upstream.ts proposes changes up, src/spawn/upstream.ts is a child forge following its parent forge.

Done:

  1. A repository setting "Follow upstream": a git URL + branch (defaults from the migration trail, #3293 - the migration source; its parent offered as a second choice). Public upstreams need no credential; private ones use the connected origin's credential (origins/credentials.ts rules). On by default for migrated repos in autonomous mode; off any time.
  2. Poll cheaply (ls-remote; fetch only when the tip moved), every 30 min and on demand ("Check upstream now").
  3. New upstream commits, deterministic first: if main can fast-forward or git merge is clean, open a pull request "Upstream: N commits from <upstream> (<range>)" authored by the forge, and it lands through the normal landing gate like any crew pull - the gate (checks) is the guard, never a direct push to main.
  4. Conflicts: open the same pull with the conflicting files listed and hand it to the crew's conflict resolver (#2039) with a brief: keep upstream's fixes, keep our work, explain each resolution; reviewed and landed like any crew pull.
  5. Never force-push, never rewrite our history, never take upstream deletions of files we changed without the crew's explicit resolution.
  6. The repo page shows "Following <upstream> · last checked HH:MM · N behind / up to date"; the tick line counts upstream pulls. Test: a fake upstream gains 2 commits (clean) - a pull opens and lands; gains a conflicting commit - a crew run resolves, it lands; setting off - nothing happens.
commented

Split by the planner after three review rounds on #3468: #3557 (credentials only to the exact https origin, the vetted address pinned, one check at a time — the landable core; #3468 holds the work), #3558 (the gate itself lands an upstream pull as a merge, proven by a test) and #3559 (the terminal shows, checks and toggles following). #3558 and #3559 wait for #3557.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs