The fake of GitHub's API MUST refuse a branch that is not moved forward, MUST cut a recursive tree short where told, MUST answer a protected branch and a throttle as GitHub does; the fake of GitLab's API MUST page a tree along the Link header, MUST check each file a commit changes (a create of a file that exists, an update or a delete of one that does not, an update or a delete whose last commit is not the file's) and MUST commit on the head the branch has when the request arrives; the same contract tests MUST run on both.
Enforced (check): .github: cd commons/anyfs-githost && bun run verify — host.test.ts: one contract on the fake of each host
Where the environment names a repository on a real GitHub or GitLab and a token that may push to it, the conformance suite of AnyFS MUST run on it, in a folder of its own, with the token read from the environment by a function and written nowhere.
Enforced (check): .github: cd commons/anyfs-githost && bun run verify — real.test.ts: the contract on a real Git host where one can be run
Where no real host is named, the test MUST say why it did not run (that GitHub and GitLab cannot be run in the sandbox and that Gitea, which can be, does not speak their write API), and MUST NOT pass silently for want of it.
Enforced (check): .github: cd commons/anyfs-githost && bun run verify — real.test.ts: a test says why it did not run a real host
A real GitHub or GitLab in the checks of every run: a token for one comes from the environment and is not in a test. A real Git host that can be run in process (Gitea or Forgejo) speaks its own API for a commit, not GitHub's or GitLab's, so it would need a client of its own: a later library.