docs: make the fork origin/upstream split explicit and own the upstream-sync procedure - #6
Merged
Merged
Conversation
… procedure Our fork operates with origin=cm-maple7/firstmate (read-write) and upstream=kunchenguid/firstmate (read-only), but the tracked prose still read as if origin were the parent repository. The concrete hazard is that both remotes differ only by owner in the URL, so a wrong push or a pull request raised against the parent looks identical to a correct one until it lands. CONTRIBUTING.md becomes the single owner of the fork's remote layout and of the deliberate upstream-sync procedure: fetch upstream, merge it into a branch so the result is a merge commit homes can fast-forward onto, resolve conflicts with evidence, run the gates, open the pull request on the fork, and land it with the configured merge authority. Two corrections there were load-bearing rather than cosmetic. The workflow step that told contributors to set their local origin back to the parent repository now has them keep origin on the repository they can push to and add the parent as a separate read-only upstream remote. The contribution rule is now scoped to pull requests targeting the upstream repository, matching the Require no-mistakes check that is already scoped that way, so a fork legitimately sets its own delivery rigor per change. The section also records the gate-mirror lesson: after any remote retarget, re-run `no-mistakes init` and inspect the mirror's own `git remote -v`, because the pipeline rebases and opens pull requests from that mirror's origin rather than from the checkout being worked in, so a stale mirror sends work to the wrong repository while every local check still looks correct. docs/verification/self-update.md records the active evidence that /updatefirstmate advances a home from its own origin, verified end to end against the fork in a throwaway clone, plus the evidence that treehouse pool worktrees inherit the primary checkout's remotes because they share its git directory. The updatefirstmate skill keeps owning the agent path and gains one cross-reference line, so the sync procedure is stated once. No script changed: no firstmate repo URL is hardcoded in bin/ or the skills, so every code path already resolves from each home's own origin. The remaining kunchenguid literals are genuine upstream references - the treehouse and no-mistakes projects, upstream CI run links kept as verification evidence, and the public install clone URL - and none of them asserts write access or pull-request targeting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-through on making this fork's
origin/upstreamsplit explicit, after the upstream sync landed in #5.Our fork operates with
origin=cm-maple7/firstmate(read-write) andupstream=kunchenguid/firstmate(read-only), but the tracked prose still read as iforiginwere the parent repository. The two remotes differ only by owner in the URL, so a wrong push or a pull request raised against the parent looks identical to a correct one until it lands.What changed
CONTRIBUTING.mdbecomes the single owner of the fork's remote layout and the upstream-sync procedure. A new "Fork remotes and upstream sync" section states which remote is writable, thatupstreamis never pushed to and never receives a pull request from an independently operating fork, and the confirm-before-you-push habit (git remote get-url origin).It then writes down the procedure executed in #5, because a fork cannot pick up upstream work by fetching alone - homes fast-forward from
origin, so the work has to reach the fork's own default branch first:git fetch upstream, branch from the fork'smain.git merge upstream/main- a merge commit, not a rebase, so homes fast-forward instead of reconciling rewritten history.origin, open the PR on the fork.It also records the gate-mirror lesson: after any remote retarget, re-run
no-mistakes initand inspect the mirror's owngit remote -v, because the pipeline rebases and opens pull requests from that mirror'sorigin, not from the checkout you are working in. A stale mirror sends work to the wrong repository while every local check still looks correct.Two corrections in
CONTRIBUTING.mdwere load-bearing, not cosmetic:originback to the parent (git@github.com:kunchenguid/firstmate.git). That is the one instruction in the repo that actively pointed a writable remote at upstream. It now keepsoriginon the repository you can push to and adds the parent as a separate read-onlyupstreamremote.main, matching theRequire no-mistakescheck that PR fix(tests): stop the public-followup fixture from expiring #3 already scoped that way, so a downstream fork legitimately sets its own delivery rigor per change.docs/verification/self-update.md(new,maintainer-verification, registered indocs/documentation-audiences.json) records the active evidence below..agents/skills/updatefirstmate/SKILL.mdkeeps owning the agent self-update path and gains one cross-reference line, so the sync procedure is stated once and pointed at from elsewhere./updatefirstmateverified end to end against the forkIn a throwaway home cloned from the fork and set one commit behind its default branch:
The home fast-forwarded to the fork's default branch and correctly reported the instruction surface as changed. Because
6aa4bebis the merge that landed the upstream sync, this run also demonstrates the full chain end to end: upstream work reaches a home only after landing on the fork's ownmain.Future treehouse pool clones inherit the fork remotes
They do, automatically, and no per-worktree repair step exists or is needed. Pool worktrees are
git worktreeentries that share the primary checkout's git directory, so they read its remote configuration rather than defining their own:Verified across the live pool: every listed worktree resolves
originto the fork. Correcting the remotes once in the primary checkout is what makes every existing and future pool worktree correct.No script changed
No firstmate repository URL is hardcoded anywhere in
bin/or.agents/skills/:Every code path - self-update, fleet sync, and remote-secondmate seeding - already resolves from each home's own
origin, soorigin= fork needs no code change. Remote-secondmate seeding resolves each project's origin dynamically and validates it throughbin/fm-project-origin-lib.sh.kunchenguidliterals deliberately keptNone of these asserts write access or pull-request targeting, so all were left alone:
bin/fm-install-treehouse.sh,bin/fm-bootstrap.sh,docs/architecture.md- install sources and links for the separate treehouse and no-mistakes projects.docs/fm-test-portable-shards.md,docs/gitlab-merge-watch.md- upstream CI run and PR links kept as verification evidence, which would be falsified by rewriting them..github/workflows/no-mistakes-required.yml- the scoping condition that makes the job upstream-only, plus the upstream action reference.README.md- the public install clone URL and the project's X badge; cloning the upstream project is correct for a public consumer and implies nothing about push rights.Suggested follow-up, not done here
upstream's push URL in the primary checkout is currently a writable GitHub URL. Settinggit remote set-url --push upstream DISABLEDthere would make an accidentalgit push upstreamfail at the client instead of relying on discipline. That is local, untracked configuration in the primary checkout rather than a change to this repository, so it is left for the captain.Gates