Skip to content

docs(contributing): make your own fork the PR base, and unbreak the gotmp teardown fixture - #3

Merged
doitdigital0495 merged 2 commits into
mainfrom
fm/fm-nomistakes-fork-base
Aug 21, 2026
Merged

doitdigital0495 merged 2 commits into
mainfrom
fm/fm-nomistakes-fork-base

Conversation

@doitdigital0495

Copy link
Copy Markdown
Owner

What

Two changes:

  1. CONTRIBUTING.md gains a "Running your own line from a fork" section documenting how to make your own fork the PR base instead of the parent, and why that has to be remote configuration rather than a per-run flag.
  2. tests/fm-gotmp.test.sh symlinks bin/fm-busy-lib.sh into both fake-root builders. This is the failure currently red on main in the Behavior portable serial 1 shard.

Why

The documented setup (step 1 + step 3) points local origin at the parent and hands the fork to no-mistakes as a push target only, so every PR it opens has the parent as its base repo. GitHub then holds a fork PR's workflow runs at action_required until someone with write access on the parent approves them. Until that happens neither CI nor Require no-mistakes reports at all, so the author cannot judge the PR green.

That is the right trade when contributing a change back. It is the wrong one when running firstmate as your own fleet.

The shape, and why this one

git remote set-url origin https://github.com/<you>/firstmate
git config --unset remote.origin.pushurl
git remote add upstream https://github.com/kunchenguid/firstmate
gh repo set-default <you>/firstmate
no-mistakes init          # re-record the gate with no --fork-url

origin has to be the fork, because no-mistakes opens PRs against origin and exposes no per-run base override - --fork-url only moves the push target. With origin already the fork, --fork-url is unnecessary: push target and PR base are the same repo.

gh pr create independently defaults a fork's base repo to its parent, so gh repo set-default is what pins it. It records remote.origin.gh-resolved in git config.

The parent stays reachable as upstream, so git fetch upstream keeps working.

Consequence worth knowing

/updatefirstmate (bin/fm-update.sh) fast-forwards from the remote literally named origin, so after this change it tracks your fork rather than the parent. That is the intended behavior once your fork is your trunk, but it means the parent's work has to be merged in deliberately from upstream, and once you have merged your own PRs your fork's main has diverged from the parent and can no longer be fast-forwarded from it. Both facts are written into the new section rather than left to be rediscovered.

The fixture fix

fm-teardown.sh began sourcing bin/fm-busy-lib.sh, but neither fake-root builder in tests/fm-gotmp.test.sh symlinks that sibling into its bin/, so the real teardown subprocess aborts on the missing source:

bin/fm-teardown.sh: line 172: .../bin/fm-busy-lib.sh: No such file or directory
not ok - teardown exited non-zero with a valid tasktmp

A real home always has the sibling, so this is a fixture gap only. Included here because it is what stands between this branch's base and a green CI run.

Verification

  • bin/fm-doc-audience-check.sh - ok surfaces=69 local_links=255
  • bin/fm-lint.sh - clean (actionlint absent locally; CI covers workflow lint, and no workflow files changed)
  • bin/fm-test-run.sh tests/fm-gotmp.test.sh - 3/3 pass, was 0/3 before
  • git fetch upstream resolves and upstream/main is 1cb900c, so the update path is intact
  • gh repo set-default --view prints doitdigital0495/firstmate, and this PR's own base repo is the evidence that a PR now opens against the fork

Expected-red check

This PR was raised directly rather than through the no-mistakes pipeline, so Require no-mistakes fails by design - its body carries no pipeline signature. That signature was not hand-written into this body, because forging it would defeat the check. CI is the check that matters here.

…the PR base

The documented setup points local `origin` at the parent and hands the fork to
`no-mistakes` as a push target only, so every PR it opens has the parent as its
base repo. GitHub then holds a fork PR's workflow runs at `action_required`
until someone with write access on the parent approves them, and until that
happens neither `CI` nor `Require no-mistakes` reports at all, so the author
cannot judge the PR green.

That is the right trade when you are contributing a change back, but it is the
wrong one when you are running firstmate as your own fleet. Document the second
shape: `origin` is your fork, the parent stays reachable as `upstream`, and
`gh repo set-default` pins the base repo that `gh pr create` would otherwise
default to the fork's parent.

It has to be configuration rather than a per-run flag, because `no-mistakes`
opens PRs against `origin` and exposes no per-run base override. With `origin`
already the fork, `--fork-url` becomes unnecessary.

Also record the consequence for `/updatefirstmate`: `bin/fm-update.sh`
fast-forwards from the remote literally named `origin`, so it tracks the fork
after this change, and the parent has to be merged in deliberately from
`upstream` once your fork's `main` has diverged.
`fm-teardown.sh` began sourcing `bin/fm-busy-lib.sh` for the shared
per-harness busy contract, but neither fake-root builder in this suite
symlinks that sibling into its `bin/`, so the real teardown subprocess
aborts on the missing source and every assertion that expects a zero exit
fails:

    bin/fm-teardown.sh: line 172: .../bin/fm-busy-lib.sh: No such file or directory
    not ok - teardown exited non-zero with a valid tasktmp

This is the failure currently red on `main` in the `Behavior portable
serial 1` shard. It is a fixture gap only - a real home always has the
sibling - so the fix is the same one-line symlink the other required
siblings already get, added to both builders.
@doitdigital0495
doitdigital0495 merged commit b075b8a into main Aug 21, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants