Fixes issue 539: the follow-up findings of review 17 on #233 (the gitea_commit tool, issue 375).
What the forge does (checked first)
diffpatch takes no sha on Gitea 1.27.3. I read the forge's own swagger (/swagger.v1.json, version 1.27.3). ApplyDiffPatchFileOptions has branch, new_branch, content, message, force_push, signoff and no sha or last commit. ChangeFilesOptions (POST /contents) has none either. In the 1.27.3 source, routers/api/v1/repo/file.go says so itself ("the LastCommitID is not provided in the API options"). Neither write can be pinned to a commit. Both answers carry commit.parents.
How the forge matches a rule (1.27.3 models/git/protected_branch.goMatch, modules/glob): a name with none of *?\[]{} matches with strings.EqualFold (any case). Anything else is a glob with / as separator: *, **, ?, [abc], [a-z], [!abc], {a,b} and \ escapes, matched case-sensitively. A glob that does not compile falls back to its literal text.
Does the forge refuse the admin account's push to a branch such a rule covers? From the source: yes, when the rule refuses pushes. VerifyBranchProtection → CanUserPush returns false on !CanPush, with no exception for an administrator. When a rule allows pushes, a writer may push, and only this tool's own refusal keeps the commit off that branch. Not tested live: a test needs a [..] rule on some repository, no tool removes a protection rule (they only strengthen), and the only rule today is mesh-catalog's main. Testing the case-insensitive match on Main would leave a branch the forge then refuses to delete. I left the forge untouched.
Changes (modules/gitea)
Parent (items 1, 2). On an existing branch, the blobs are read at the commit read first (existing.Commit.ID), not at the branch name, so a file changed meanwhile is refused by the forge (sha mismatch). The answer's parent is the parent the forge says it made the commit on: commit.parents from its answer, or GET git/commits/{sha} when the answer has none. If that cannot be read, the call fails loudly and names the commit made. When the branch or base moved between the read and the commit, said names both commits and points to gitea_compare.
Protection matching (item 3).cmd/forge/rules.go ports Gitea's compiler line for line. guard.tsruleCovers gets the same rule, which also fixes gitea_api file writes and the covering globs of gitea_branch_protection_set. Both now also match a plain name in any case (MAIN is covered by main), as the forge does.
Search deadline (item 4).searchArchive takes the call's context. Decompression goes through a reader that stops when the context ends. A search that reaches the deadline answers what it found, with stopped_at_deadline: true and a line in said.
Size limits (item 5). A commit carries at most 4 MiB per file (content_base64 decoded), 16 MiB of files together, or a 4 MiB patch. Anything larger is refused before anything is sent. The tool description and the README state the limits.
One HTTP client (item 6).internal/forgehttp (Client.Do/GetJSON/SendJSON, ErrNotFound, StatusError, FromEnv) replaces the two copies in cmd/forge and cmd/npm-registry. Each bundle embeds it, and the timeouts (50 s and 20 s) are unchanged.
Tests
New Go tests in cmd/forge/forge_test.go: a branch moved under the commit (said, with the right parent); a file changed under the commit (refused, nothing overwritten); a patch on a base that moved; a parent missing from the answer (read from the commit, and a failure when unreadable); each size limit, plus one at the limit; search stopped at its deadline; 19 more cases in TestRuleCoversIsTheGuardsRule.
Mutations, each failing its test: blobs read at the branch name; parent as read; size limits off; the old matcher (8 cases fail); the deadline check off.
TypeScript: a new test in test/guard.test.ts covers the same cases, plus gitea_api refusing writes to release-a (rule release-[ab]), lts/2 (rule {stable,lts}/*) and MAIN (rule main). With main's guard.ts it fails, and with this branch 65 of 65 pass. Run through merge-check-typescript.sh with a toolchain assembled locally (typescript, @types/node, mesh-sdk 0.1.13).
go vet and go test -race pass for the module.
MESH_GATE=<controller built from mesh-controller main d881f47> MESH_CHECK_MODULES=gitea sh merge-check.sh passes: words, agent-home, paths, manifests (69, as kept), and the module's tests.
git merge-tree with #234 (issue 456, also in modules/gitea) shows no conflict.
Design limits I chose
4 MiB per file or patch and 16 MiB per commit. The bus's message size bounds a call anyway; larger work is several commits.
A branch that moved under the commit is reported, not refused: the forge has already made the commit, and a file it changes cannot have moved (blob check) or the patch would not apply.
guard.ts treats a \x escape as the literal x. Gitea passes it to its regexp as is (so \a would be a bell character). The Go port follows Gitea exactly.
Reviewers' checklist
The tests fail without the fix (mutations above). The checks are green.
No manifest change: the new package sits inside the module, both bundles build from their own cmd/ as before.
The rule matchers in rules.go and guard.ts agree with each other and with Gitea 1.27's modules/glob.
Nothing is written live. Only the parent is read, after the forge has made the commit.
The bundle still writes as the forge's admin account. That is issue 469.
Fixes issue 539: the follow-up findings of review 17 on #233 (the `gitea_commit` tool, issue 375).
## What the forge does (checked first)
- **diffpatch takes no sha on Gitea 1.27.3.** I read the forge's own swagger (`/swagger.v1.json`, version 1.27.3). `ApplyDiffPatchFileOptions` has `branch`, `new_branch`, `content`, `message`, `force_push`, `signoff` and no sha or last commit. `ChangeFilesOptions` (`POST /contents`) has none either. In the 1.27.3 source, `routers/api/v1/repo/file.go` says so itself ("the LastCommitID is not provided in the API options"). Neither write can be pinned to a commit. Both answers carry `commit.parents`.
- **How the forge matches a rule** (1.27.3 `models/git/protected_branch.go` `Match`, `modules/glob`): a name with none of `*?\[]{}` matches with `strings.EqualFold` (any case). Anything else is a glob with `/` as separator: `*`, `**`, `?`, `[abc]`, `[a-z]`, `[!abc]`, `{a,b}` and `\` escapes, matched case-sensitively. A glob that does not compile falls back to its literal text.
- **Does the forge refuse the admin account's push to a branch such a rule covers?** From the source: yes, when the rule refuses pushes. `VerifyBranchProtection` → `CanUserPush` returns false on `!CanPush`, with no exception for an administrator. When a rule allows pushes, a writer may push, and only this tool's own refusal keeps the commit off that branch. **Not tested live:** a test needs a `[..]` rule on some repository, no tool removes a protection rule (they only strengthen), and the only rule today is mesh-catalog's `main`. Testing the case-insensitive match on `Main` would leave a branch the forge then refuses to delete. I left the forge untouched.
## Changes (modules/gitea)
1. **Parent (items 1, 2).** On an existing branch, the blobs are read at the commit read first (`existing.Commit.ID`), not at the branch name, so a file changed meanwhile is refused by the forge (sha mismatch). The answer's `parent` is the parent the forge says it made the commit on: `commit.parents` from its answer, or `GET git/commits/{sha}` when the answer has none. If that cannot be read, the call fails loudly and names the commit made. When the branch or base moved between the read and the commit, `said` names both commits and points to `gitea_compare`.
2. **Protection matching (item 3).** `cmd/forge/rules.go` ports Gitea's compiler line for line. `guard.ts` `ruleCovers` gets the same rule, which also fixes `gitea_api` file writes and the covering globs of `gitea_branch_protection_set`. Both now also match a plain name in any case (`MAIN` is covered by `main`), as the forge does.
3. **Search deadline (item 4).** `searchArchive` takes the call's context. Decompression goes through a reader that stops when the context ends. A search that reaches the deadline answers what it found, with `stopped_at_deadline: true` and a line in `said`.
4. **Size limits (item 5).** A commit carries at most 4 MiB per file (`content_base64` decoded), 16 MiB of files together, or a 4 MiB patch. Anything larger is refused before anything is sent. The tool description and the README state the limits.
5. **One HTTP client (item 6).** `internal/forgehttp` (`Client.Do`/`GetJSON`/`SendJSON`, `ErrNotFound`, `StatusError`, `FromEnv`) replaces the two copies in `cmd/forge` and `cmd/npm-registry`. Each bundle embeds it, and the timeouts (50 s and 20 s) are unchanged.
## Tests
- New Go tests in `cmd/forge/forge_test.go`: a branch moved under the commit (said, with the right parent); a file changed under the commit (refused, nothing overwritten); a patch on a base that moved; a parent missing from the answer (read from the commit, and a failure when unreadable); each size limit, plus one at the limit; search stopped at its deadline; 19 more cases in `TestRuleCoversIsTheGuardsRule`.
- Mutations, each failing its test: blobs read at the branch name; parent as read; size limits off; the old matcher (8 cases fail); the deadline check off.
- TypeScript: a new test in `test/guard.test.ts` covers the same cases, plus `gitea_api` refusing writes to `release-a` (rule `release-[ab]`), `lts/2` (rule `{stable,lts}/*`) and `MAIN` (rule `main`). With main's `guard.ts` it fails, and with this branch 65 of 65 pass. Run through `merge-check-typescript.sh` with a toolchain assembled locally (typescript, @types/node, mesh-sdk 0.1.13).
- `go vet` and `go test -race` pass for the module.
- `MESH_GATE=<controller built from mesh-controller main d881f47> MESH_CHECK_MODULES=gitea sh merge-check.sh` passes: words, agent-home, paths, manifests (69, as kept), and the module's tests.
- `git merge-tree` with #234 (issue 456, also in modules/gitea) shows no conflict.
## Design limits I chose
- 4 MiB per file or patch and 16 MiB per commit. The bus's message size bounds a call anyway; larger work is several commits.
- A branch that moved under the commit is reported, not refused: the forge has already made the commit, and a file it changes cannot have moved (blob check) or the patch would not apply.
- `guard.ts` treats a `\x` escape as the literal `x`. Gitea passes it to its regexp as is (so `\a` would be a bell character). The Go port follows Gitea exactly.
## Reviewers' checklist
- [ ] The tests fail without the fix (mutations above). The checks are green.
- [ ] No manifest change: the new package sits inside the module, both bundles build `from` their own `cmd/` as before.
- [ ] The rule matchers in `rules.go` and `guard.ts` agree with each other and with Gitea 1.27's `modules/glob`.
- [ ] Nothing is written live. Only the parent is read, after the forge has made the commit.
The bundle still writes as the forge's admin account. That is issue 469.
Deliverynovox/mesh-catalog@ac90b35b499b — delivered since 2026-10-12T11:08:07Z
Delivery plan — builds gitea → novox; no bus step
tier 0: gitea
novox: receives gitea
gitea provides npm-package-registry, git: its consumers are sent again after it
gitea keeps data (ADR 0233): what it holds is backed up before it moves
Machines
build-agent on ace: passed — carried by plan-1791802406910383027
gitea on novox: passed — healthy 1 times over 22s
gitea on the rest running it: sent
Transitions
2026-10-12 10:51 (new) → proposed (announced): novox/mesh-catalog#236's head announced
2026-10-12 10:55 proposed → checked (checked): the verdict names this commit
2026-10-12 10:55 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
2026-10-12 11:05 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
2026-10-12 11:05 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit
2026-10-12 11:08 delivering → delivered (done): its walk is done, carrying its own commit: every machine of its deploy plan passed, or was left as its policy says
The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.
<!-- mesh-delivery:view -->
**Delivery** `novox/mesh-catalog@ac90b35b499b` — **delivered** since 2026-10-12T11:08:07Z
**Delivery plan** — builds gitea → novox; no bus step
- tier 0: gitea
- novox: receives gitea
- gitea provides npm-package-registry, git: its consumers are sent again after it
- gitea keeps data (ADR 0233): what it holds is backed up before it moves
**Machines**
- build-agent on ace: passed — carried by plan-1791802406910383027
- gitea on novox: passed — healthy 1 times over 22s
- gitea on the rest running it: sent
**Transitions**
- 2026-10-12 10:51 (new) → proposed (announced): novox/mesh-catalog#236's head announced
- 2026-10-12 10:55 proposed → checked (checked): the verdict names this commit
- 2026-10-12 10:55 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
- 2026-10-12 11:05 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
- 2026-10-12 11:05 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit
- 2026-10-12 11:08 delivering → delivered (done): its walk is done, carrying its own commit: every machine of its deploy plan passed, or was left as its policy says
The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: gitea)
mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
Delivery plan — builds gitea → novox; no bus step
tier 0: gitea
novox: receives gitea
gitea provides npm-package-registry, git: its consumers are sent again after it
gitea keeps data (ADR 0233): what it holds is backed up before it moves
Run by the build seat on novox as build-1791801551808342545 (builds --log build-1791801551808342545).
--- the gate: gitea
gitea: ok, keeps data (valuable); WARNING: server stay(s) up and say(s) not how it is ready — judged by liveness alone, refused from 2026-11-18 (ADR 0240 rule 8)
long-running resources without health: 1
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T10:31:44Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T10:31:44Z
modules the change moves:
- gitea (changed)
machines:
- a machine (f35): composes
- holds mesh-dns-resolver (idt): composes
- holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
- a machine (yvbpsm): composes
a merge would rebuild 1 module(s) in 1 tier(s): gitea
--- its merge-check.sh (go toolchain)
ok git.novox.be/novox/mesh-catalog/checks/words 0.011s
words: 12 retired words and 70 daemons' lines, none in the 42894 strings of 689 files
ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.014s
agent-home: no archive and no file written into under the agent's home
ok git.novox.be/novox/mesh-catalog/checks/paths 0.007s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
testing modules/gitea
ok gitea/cmd/forge 1.559s
ok gitea/cmd/npm-registry 1.882s
? gitea/internal/forgehttp [no test files]
--- its merge-check-typescript.sh (typescript toolchain)
type-checking modules/gitea (TypeScript)
testing modules/gitea (TypeScript)
✔ a pull request opened after the margin is looked at, by its own update time (11.957439ms)
✔ every open pull request is read with what its base requires and what its head has (gitea_open_pulls) (62.47369ms)
✔ a pull request or issue number that is not one is refused before the forge is asked (1.448522ms)
✔ the newest status of each context is kept, with what it said, when and by whom (14.315353ms)
✔ a commit merges only when every required status is a success; a warning blocks (0.455081ms)
✔ no rule requires nothing; a rule that cannot be read says nothing, never yes (0.209031ms)
✔ a commit is contained in another when the compare finds nothing on it the other lacks (0.688001ms)
✔ a note line is appended once, as the forge's user, in its own repository (9.449115ms)
✔ a note that cannot be written is said, never read as written (0.518881ms)
✔ one view per pull request, found by its marker; only the mesh's statuses (0.692991ms)
✔ a build machine taking the check is said on the head: building on which machine, since the local time (19.959343ms)
✔ the verdict heard while a 'building' write is in flight lands last and stays (5.457669ms)
✔ the verdict written while a start's read of the forge is in flight stays the newest status (1.086752ms)
✔ the verdict heard while a 'building' write still waits its turn: the 'building' is never written (0.596021ms)
✔ a start heard after the verdict writes nothing (0.439251ms)
✔ a start from before the check now pending (a run before a recheck, the stream's history) writes nothing (0.578791ms)
✔ a head this process did not announce (it restarted) is said only while the forge holds its gate pending (0.38511ms)
✔ a repository as the mesh clones it is told from another (1.145972ms)
✔ gitea_api refuses the forge's administration, a branch's protection and the merge check's status, and sends nothing (6.21752ms)
✔ gitea_api refuses a file written to the default branch or one a rule guards, and writes one on a branch of its own (58.045713ms)
✔ a protection rule covers a branch as the forge decides it: classes, alternatives, a plain name in any case (issue 539) (15.436965ms)
✔ gitea_api still writes what an author writes (9.158145ms)
✔ gitea_branch_protection_set only strengthens (18.437789ms)
✔ gitea_merge_pull_request merges only a head whose required statuses all succeeded, and only that head (31.02074ms)
✔ gitea_merge_pull_request merges only the head it is named, and refuses one that is not the head (14.963694ms)
✔ gitea_merge_pull_request is loud when the forge merged a head other than the one it was handed (10.165656ms)
✔ gitea_merge_pull_request says the merge happened when reading back what landed fails (21.795005ms)
✔ gitea_merge_pull_request reads back a fast-forward, and says it cannot read back a squash or a rebase (45.596783ms)
✔ gitea_delete_repo deletes only the tools' own user's repository, unguarded, untouched for 30 days, named in full (20.527754ms)
✔ gitea_api sends the path it judged, and refuses moving a pull request's base (3.950826ms)
✔ gitea_merge_pull_request merges only into a branch whose protection requires the checks (6.742521ms)
✔ a rule named for a branch is not made weaker than the glob rule that guards it now (12.77687ms)
✔ a repository owner or name is never another path (0.349621ms)
✔ the judges, without a forge (0.353061ms)
✔ gitea_api never acts as another user: sudo, in any case, and any query key it does not send are refused (2.713554ms)
✔ gitea_api never approves a pull request nor requests changes: those are the operator's (2.345384ms)
✔ no tool's caller text becomes another path or another user: `..` and `?sudo=` are refused before the forge (4.785457ms)
✔ every page of a pull request's files is read, though the forge caps a page at fifty (32.744833ms)
✔ a pass asks only the repositories that moved since the last look, every one before the first (0.668391ms)
✔ the directories above a merge's files that hold a module at the commit are said, the root never (13.517862ms)
✔ a lookup the forge refuses is thrown, not read as no module (4.283027ms)
✔ a renamed file is said under its old name too, as gone (novox/hq ADR 0267) (6.040979ms)
✔ the statuses asked for replace the rule's, and an empty list requires none (7.225162ms)
✔ a new rule refuses direct pushes unless asked; an administrator's override only when said (0.341551ms)
✔ each open pull request's new head is announced once, and nothing closed or merged (15.007574ms)
✔ a verdict is the head commit's status; an error is the forge's error, never a success (0.891041ms)
✔ each layer is its own status: the gate with the modules it judged, the repository's own check beside it (0.701761ms)
✔ no verdict sets warning on a required check; only a person's decision fails (1.275392ms)
✔ a commit status is set on the commit, under the merge check's context (39.431674ms)
✔ a change plan is the gate's result: said on the status and, when it builds something, as a comment (0.437791ms)
✔ a head announced is pending in the build queue, since the local time it was announced (0.21386ms)
✔ first start: mints with the admin account, keeps the token at 0600, asks for the tools' scopes only (39.306264ms)
✔ second start: reuses the kept token, mints nothing (17.227658ms)
✔ the forge rejects the kept token (its data was restored): minted afresh, once, and the call goes through (21.995175ms)
✔ a token kept with write:admin by an earlier build is minted again without it at the next start, and the forge drops the old one (91.954088ms)
✔ a kept token lacking a scope the tools need: the forge refuses the call for the scope, the token is re-minted with the whole list, and the call goes through (21.249684ms)
✔ the kept file is gone but the forge still holds a token by that name: replaced, not refused (68.05804ms)
✔ concurrent first calls share one mint (11.139978ms)
✔ the admin account is refused: said plainly, nothing kept, and the next call fails the same way rather than crashing (14.382033ms)
✔ one process shares one source per kept file — the watcher and the tools never renew against each other (1.197292ms)
✔ a second process finds the token the first renewed, and reuses it instead of minting over it (18.78692ms)
✔ a configured token wins, and is reported rather than minted over when the forge rejects it (2.599244ms)
✔ nothing to mint with and no token: the client says what is missing (0.205241ms)
[gitea] no tools — no Gitea token, and nothing to mint one with — set MESH_GITEA_TOKEN, or MESH_GITEA_ADMIN_USER, MESH_GITEA_ADMIN_PASSWORD_FILE, MESH_GITEA_STATE_DIR
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-XgxN62/state/token
✔ the tools register once there is a way to a token, and the first call mints it (9.008714ms)
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-8gnXtU/state/token
✔ a pull request can be closed, read and cleaned up through the tools (20.848944ms)
ℹ tests 65
ℹ suites 0
ℹ pass 65
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 536.960201
**Merge check** at `bd7ca80e`
- `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: gitea)
- `mesh/repo-check`: **PASS** — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
**Delivery plan** — builds gitea → novox; no bus step
- tier 0: gitea
- novox: receives gitea
- gitea provides npm-package-registry, git: its consumers are sent again after it
- gitea keeps data (ADR 0233): what it holds is backed up before it moves
Run by the build seat on novox as `build-1791801551808342545` (`builds --log build-1791801551808342545`).
```
--- the gate: gitea
gitea: ok, keeps data (valuable); WARNING: server stay(s) up and say(s) not how it is ready — judged by liveness alone, refused from 2026-11-18 (ADR 0240 rule 8)
long-running resources without health: 1
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T10:31:44Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T10:31:44Z
modules the change moves:
- gitea (changed)
machines:
- a machine (f35): composes
- holds mesh-dns-resolver (idt): composes
- holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
- a machine (yvbpsm): composes
a merge would rebuild 1 module(s) in 1 tier(s): gitea
--- its merge-check.sh (go toolchain)
ok git.novox.be/novox/mesh-catalog/checks/words 0.011s
words: 12 retired words and 70 daemons' lines, none in the 42894 strings of 689 files
ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.014s
agent-home: no archive and no file written into under the agent's home
ok git.novox.be/novox/mesh-catalog/checks/paths 0.007s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
testing modules/gitea
ok gitea/cmd/forge 1.559s
ok gitea/cmd/npm-registry 1.882s
? gitea/internal/forgehttp [no test files]
--- its merge-check-typescript.sh (typescript toolchain)
type-checking modules/gitea (TypeScript)
testing modules/gitea (TypeScript)
✔ a pull request opened after the margin is looked at, by its own update time (11.957439ms)
✔ every open pull request is read with what its base requires and what its head has (gitea_open_pulls) (62.47369ms)
✔ a pull request or issue number that is not one is refused before the forge is asked (1.448522ms)
✔ the newest status of each context is kept, with what it said, when and by whom (14.315353ms)
✔ a commit merges only when every required status is a success; a warning blocks (0.455081ms)
✔ no rule requires nothing; a rule that cannot be read says nothing, never yes (0.209031ms)
✔ a commit is contained in another when the compare finds nothing on it the other lacks (0.688001ms)
✔ a note line is appended once, as the forge's user, in its own repository (9.449115ms)
✔ a note that cannot be written is said, never read as written (0.518881ms)
✔ one view per pull request, found by its marker; only the mesh's statuses (0.692991ms)
✔ a build machine taking the check is said on the head: building on which machine, since the local time (19.959343ms)
✔ the verdict heard while a 'building' write is in flight lands last and stays (5.457669ms)
✔ the verdict written while a start's read of the forge is in flight stays the newest status (1.086752ms)
✔ the verdict heard while a 'building' write still waits its turn: the 'building' is never written (0.596021ms)
✔ a start heard after the verdict writes nothing (0.439251ms)
✔ a start from before the check now pending (a run before a recheck, the stream's history) writes nothing (0.578791ms)
✔ a head this process did not announce (it restarted) is said only while the forge holds its gate pending (0.38511ms)
✔ a repository as the mesh clones it is told from another (1.145972ms)
✔ gitea_api refuses the forge's administration, a branch's protection and the merge check's status, and sends nothing (6.21752ms)
✔ gitea_api refuses a file written to the default branch or one a rule guards, and writes one on a branch of its own (58.045713ms)
✔ a protection rule covers a branch as the forge decides it: classes, alternatives, a plain name in any case (issue 539) (15.436965ms)
✔ gitea_api still writes what an author writes (9.158145ms)
✔ gitea_branch_protection_set only strengthens (18.437789ms)
✔ gitea_merge_pull_request merges only a head whose required statuses all succeeded, and only that head (31.02074ms)
✔ gitea_merge_pull_request merges only the head it is named, and refuses one that is not the head (14.963694ms)
✔ gitea_merge_pull_request is loud when the forge merged a head other than the one it was handed (10.165656ms)
✔ gitea_merge_pull_request says the merge happened when reading back what landed fails (21.795005ms)
✔ gitea_merge_pull_request reads back a fast-forward, and says it cannot read back a squash or a rebase (45.596783ms)
✔ gitea_delete_repo deletes only the tools' own user's repository, unguarded, untouched for 30 days, named in full (20.527754ms)
✔ gitea_api sends the path it judged, and refuses moving a pull request's base (3.950826ms)
✔ gitea_merge_pull_request merges only into a branch whose protection requires the checks (6.742521ms)
✔ a rule named for a branch is not made weaker than the glob rule that guards it now (12.77687ms)
✔ a repository owner or name is never another path (0.349621ms)
✔ the judges, without a forge (0.353061ms)
✔ gitea_api never acts as another user: sudo, in any case, and any query key it does not send are refused (2.713554ms)
✔ gitea_api never approves a pull request nor requests changes: those are the operator's (2.345384ms)
✔ no tool's caller text becomes another path or another user: `..` and `?sudo=` are refused before the forge (4.785457ms)
✔ every page of a pull request's files is read, though the forge caps a page at fifty (32.744833ms)
✔ a pass asks only the repositories that moved since the last look, every one before the first (0.668391ms)
✔ the directories above a merge's files that hold a module at the commit are said, the root never (13.517862ms)
✔ a lookup the forge refuses is thrown, not read as no module (4.283027ms)
✔ a renamed file is said under its old name too, as gone (novox/hq ADR 0267) (6.040979ms)
✔ the statuses asked for replace the rule's, and an empty list requires none (7.225162ms)
✔ a new rule refuses direct pushes unless asked; an administrator's override only when said (0.341551ms)
✔ each open pull request's new head is announced once, and nothing closed or merged (15.007574ms)
✔ a verdict is the head commit's status; an error is the forge's error, never a success (0.891041ms)
✔ each layer is its own status: the gate with the modules it judged, the repository's own check beside it (0.701761ms)
✔ no verdict sets warning on a required check; only a person's decision fails (1.275392ms)
✔ a commit status is set on the commit, under the merge check's context (39.431674ms)
✔ a change plan is the gate's result: said on the status and, when it builds something, as a comment (0.437791ms)
✔ a head announced is pending in the build queue, since the local time it was announced (0.21386ms)
✔ first start: mints with the admin account, keeps the token at 0600, asks for the tools' scopes only (39.306264ms)
✔ second start: reuses the kept token, mints nothing (17.227658ms)
✔ the forge rejects the kept token (its data was restored): minted afresh, once, and the call goes through (21.995175ms)
✔ a token kept with write:admin by an earlier build is minted again without it at the next start, and the forge drops the old one (91.954088ms)
✔ a kept token lacking a scope the tools need: the forge refuses the call for the scope, the token is re-minted with the whole list, and the call goes through (21.249684ms)
✔ the kept file is gone but the forge still holds a token by that name: replaced, not refused (68.05804ms)
✔ concurrent first calls share one mint (11.139978ms)
✔ the admin account is refused: said plainly, nothing kept, and the next call fails the same way rather than crashing (14.382033ms)
✔ one process shares one source per kept file — the watcher and the tools never renew against each other (1.197292ms)
✔ a second process finds the token the first renewed, and reuses it instead of minting over it (18.78692ms)
✔ a configured token wins, and is reported rather than minted over when the forge rejects it (2.599244ms)
✔ nothing to mint with and no token: the client says what is missing (0.205241ms)
[gitea] no tools — no Gitea token, and nothing to mint one with — set MESH_GITEA_TOKEN, or MESH_GITEA_ADMIN_USER, MESH_GITEA_ADMIN_PASSWORD_FILE, MESH_GITEA_STATE_DIR
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-XgxN62/state/token
✔ the tools register once there is a way to a token, and the first call mints it (9.008714ms)
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-8gnXtU/state/token
✔ a pull request can be closed, read and cleaned up through the tools (20.848944ms)
ℹ tests 65
ℹ suites 0
ℹ pass 65
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 536.960201
```
One blocking finding: guard.ts does not match protection rules the way the forge does, for several rule shapes. The Go port does. The PR says both are "the same rule", and the mismatch goes in the unsafe direction: the guard misses a branch the forge protects.
How I checked
I compared both ports with Gitea v1.27.3 itself. I copied modules/glob/glob.go and the Match/loadGlob logic from models/git/protected_branch.go into a test harness, with the plain-name EqualFold path and the QuoteMeta literal fallback. I ran 400,000 random rules and branches over the alphabet ab/*?[]!{},\-.+Ad^$()|:x1wé.
cmd/forge/rules.go: 0 mismatches. It is a faithful copy of the forge's compiler (rules.go:28-116 against glob.go:39-150), including the literal fallback through regexp.Compile errors (rules.go:19-22).
guard.ts: 1,044 mismatches in 175,538 sampled cases. In 1,037 of them the forge covers the branch and the guard does not.
The blocking finding (guard.ts)
The forge writes \ plus the next character, and [...] contents, straight into a Go RE2 regexp. guard.ts re-escapes or reinterprets them as JavaScript, and RE2 and JavaScript read these differently:
An escape outside a class (guard.ts:235, out += lit(g[pos++])). In the forge, \d, \w, \s, \b, \A and \pL are regexp classes or assertions. In the guard they are the literal letter. Examples:
release-\d covers release-1 in the forge, but not in the guard.
v\w* covers v2 in the forge, but not in the guard.
\w covers a, x and 1 in the forge, but not in the guard.
A ] first in a class (guard.ts:195, chars(): the first ] closes the class). RE2 reads []a] as a class holding ] and a. JavaScript reads [] as the empty class. So []a] covers a in the forge, but not in the guard.
A POSIX class or \p inside a class.[[:alpha:]] and rel-[[:digit:]] are valid in RE2. The guard escapes the inner [, so rel-[[:digit:]] does not cover rel-1 in the guard. v[\pL] makes the RegExp at guard.ts:246 throw a SyntaxError (null), which turns it into a literal, so it does not cover va.
Where this matters:
In gitea_api's file writes, judged at guard.ts:258, a PUT/POST/DELETE to such a branch passes the guard.
In gitea_branch_protection_set (tools/index.ts:535), the covering rule is not found. A new plain rule for release-1 under an existing release-\d is then not judged against the stronger covering rule.
The forge's own push check still applies. But the guard exists because these tools write as the admin account (ADR 0266), so it should not be looser than the forge.
No current rule uses these shapes, as far as I know. The PR's claim of equality is still not true.
Suggested fix. Translate faithfully where JavaScript can, and fail closed where it cannot. When a rule has a backslash before an ASCII letter or digit outside a class, a ] first in a class, [: inside a class, or \p/\P anywhere, either map it to the RE2 meaning (\d → [0-9], \w → [0-9A-Za-z_], \s → [\t\n\f\r ], ...) or treat the rule as covering the branch (refuse). Then put the cases above into a shared table that both test/guard.test.ts and forge_test.go run. That keeps the two ports from drifting again.
Everything else checks out (file:line at bd7ca80)
commit.go: the stale parent.
An existing branch's files are now read at the commit just read, not at the branch name (commit.go:231).
The parent comes from the forge's answer, commit.parents, or else from reading the commit (parentOf, commit.go:357).
A branch that moved is reported (commit.go:308-326).
Gitea 1.27's FileResponse and FilesResponse carry commit.parents, so this works.
Size limits (commit.go:58-63, 119-170). These are checked before anything is sent. The base64 pre-check through DecodedLen with a +3 margin is correct.
Search deadline (search.go:120, ctxReader at search.go:201). ctxReader ends the decompression at the call's 50 s deadline. Partial results are kept and stopped_at_deadline is set.
internal/forgehttp/forgehttp.go. It is the same as both old copies. The forge bundle keeps a 50 s timeout (forge.go:28) and npm-registry keeps 20 s.
Each fix has a test that fails without it. I reverted each fix in turn:
old ruleCovers → TestRuleCoversIsTheGuardsRule fails;
each of the three size checks removed → TestACommitLargerThanItsLimitsIsRefusedBeforeAnythingIsSent fails;
ctx ignored in search → TestCodeSearchStopsAtItsDeadlineAndSaysSo fails;
the old guard.ts fails 8 of the 26 new TS cases. The new guard.ts passes all 26.
go vet and go test -race pass for ./... in modules/gitea, at the head and on a trial merge.
#234 (also modules/gitea) is already merged. It is main at 9d6bd2d, which this branch does not contain. A trial merge with main is clean (test/guard.test.ts auto-merges), and the Go tests pass on it. I could not run the full TS suite locally, because the SDK and tsc toolchain are missing here. Rebasing will make mesh/repo-check run it on the merged tree.
Checks on bd7ca80. mesh/merge-gate passes ("builds gitea → novox ... 4 of 4 compose"). mesh/repo-check passes (go + typescript).
Verdict: request changes at bd7ca80
One blocking finding: guard.ts does not match protection rules the way the forge does, for several rule shapes. The Go port does. The PR says both are "the same rule", and the mismatch goes in the unsafe direction: the guard misses a branch the forge protects.
## How I checked
- I compared both ports with Gitea v1.27.3 itself. I copied modules/glob/glob.go and the Match/loadGlob logic from models/git/protected_branch.go into a test harness, with the plain-name EqualFold path and the QuoteMeta literal fallback. I ran 400,000 random rules and branches over the alphabet `ab/*?[]!{},\-.+Ad^$()|:x1wé`.
- **cmd/forge/rules.go: 0 mismatches.** It is a faithful copy of the forge's compiler (rules.go:28-116 against glob.go:39-150), including the literal fallback through regexp.Compile errors (rules.go:19-22).
- **guard.ts: 1,044 mismatches in 175,538 sampled cases.** In 1,037 of them the forge covers the branch and the guard does not.
## The blocking finding (guard.ts)
The forge writes `\` plus the next character, and `[`...`]` contents, straight into a Go RE2 regexp. guard.ts re-escapes or reinterprets them as JavaScript, and RE2 and JavaScript read these differently:
1. **An escape outside a class** (guard.ts:235, `out += lit(g[pos++])`). In the forge, `\d`, `\w`, `\s`, `\b`, `\A` and `\pL` are regexp classes or assertions. In the guard they are the literal letter. Examples:
- `release-\d` covers `release-1` in the forge, but not in the guard.
- `v\w*` covers `v2` in the forge, but not in the guard.
- `\w` covers `a`, `x` and `1` in the forge, but not in the guard.
2. **A `]` first in a class** (guard.ts:195, chars(): the first `]` closes the class). RE2 reads `[]a]` as a class holding `]` and `a`. JavaScript reads `[]` as the empty class. So `[]a]` covers `a` in the forge, but not in the guard.
3. **A POSIX class or `\p` inside a class.** `[[:alpha:]]` and `rel-[[:digit:]]` are valid in RE2. The guard escapes the inner `[`, so `rel-[[:digit:]]` does not cover `rel-1` in the guard. `v[\pL]` makes the RegExp at guard.ts:246 throw a SyntaxError (null), which turns it into a literal, so it does not cover `va`.
Where this matters:
- In gitea_api's file writes, judged at guard.ts:258, a PUT/POST/DELETE to such a branch passes the guard.
- In gitea_branch_protection_set (tools/index.ts:535), the covering rule is not found. A new plain rule for `release-1` under an existing `release-\d` is then not judged against the stronger covering rule.
- The forge's own push check still applies. But the guard exists because these tools write as the admin account (ADR 0266), so it should not be looser than the forge.
- No current rule uses these shapes, as far as I know. The PR's claim of equality is still not true.
**Suggested fix.** Translate faithfully where JavaScript can, and fail closed where it cannot. When a rule has a backslash before an ASCII letter or digit outside a class, a `]` first in a class, `[:` inside a class, or `\p`/`\P` anywhere, either map it to the RE2 meaning (`\d` → `[0-9]`, `\w` → `[0-9A-Za-z_]`, `\s` → `[\t\n\f\r ]`, ...) or treat the rule as covering the branch (refuse). Then put the cases above into a shared table that both test/guard.test.ts and forge_test.go run. That keeps the two ports from drifting again.
## Everything else checks out (file:line at bd7ca80)
- **commit.go: the stale parent.**
- An existing branch's files are now read at the commit just read, not at the branch name (commit.go:231).
- The parent comes from the forge's answer, `commit.parents`, or else from reading the commit (parentOf, commit.go:357).
- A branch that moved is reported (commit.go:308-326).
- Gitea 1.27's FileResponse and FilesResponse carry `commit.parents`, so this works.
- **Size limits** (commit.go:58-63, 119-170). These are checked before anything is sent. The base64 pre-check through DecodedLen with a +3 margin is correct.
- **Search deadline** (search.go:120, ctxReader at search.go:201). ctxReader ends the decompression at the call's 50 s deadline. Partial results are kept and `stopped_at_deadline` is set.
- **internal/forgehttp/forgehttp.go.** It is the same as both old copies. The forge bundle keeps a 50 s timeout (forge.go:28) and npm-registry keeps 20 s.
**Each fix has a test that fails without it.** I reverted each fix in turn:
- old ruleCovers → TestRuleCoversIsTheGuardsRule fails;
- ref = a.Branch → TestAnExistingBranchsFilesAreJudgedAtTheCommitReadNotAtWhereTheBranchMovedTo fails;
- parent assumed → the three parent tests fail;
- each of the three size checks removed → TestACommitLargerThanItsLimitsIsRefusedBeforeAnythingIsSent fails;
- ctx ignored in search → TestCodeSearchStopsAtItsDeadlineAndSaysSo fails;
- the old guard.ts fails 8 of the 26 new TS cases. The new guard.ts passes all 26.
**go vet and go test -race** pass for ./... in modules/gitea, at the head and on a trial merge.
**#234 (also modules/gitea)** is already merged. It is main at 9d6bd2d, which this branch does not contain. A trial merge with main is clean (test/guard.test.ts auto-merges), and the Go tests pass on it. I could not run the full TS suite locally, because the SDK and tsc toolchain are missing here. Rebasing will make mesh/repo-check run it on the merged tree.
**Checks on bd7ca80.** mesh/merge-gate passes ("builds gitea → novox ... 4 of 4 compose"). mesh/repo-check passes (go + typescript).
The forge's contents and diffpatch endpoints take a branch, never a commit to
build on, so the parent is read from the commit the forge made, and a branch
that moved under the commit is said. Blobs are read at the commit read first,
not at the branch name. Protection rules match as Gitea 1.27 matches them
([...], {a,b}, escapes, a plain name in any case), in the Go bundle and in
guard.ts alike. One commit carries at most 4 MiB per file or patch and 16 MiB
together; code search stops at its deadline and says so. The HTTP client the
two Go bundles copied is one package, internal/forgehttp.
Review 30 found guard.ts missing branches the forge protects: Go reads \d, \w,
\pL, a class opening with ] or ^, and [[:digit:]] otherwise than JavaScript.
A rule using any of them now covers every branch, so the guard refuses more
than the forge, never less. test/rule-cases.json holds the forge's answers,
read by the Go and TypeScript tests alike.
guard.ts fails closed. Go's regexp reads some rules otherwise than JavaScript's: a backslash before a letter or digit (\d, \w, \pL, \b, \A), a class that opens with ] or ^ ([]a], [^+], a negation in Go), and a POSIX class ([[:digit:]]). A rule using any of these now covers every branch, and a comment says why. Escapes are also limited to what the u flag accepts (\- only inside a class), so a valid glob no longer falls back to its literal text by mistake.
The review's harness, over this guard.ts: 0 cases where the guard misses a branch the forge protects, in the 175,538-case corpus (seed 539) and in a second corpus (seed 7, wider alphabet with p L s S 0 _ and space). The other direction remains, about 3,000 cases where the guard covers what the forge does not. All of them are rules with the constructs above.
One table of answers:modules/gitea/test/rule-cases.json has 283 rows: 43 hand cases with a why, plus 240 sampled from the corpus. The forge's answers were computed with Gitea 1.27.3's own modules/glob. TestRuleCoversAnswersAsTheForgeDoes (Go) holds rules.go to forge. guard.test.ts holds guard.ts to guard ?? forge, and checks that guard only ever covers more than the forge. With the bd7ca80 guard.ts the TypeScript test fails.
Checks run locally on the rebased tree:go vet and go test -race for modules/gitea, merge-check-typescript.sh (73 of 73 pass), and MESH_GATE=<controller main d881f47> MESH_CHECK_MODULES=gitea sh merge-check.sh (exit 0).
Review 30 is addressed at ac90b35, rebased onto main c5abdf3, which holds #234 (9d6bd2d) and #231.
- **guard.ts fails closed.** Go's regexp reads some rules otherwise than JavaScript's: a backslash before a letter or digit (`\d`, `\w`, `\pL`, `\b`, `\A`), a class that opens with `]` or `^` (`[]a]`, `[^+]`, a negation in Go), and a POSIX class (`[[:digit:]]`). A rule using any of these now covers every branch, and a comment says why. Escapes are also limited to what the `u` flag accepts (`\-` only inside a class), so a valid glob no longer falls back to its literal text by mistake.
- **The review's harness, over this guard.ts:** 0 cases where the guard misses a branch the forge protects, in the 175,538-case corpus (seed 539) and in a second corpus (seed 7, wider alphabet with `p L s S 0 _` and space). The other direction remains, about 3,000 cases where the guard covers what the forge does not. All of them are rules with the constructs above.
- **One table of answers:** `modules/gitea/test/rule-cases.json` has 283 rows: 43 hand cases with a `why`, plus 240 sampled from the corpus. The forge's answers were computed with Gitea 1.27.3's own `modules/glob`. `TestRuleCoversAnswersAsTheForgeDoes` (Go) holds `rules.go` to `forge`. guard.test.ts holds `guard.ts` to `guard ?? forge`, and checks that `guard` only ever covers more than the forge. With the bd7ca80 guard.ts the TypeScript test fails.
- **Checks run locally on the rebased tree:** `go vet` and `go test -race` for modules/gitea, `merge-check-typescript.sh` (73 of 73 pass), and `MESH_GATE=<controller main d881f47> MESH_CHECK_MODULES=gitea sh merge-check.sh` (exit 0).
mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: gitea)
mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
Delivery plan — builds gitea → novox; no bus step
tier 0: gitea
novox: receives gitea
gitea provides npm-package-registry, git: its consumers are sent again after it
gitea keeps data (ADR 0233): what it holds is backed up before it moves
Run by the build seat on novox as build-1791802315943253552 (builds --log build-1791802315943253552).
--- the gate: gitea
gitea: ok, keeps data (valuable); WARNING: server stay(s) up and say(s) not how it is ready — judged by liveness alone, refused from 2026-11-18 (ADR 0240 rule 8)
long-running resources without health: 1
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T10:50:44Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T10:50:44Z
modules the change moves:
- gitea (changed)
machines:
- a machine (f35): composes
- holds mesh-dns-resolver (idt): composes
- holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
- a machine (yvbpsm): composes
a merge would rebuild 1 module(s) in 1 tier(s): gitea
--- its merge-check.sh (go toolchain)
ok git.novox.be/novox/mesh-catalog/checks/words 0.003s
words: 12 retired words and 70 daemons' lines, none in the 42919 strings of 689 files
ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.013s
agent-home: no archive and no file written into under the agent's home
ok git.novox.be/novox/mesh-catalog/checks/paths 0.006s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
ok git.novox.be/novox/mesh-catalog/checks/deps 0.300s
testing modules/gitea
ok gitea/cmd/forge 1.518s
ok gitea/cmd/npm-registry 1.894s
? gitea/internal/forgehttp [no test files]
--- its merge-check-typescript.sh (typescript toolchain)
Unable to find image 'novox.internal:5100/mesh-tools/build@sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5' locally
novox.internal:5100/mesh-tools/build@sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5: Pulling from mesh-tools/build
501c3e032d32: Already exists
d456d1aa143e: Already exists
60f37e2c93ec: Already exists
e53f92c42dd6: Already exists
b571db164614: Already exists
c97f29541340: Already exists
177d10251d51: Pulling fs layer
9959e49dce84: Pulling fs layer
71d3214eca9e: Pulling fs layer
3b9efb7e21bc: Pulling fs layer
99baede48b7f: Pulling fs layer
b39b9c5e1d8c: Pulling fs layer
762a70081f46: Pulling fs layer
e3a36fed88f4: Pulling fs layer
b39b9c5e1d8c: Waiting
762a70081f46: Waiting
99baede48b7f: Waiting
e3a36fed88f4: Waiting
3b9efb7e21bc: Waiting
71d3214eca9e: Verifying Checksum
71d3214eca9e: Download complete
177d10251d51: Download complete
3b9efb7e21bc: Download complete
99baede48b7f: Download complete
b39b9c5e1d8c: Download complete
762a70081f46: Verifying Checksum
762a70081f46: Download complete
9959e49dce84: Verifying Checksum
9959e49dce84: Download complete
e3a36fed88f4: Verifying Checksum
e3a36fed88f4: Download complete
177d10251d51: Pull complete
9959e49dce84: Pull complete
71d3214eca9e: Pull complete
3b9efb7e21bc: Pull complete
99baede48b7f: Pull complete
b39b9c5e1d8c: Pull complete
762a70081f46: Pull complete
e3a36fed88f4: Pull complete
Digest: sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5
Status: Downloaded newer image for novox.internal:5100/mesh-tools/build@sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5
type-checking modules/gitea (TypeScript)
testing modules/gitea (TypeScript)
✔ a pull request opened after the margin is looked at, by its own update time (13.553851ms)
✔ every open pull request is read with what its base requires and what its head has (gitea_open_pulls) (96.184391ms)
✔ a pull request or issue number that is not one is refused before the forge is asked (1.807603ms)
✔ the newest status of each context is kept, with what it said, when and by whom (39.567653ms)
✔ a commit merges only when every required status is a success; a warning blocks (0.608981ms)
✔ no rule requires nothing; a rule that cannot be read says nothing, never yes (0.262861ms)
✔ a commit is contained in another when the compare finds nothing on it the other lacks (0.774751ms)
✔ a note line is appended once, as the forge's user, in its own repository (26.854243ms)
✔ a note that cannot be written is said, never read as written (0.462791ms)
✔ one view per pull request, found by its marker; only the mesh's statuses (3.670826ms)
✔ a build machine taking the check is said on the head: building on which machine, since the local time (17.480687ms)
✔ the verdict heard while a 'building' write is in flight lands last and stays (6.18906ms)
[gitea] novox/hq@a6b08de8: the verdict of build-1791680941000000000 is an older run's than the check now pending; not written
✔ the verdict written while a start's read of the forge is in flight stays the newest status (1.091302ms)
✔ the verdict heard while a 'building' write still waits its turn: the 'building' is never written (0.800111ms)
✔ a start heard after the verdict writes nothing (0.559341ms)
✔ a start from before the check now pending (a run before a recheck, the stream's history) writes nothing (0.558491ms)
✔ an old run's verdict redelivered after a recheck's pending is not written over it (1.708823ms)
[gitea] novox/hq@a6b08de8: the verdict of build-1791680941000000000 is an older run's than the check the forge holds pending; not written
[gitea] novox/hq@a6b08de8: the verdict of build-1791680941000000000 is an older run's than the check now pending; not written
✔ an old run's verdict in flight when the recheck comes lands before the recheck's pending (2.508234ms)
✔ a rechecked head says where its new run is: building on which machine (1.004392ms)
✔ the recheck's own verdict is written, even asked a little before the pending by another machine's clock (0.778651ms)
✔ after a restart, an old run's verdict is weighed against the check the forge's history holds open (0.610731ms)
✔ a recheck the forge does not take fails its caller, and the head is as it was (0.711471ms)
✔ the status tool writes the merge check's pending through the writer, and the mesh's other statuses as they were (12.54169ms)
✔ when a check was asked is read from its id; the opening of the check now pending from the gate's history (0.274211ms)
✔ a head this process did not announce (it restarted) is said only while the forge holds its gate pending (0.39358ms)
✔ a repository as the mesh clones it is told from another (0.284741ms)
✔ gitea_api refuses the forge's administration, a branch's protection and the merge check's status, and sends nothing (6.37856ms)
✔ gitea_api refuses a file written to the default branch or one a rule guards, and writes one on a branch of its own (82.9395ms)
✔ a protection rule covers a branch as the forge decides it: classes, alternatives, a plain name in any case (issue 539) (23.779747ms)
✔ gitea_api still writes what an author writes (8.083063ms)
✔ gitea_branch_protection_set only strengthens (19.03795ms)
✔ gitea_merge_pull_request merges only a head whose required statuses all succeeded, and only that head (52.919083ms)
✔ gitea_merge_pull_request merges only the head it is named, and refuses one that is not the head (27.956514ms)
✔ gitea_merge_pull_request is loud when the forge merged a head other than the one it was handed (16.388526ms)
✔ gitea_merge_pull_request says the merge happened when reading back what landed fails (42.417207ms)
✔ gitea_merge_pull_request reads back a fast-forward, and says it cannot read back a squash or a rebase (55.137497ms)
✔ gitea_delete_repo deletes only the tools' own user's repository, unguarded, untouched for 30 days, named in full (25.35519ms)
✔ gitea_api sends the path it judged, and refuses moving a pull request's base (3.042054ms)
✔ gitea_merge_pull_request merges only into a branch whose protection requires the checks (8.740224ms)
✔ a rule named for a branch is not made weaker than the glob rule that guards it now (14.489293ms)
✔ a repository owner or name is never another path (0.249671ms)
✔ the judges, without a forge (0.30536ms)
✔ gitea_api never acts as another user: sudo, in any case, and any query key it does not send are refused (2.883385ms)
✔ gitea_api never approves a pull request nor requests changes: those are the operator's (1.545612ms)
✔ no tool's caller text becomes another path or another user: `..` and `?sudo=` are refused before the forge (4.804758ms)
✔ every page of a pull request's files is read, though the forge caps a page at fifty (34.075954ms)
✔ a pass asks only the repositories that moved since the last look, every one before the first (0.547291ms)
✔ the directories above a merge's files that hold a module at the commit are said, the root never (18.442829ms)
✔ a lookup the forge refuses is thrown, not read as no module (5.708209ms)
✔ a renamed file is said under its old name too, as gone (novox/hq ADR 0267) (8.005412ms)
✔ the statuses asked for replace the rule's, and an empty list requires none (7.326422ms)
✔ a new rule refuses direct pushes unless asked; an administrator's override only when said (0.33552ms)
✔ each open pull request's new head is announced once, and nothing closed or merged (15.556465ms)
✔ a verdict is the head commit's status; an error is the forge's error, never a success (1.028621ms)
✔ each layer is its own status: the gate with the modules it judged, the repository's own check beside it (0.755411ms)
✔ no verdict sets warning on a required check; only a person's decision fails (1.082012ms)
✔ a commit status is set on the commit, under the merge check's context (45.157721ms)
✔ a change plan is the gate's result: said on the status and, when it builds something, as a comment (0.671232ms)
✔ a head announced is pending in the build queue, since the local time it was announced (0.30796ms)
✔ first start: mints with the admin account, keeps the token at 0600, asks for the tools' scopes only (43.075568ms)
✔ second start: reuses the kept token, mints nothing (24.836009ms)
✔ the forge rejects the kept token (its data was restored): minted afresh, once, and the call goes through (29.788097ms)
✔ a token kept with write:admin by an earlier build is minted again without it at the next start, and the forge drops the old one (33.294583ms)
✔ a kept token lacking a scope the tools need: the forge refuses the call for the scope, the token is re-minted with the whole list, and the call goes through (24.104598ms)
✔ the kept file is gone but the forge still holds a token by that name: replaced, not refused (31.70909ms)
✔ concurrent first calls share one mint (19.27154ms)
✔ the admin account is refused: said plainly, nothing kept, and the next call fails the same way rather than crashing (25.709421ms)
✔ one process shares one source per kept file — the watcher and the tools never renew against each other (3.255815ms)
✔ a second process finds the token the first renewed, and reuses it instead of minting over it (35.854316ms)
✔ a configured token wins, and is reported rather than minted over when the forge rejects it (3.103195ms)
✔ nothing to mint with and no token: the client says what is missing (0.25233ms)
[gitea] no tools — no Gitea token, and nothing to mint one with — set MESH_GITEA_TOKEN, or MESH_GITEA_ADMIN_USER, MESH_GITEA_ADMIN_PASSWORD_FILE, MESH_GITEA_STATE_DIR
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-gXQqIj/state/token
✔ the tools register once there is a way to a token, and the first call mints it (13.972041ms)
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-wSp0Rw/state/token
✔ a pull request can be closed, read and cleaned up through the tools (27.871004ms)
ℹ tests 73
ℹ suites 0
ℹ pass 73
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 647.432949
**Merge check** at `ac90b35b`
- `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: gitea)
- `mesh/repo-check`: **PASS** — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
**Delivery plan** — builds gitea → novox; no bus step
- tier 0: gitea
- novox: receives gitea
- gitea provides npm-package-registry, git: its consumers are sent again after it
- gitea keeps data (ADR 0233): what it holds is backed up before it moves
Run by the build seat on novox as `build-1791802315943253552` (`builds --log build-1791802315943253552`).
```
--- the gate: gitea
gitea: ok, keeps data (valuable); WARNING: server stay(s) up and say(s) not how it is ready — judged by liveness alone, refused from 2026-11-18 (ADR 0240 rule 8)
long-running resources without health: 1
files asking for a setting without saying whether it is trusted: 0
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T10:50:44Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T10:50:44Z
modules the change moves:
- gitea (changed)
machines:
- a machine (f35): composes
- holds mesh-dns-resolver (idt): composes
- holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
- a machine (yvbpsm): composes
a merge would rebuild 1 module(s) in 1 tier(s): gitea
--- its merge-check.sh (go toolchain)
ok git.novox.be/novox/mesh-catalog/checks/words 0.003s
words: 12 retired words and 70 daemons' lines, none in the 42919 strings of 689 files
ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.013s
agent-home: no archive and no file written into under the agent's home
ok git.novox.be/novox/mesh-catalog/checks/paths 0.006s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
ok git.novox.be/novox/mesh-catalog/checks/deps 0.300s
testing modules/gitea
ok gitea/cmd/forge 1.518s
ok gitea/cmd/npm-registry 1.894s
? gitea/internal/forgehttp [no test files]
--- its merge-check-typescript.sh (typescript toolchain)
Unable to find image 'novox.internal:5100/mesh-tools/build@sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5' locally
novox.internal:5100/mesh-tools/build@sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5: Pulling from mesh-tools/build
501c3e032d32: Already exists
d456d1aa143e: Already exists
60f37e2c93ec: Already exists
e53f92c42dd6: Already exists
b571db164614: Already exists
c97f29541340: Already exists
177d10251d51: Pulling fs layer
9959e49dce84: Pulling fs layer
71d3214eca9e: Pulling fs layer
3b9efb7e21bc: Pulling fs layer
99baede48b7f: Pulling fs layer
b39b9c5e1d8c: Pulling fs layer
762a70081f46: Pulling fs layer
e3a36fed88f4: Pulling fs layer
b39b9c5e1d8c: Waiting
762a70081f46: Waiting
99baede48b7f: Waiting
e3a36fed88f4: Waiting
3b9efb7e21bc: Waiting
71d3214eca9e: Verifying Checksum
71d3214eca9e: Download complete
177d10251d51: Download complete
3b9efb7e21bc: Download complete
99baede48b7f: Download complete
b39b9c5e1d8c: Download complete
762a70081f46: Verifying Checksum
762a70081f46: Download complete
9959e49dce84: Verifying Checksum
9959e49dce84: Download complete
e3a36fed88f4: Verifying Checksum
e3a36fed88f4: Download complete
177d10251d51: Pull complete
9959e49dce84: Pull complete
71d3214eca9e: Pull complete
3b9efb7e21bc: Pull complete
99baede48b7f: Pull complete
b39b9c5e1d8c: Pull complete
762a70081f46: Pull complete
e3a36fed88f4: Pull complete
Digest: sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5
Status: Downloaded newer image for novox.internal:5100/mesh-tools/build@sha256:20d3ae7c4f08c886ed3f0ee50128c69c8a3a0f0ab4605b064b1f24b64fb5b9a5
type-checking modules/gitea (TypeScript)
testing modules/gitea (TypeScript)
✔ a pull request opened after the margin is looked at, by its own update time (13.553851ms)
✔ every open pull request is read with what its base requires and what its head has (gitea_open_pulls) (96.184391ms)
✔ a pull request or issue number that is not one is refused before the forge is asked (1.807603ms)
✔ the newest status of each context is kept, with what it said, when and by whom (39.567653ms)
✔ a commit merges only when every required status is a success; a warning blocks (0.608981ms)
✔ no rule requires nothing; a rule that cannot be read says nothing, never yes (0.262861ms)
✔ a commit is contained in another when the compare finds nothing on it the other lacks (0.774751ms)
✔ a note line is appended once, as the forge's user, in its own repository (26.854243ms)
✔ a note that cannot be written is said, never read as written (0.462791ms)
✔ one view per pull request, found by its marker; only the mesh's statuses (3.670826ms)
✔ a build machine taking the check is said on the head: building on which machine, since the local time (17.480687ms)
✔ the verdict heard while a 'building' write is in flight lands last and stays (6.18906ms)
[gitea] novox/hq@a6b08de8: the verdict of build-1791680941000000000 is an older run's than the check now pending; not written
✔ the verdict written while a start's read of the forge is in flight stays the newest status (1.091302ms)
✔ the verdict heard while a 'building' write still waits its turn: the 'building' is never written (0.800111ms)
✔ a start heard after the verdict writes nothing (0.559341ms)
✔ a start from before the check now pending (a run before a recheck, the stream's history) writes nothing (0.558491ms)
✔ an old run's verdict redelivered after a recheck's pending is not written over it (1.708823ms)
[gitea] novox/hq@a6b08de8: the verdict of build-1791680941000000000 is an older run's than the check the forge holds pending; not written
[gitea] novox/hq@a6b08de8: the verdict of build-1791680941000000000 is an older run's than the check now pending; not written
✔ an old run's verdict in flight when the recheck comes lands before the recheck's pending (2.508234ms)
✔ a rechecked head says where its new run is: building on which machine (1.004392ms)
✔ the recheck's own verdict is written, even asked a little before the pending by another machine's clock (0.778651ms)
✔ after a restart, an old run's verdict is weighed against the check the forge's history holds open (0.610731ms)
✔ a recheck the forge does not take fails its caller, and the head is as it was (0.711471ms)
✔ the status tool writes the merge check's pending through the writer, and the mesh's other statuses as they were (12.54169ms)
✔ when a check was asked is read from its id; the opening of the check now pending from the gate's history (0.274211ms)
✔ a head this process did not announce (it restarted) is said only while the forge holds its gate pending (0.39358ms)
✔ a repository as the mesh clones it is told from another (0.284741ms)
✔ gitea_api refuses the forge's administration, a branch's protection and the merge check's status, and sends nothing (6.37856ms)
✔ gitea_api refuses a file written to the default branch or one a rule guards, and writes one on a branch of its own (82.9395ms)
✔ a protection rule covers a branch as the forge decides it: classes, alternatives, a plain name in any case (issue 539) (23.779747ms)
✔ gitea_api still writes what an author writes (8.083063ms)
✔ gitea_branch_protection_set only strengthens (19.03795ms)
✔ gitea_merge_pull_request merges only a head whose required statuses all succeeded, and only that head (52.919083ms)
✔ gitea_merge_pull_request merges only the head it is named, and refuses one that is not the head (27.956514ms)
✔ gitea_merge_pull_request is loud when the forge merged a head other than the one it was handed (16.388526ms)
✔ gitea_merge_pull_request says the merge happened when reading back what landed fails (42.417207ms)
✔ gitea_merge_pull_request reads back a fast-forward, and says it cannot read back a squash or a rebase (55.137497ms)
✔ gitea_delete_repo deletes only the tools' own user's repository, unguarded, untouched for 30 days, named in full (25.35519ms)
✔ gitea_api sends the path it judged, and refuses moving a pull request's base (3.042054ms)
✔ gitea_merge_pull_request merges only into a branch whose protection requires the checks (8.740224ms)
✔ a rule named for a branch is not made weaker than the glob rule that guards it now (14.489293ms)
✔ a repository owner or name is never another path (0.249671ms)
✔ the judges, without a forge (0.30536ms)
✔ gitea_api never acts as another user: sudo, in any case, and any query key it does not send are refused (2.883385ms)
✔ gitea_api never approves a pull request nor requests changes: those are the operator's (1.545612ms)
✔ no tool's caller text becomes another path or another user: `..` and `?sudo=` are refused before the forge (4.804758ms)
✔ every page of a pull request's files is read, though the forge caps a page at fifty (34.075954ms)
✔ a pass asks only the repositories that moved since the last look, every one before the first (0.547291ms)
✔ the directories above a merge's files that hold a module at the commit are said, the root never (18.442829ms)
✔ a lookup the forge refuses is thrown, not read as no module (5.708209ms)
✔ a renamed file is said under its old name too, as gone (novox/hq ADR 0267) (8.005412ms)
✔ the statuses asked for replace the rule's, and an empty list requires none (7.326422ms)
✔ a new rule refuses direct pushes unless asked; an administrator's override only when said (0.33552ms)
✔ each open pull request's new head is announced once, and nothing closed or merged (15.556465ms)
✔ a verdict is the head commit's status; an error is the forge's error, never a success (1.028621ms)
✔ each layer is its own status: the gate with the modules it judged, the repository's own check beside it (0.755411ms)
✔ no verdict sets warning on a required check; only a person's decision fails (1.082012ms)
✔ a commit status is set on the commit, under the merge check's context (45.157721ms)
✔ a change plan is the gate's result: said on the status and, when it builds something, as a comment (0.671232ms)
✔ a head announced is pending in the build queue, since the local time it was announced (0.30796ms)
✔ first start: mints with the admin account, keeps the token at 0600, asks for the tools' scopes only (43.075568ms)
✔ second start: reuses the kept token, mints nothing (24.836009ms)
✔ the forge rejects the kept token (its data was restored): minted afresh, once, and the call goes through (29.788097ms)
✔ a token kept with write:admin by an earlier build is minted again without it at the next start, and the forge drops the old one (33.294583ms)
✔ a kept token lacking a scope the tools need: the forge refuses the call for the scope, the token is re-minted with the whole list, and the call goes through (24.104598ms)
✔ the kept file is gone but the forge still holds a token by that name: replaced, not refused (31.70909ms)
✔ concurrent first calls share one mint (19.27154ms)
✔ the admin account is refused: said plainly, nothing kept, and the next call fails the same way rather than crashing (25.709421ms)
✔ one process shares one source per kept file — the watcher and the tools never renew against each other (3.255815ms)
✔ a second process finds the token the first renewed, and reuses it instead of minting over it (35.854316ms)
✔ a configured token wins, and is reported rather than minted over when the forge rejects it (3.103195ms)
✔ nothing to mint with and no token: the client says what is missing (0.25233ms)
[gitea] no tools — no Gitea token, and nothing to mint one with — set MESH_GITEA_TOKEN, or MESH_GITEA_ADMIN_USER, MESH_GITEA_ADMIN_PASSWORD_FILE, MESH_GITEA_STATE_DIR
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-gXQqIj/state/token
✔ the tools register once there is a way to a token, and the first call mints it (13.972041ms)
[gitea] no token kept — minting one
[gitea] the forge already holds a token named "mesh-tools" — replacing it
[gitea] minted a token for "mesh-admin" (write:repository, write:issue, read:user), kept at /tmp/gitea-wSp0Rw/state/token
✔ a pull request can be closed, read and cleaned up through the tools (27.871004ms)
ℹ tests 73
ℹ suites 0
ℹ pass 73
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 647.432949
```
Review 30's finding is fixed: guard.ts no longer misses a branch the forge protects. The rest of the PR is unchanged from bd7ca80, which I reviewed in review 30.
What I checked
The rebase.git range-diff shows bd7ca80 = f2d7653 (identical). The only new commit is ac90b35, on main c5abdf3, which holds #234 and #231.
My harness, with the new guard.ts, against Gitea v1.27.3's own modules/glob and Match:
seed 539, 400,000 cases: 0 where the forge protects and the guard does not. The guard covers more in 12,045.
seed 20261012, 400,000 cases: 0 such cases. The guard covers more in 12,410.
seed 7, wider alphabet (adds p P s S b B z Z _, space, ~=<>#%&@"'), 400,000 cases: 0 such cases. The guard covers more in 7,400.
rules.go: 0 mismatches with the forge in all three runs.
The extra coverage comes only from the fail-closed rules (guard.ts goReadsOtherwise). Among rules without those shapes, the guard covers more in 0 cases. Ordinary rules still answer exactly: release/* does not cover feature/x, {main,master} does not cover dev, and release-[ab] does not cover release-c.
My earlier counter-examples are now all covered: release-\d/release-1, v\w*/v2, []a]/a, rel-[[:digit:]]/rel-1 and v[\pL]/va.
test/rule-cases.json (283 cases):
All 283 forge answers equal Gitea 1.27.3's Match, computed independently in my harness.
Every guard entry covers more than the forge, never less.
The ac90b35 guard.ts passes all 283. The bd7ca80 guard.ts fails 13, and in 9 of those it misses a branch the forge protects. The new TS test therefore fails on bd7ca80's guard.ts.
TestRuleCoversAnswersAsTheForgeDoes holds rules.go to the same table.
go vet and go test -race pass for ./... in modules/gitea at ac90b35.
mesh/repo-check passes: go + typescript. The TS part runs 73 tests, 73 pass, and "a protection rule covers a branch as the forge decides it ... (issue 539)" is among them.
Issue 385 (#231's merge-check.sh on the build seat)
The repo-check report on ac90b35 (build-1791802315943253552, comment 10040) shows that the new merge-check.sh ran on the build seat on novox. Its checks/deps helper's own test runs, and it is a line the bd7ca80 run (build-1791801551808342545) did not have:
long-running resources without health: 69, as kept
ok git.novox.be/novox/mesh-catalog/checks/deps 0.300s
testing modules/gitea
ok gitea/cmd/forge 1.518s
That line comes from #231's (cd checks/deps && go test -count=1 .).
gitea printed neither "takes its forge dependencies from the clones beside the check" nor "FAILED: ... could not be tested". So gitea's dependencies resolved without the clones beside the check, and its tests ran.
Verdict: approve at ac90b35
Review 30's finding is fixed: guard.ts no longer misses a branch the forge protects. The rest of the PR is unchanged from bd7ca80, which I reviewed in review 30.
## What I checked
- **The rebase.** `git range-diff` shows bd7ca80 = f2d7653 (identical). The only new commit is ac90b35, on main c5abdf3, which holds #234 and #231.
- **My harness, with the new guard.ts**, against Gitea v1.27.3's own modules/glob and Match:
- seed 539, 400,000 cases: 0 where the forge protects and the guard does not. The guard covers more in 12,045.
- seed 20261012, 400,000 cases: 0 such cases. The guard covers more in 12,410.
- seed 7, wider alphabet (adds `p P s S b B z Z _`, space, `~=<>#%&@"'`), 400,000 cases: 0 such cases. The guard covers more in 7,400.
- rules.go: 0 mismatches with the forge in all three runs.
- The extra coverage comes only from the fail-closed rules (guard.ts goReadsOtherwise). Among rules without those shapes, the guard covers more in 0 cases. Ordinary rules still answer exactly: `release/*` does not cover `feature/x`, `{main,master}` does not cover `dev`, and `release-[ab]` does not cover `release-c`.
- My earlier counter-examples are now all covered: `release-\d`/`release-1`, `v\w*`/`v2`, `[]a]`/`a`, `rel-[[:digit:]]`/`rel-1` and `v[\pL]`/`va`.
- **test/rule-cases.json** (283 cases):
- All 283 `forge` answers equal Gitea 1.27.3's Match, computed independently in my harness.
- Every `guard` entry covers more than the forge, never less.
- The ac90b35 guard.ts passes all 283. The bd7ca80 guard.ts fails 13, and in 9 of those it misses a branch the forge protects. The new TS test therefore fails on bd7ca80's guard.ts.
- TestRuleCoversAnswersAsTheForgeDoes holds rules.go to the same table.
- **go vet and go test -race** pass for ./... in modules/gitea at ac90b35.
## Checks on ac90b35
- mesh/merge-gate passes: "builds gitea → novox ... 4 of 4 compose".
- mesh/repo-check passes: go + typescript. The TS part runs 73 tests, 73 pass, and "a protection rule covers a branch as the forge decides it ... (issue 539)" is among them.
## Issue 385 (#231's merge-check.sh on the build seat)
The repo-check report on ac90b35 (build-1791802315943253552, comment 10040) shows that the new merge-check.sh ran on the build seat on novox. Its checks/deps helper's own test runs, and it is a line the bd7ca80 run (build-1791801551808342545) did not have:
```
long-running resources without health: 69, as kept
ok git.novox.be/novox/mesh-catalog/checks/deps 0.300s
testing modules/gitea
ok gitea/cmd/forge 1.518s
```
That line comes from #231's `(cd checks/deps && go test -count=1 .)`.
gitea printed neither "takes its forge dependencies from the clones beside the check" nor "FAILED: ... could not be tested". So gitea's dependencies resolved without the clones beside the check, and its tests ran.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes issue 539: the follow-up findings of review 17 on #233 (the
gitea_committool, issue 375).What the forge does (checked first)
/swagger.v1.json, version 1.27.3).ApplyDiffPatchFileOptionshasbranch,new_branch,content,message,force_push,signoffand no sha or last commit.ChangeFilesOptions(POST /contents) has none either. In the 1.27.3 source,routers/api/v1/repo/file.gosays so itself ("the LastCommitID is not provided in the API options"). Neither write can be pinned to a commit. Both answers carrycommit.parents.models/git/protected_branch.goMatch,modules/glob): a name with none of*?\[]{}matches withstrings.EqualFold(any case). Anything else is a glob with/as separator:*,**,?,[abc],[a-z],[!abc],{a,b}and\escapes, matched case-sensitively. A glob that does not compile falls back to its literal text.VerifyBranchProtection→CanUserPushreturns false on!CanPush, with no exception for an administrator. When a rule allows pushes, a writer may push, and only this tool's own refusal keeps the commit off that branch. Not tested live: a test needs a[..]rule on some repository, no tool removes a protection rule (they only strengthen), and the only rule today is mesh-catalog'smain. Testing the case-insensitive match onMainwould leave a branch the forge then refuses to delete. I left the forge untouched.Changes (modules/gitea)
existing.Commit.ID), not at the branch name, so a file changed meanwhile is refused by the forge (sha mismatch). The answer'sparentis the parent the forge says it made the commit on:commit.parentsfrom its answer, orGET git/commits/{sha}when the answer has none. If that cannot be read, the call fails loudly and names the commit made. When the branch or base moved between the read and the commit,saidnames both commits and points togitea_compare.cmd/forge/rules.goports Gitea's compiler line for line.guard.tsruleCoversgets the same rule, which also fixesgitea_apifile writes and the covering globs ofgitea_branch_protection_set. Both now also match a plain name in any case (MAINis covered bymain), as the forge does.searchArchivetakes the call's context. Decompression goes through a reader that stops when the context ends. A search that reaches the deadline answers what it found, withstopped_at_deadline: trueand a line insaid.content_base64decoded), 16 MiB of files together, or a 4 MiB patch. Anything larger is refused before anything is sent. The tool description and the README state the limits.internal/forgehttp(Client.Do/GetJSON/SendJSON,ErrNotFound,StatusError,FromEnv) replaces the two copies incmd/forgeandcmd/npm-registry. Each bundle embeds it, and the timeouts (50 s and 20 s) are unchanged.Tests
cmd/forge/forge_test.go: a branch moved under the commit (said, with the right parent); a file changed under the commit (refused, nothing overwritten); a patch on a base that moved; a parent missing from the answer (read from the commit, and a failure when unreadable); each size limit, plus one at the limit; search stopped at its deadline; 19 more cases inTestRuleCoversIsTheGuardsRule.test/guard.test.tscovers the same cases, plusgitea_apirefusing writes torelease-a(rulerelease-[ab]),lts/2(rule{stable,lts}/*) andMAIN(rulemain). With main'sguard.tsit fails, and with this branch 65 of 65 pass. Run throughmerge-check-typescript.shwith a toolchain assembled locally (typescript, @types/node, mesh-sdk 0.1.13).go vetandgo test -racepass for the module.MESH_GATE=<controller built from mesh-controller main d881f47> MESH_CHECK_MODULES=gitea sh merge-check.shpasses: words, agent-home, paths, manifests (69, as kept), and the module's tests.git merge-treewith #234 (issue 456, also in modules/gitea) shows no conflict.Design limits I chose
guard.tstreats a\xescape as the literalx. Gitea passes it to its regexp as is (so\awould be a bell character). The Go port follows Gitea exactly.Reviewers' checklist
fromtheir owncmd/as before.rules.goandguard.tsagree with each other and with Gitea 1.27'smodules/glob.The bundle still writes as the forge's admin account. That is issue 469.
Delivery
novox/mesh-catalog@ac90b35b499b— delivered since 2026-10-12T11:08:07ZDelivery plan — builds gitea → novox; no bus step
Machines
Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition:git log --notes=mesh-plan.Merge check at
bd7ca80emesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: gitea)mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)Delivery plan — builds gitea → novox; no bus step
Run by the build seat on novox as
build-1791801551808342545(builds --log build-1791801551808342545).Verdict: request changes at bd7ca80
One blocking finding: guard.ts does not match protection rules the way the forge does, for several rule shapes. The Go port does. The PR says both are "the same rule", and the mismatch goes in the unsafe direction: the guard misses a branch the forge protects.
How I checked
ab/*?[]!{},\-.+Ad^$()|:x1wé.The blocking finding (guard.ts)
The forge writes
\plus the next character, and[...]contents, straight into a Go RE2 regexp. guard.ts re-escapes or reinterprets them as JavaScript, and RE2 and JavaScript read these differently:out += lit(g[pos++])). In the forge,\d,\w,\s,\b,\Aand\pLare regexp classes or assertions. In the guard they are the literal letter. Examples:release-\dcoversrelease-1in the forge, but not in the guard.v\w*coversv2in the forge, but not in the guard.\wcoversa,xand1in the forge, but not in the guard.]first in a class (guard.ts:195, chars(): the first]closes the class). RE2 reads[]a]as a class holding]anda. JavaScript reads[]as the empty class. So[]a]coversain the forge, but not in the guard.\pinside a class.[[:alpha:]]andrel-[[:digit:]]are valid in RE2. The guard escapes the inner[, sorel-[[:digit:]]does not coverrel-1in the guard.v[\pL]makes the RegExp at guard.ts:246 throw a SyntaxError (null), which turns it into a literal, so it does not coverva.Where this matters:
release-1under an existingrelease-\dis then not judged against the stronger covering rule.Suggested fix. Translate faithfully where JavaScript can, and fail closed where it cannot. When a rule has a backslash before an ASCII letter or digit outside a class, a
]first in a class,[:inside a class, or\p/\Panywhere, either map it to the RE2 meaning (\d→[0-9],\w→[0-9A-Za-z_],\s→[\t\n\f\r ], ...) or treat the rule as covering the branch (refuse). Then put the cases above into a shared table that both test/guard.test.ts and forge_test.go run. That keeps the two ports from drifting again.Everything else checks out (file:line at bd7ca80)
commit.parents, or else from reading the commit (parentOf, commit.go:357).commit.parents, so this works.stopped_at_deadlineis set.Each fix has a test that fails without it. I reverted each fix in turn:
go vet and go test -race pass for ./... in modules/gitea, at the head and on a trial merge.
#234 (also modules/gitea) is already merged. It is main at
9d6bd2d, which this branch does not contain. A trial merge with main is clean (test/guard.test.ts auto-merges), and the Go tests pass on it. I could not run the full TS suite locally, because the SDK and tsc toolchain are missing here. Rebasing will make mesh/repo-check run it on the merged tree.Checks on bd7ca80. mesh/merge-gate passes ("builds gitea → novox ... 4 of 4 compose"). mesh/repo-check passes (go + typescript).
The forge's contents and diffpatch endpoints take a branch, never a commit to build on, so the parent is read from the commit the forge made, and a branch that moved under the commit is said. Blobs are read at the commit read first, not at the branch name. Protection rules match as Gitea 1.27 matches them ([...], {a,b}, escapes, a plain name in any case), in the Go bundle and in guard.ts alike. One commit carries at most 4 MiB per file or patch and 16 MiB together; code search stops at its deadline and says so. The HTTP client the two Go bundles copied is one package, internal/forgehttp.bd7ca80e8ctoac90b35b49Review 30 is addressed at
ac90b35, rebased onto mainc5abdf3, which holds #234 (9d6bd2d) and #231.\d,\w,\pL,\b,\A), a class that opens with]or^([]a],[^+], a negation in Go), and a POSIX class ([[:digit:]]). A rule using any of these now covers every branch, and a comment says why. Escapes are also limited to what theuflag accepts (\-only inside a class), so a valid glob no longer falls back to its literal text by mistake.p L s S 0 _and space). The other direction remains, about 3,000 cases where the guard covers what the forge does not. All of them are rules with the constructs above.modules/gitea/test/rule-cases.jsonhas 283 rows: 43 hand cases with awhy, plus 240 sampled from the corpus. The forge's answers were computed with Gitea 1.27.3's ownmodules/glob.TestRuleCoversAnswersAsTheForgeDoes(Go) holdsrules.gotoforge. guard.test.ts holdsguard.tstoguard ?? forge, and checks thatguardonly ever covers more than the forge. With the bd7ca80 guard.ts the TypeScript test fails.go vetandgo test -racefor modules/gitea,merge-check-typescript.sh(73 of 73 pass), andMESH_GATE=<controller main d881f47> MESH_CHECK_MODULES=gitea sh merge-check.sh(exit 0).Merge check at
ac90b35bmesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: gitea)mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)Delivery plan — builds gitea → novox; no bus step
Run by the build seat on novox as
build-1791802315943253552(builds --log build-1791802315943253552).Verdict: approve at
ac90b35Review 30's finding is fixed: guard.ts no longer misses a branch the forge protects. The rest of the PR is unchanged from bd7ca80, which I reviewed in review 30.
What I checked
git range-diffshows bd7ca80 =f2d7653(identical). The only new commit isac90b35, on mainc5abdf3, which holds #234 and #231.p P s S b B z Z _, space,~=<>#%&@"'), 400,000 cases: 0 such cases. The guard covers more in 7,400.release/*does not coverfeature/x,{main,master}does not coverdev, andrelease-[ab]does not coverrelease-c.release-\d/release-1,v\w*/v2,[]a]/a,rel-[[:digit:]]/rel-1andv[\pL]/va.forgeanswers equal Gitea 1.27.3's Match, computed independently in my harness.guardentry covers more than the forge, never less.ac90b35guard.ts passes all 283. The bd7ca80 guard.ts fails 13, and in 9 of those it misses a branch the forge protects. The new TS test therefore fails on bd7ca80's guard.ts.ac90b35.Checks on
ac90b35Issue 385 (#231's merge-check.sh on the build seat)
The repo-check report on
ac90b35(build-1791802315943253552, comment 10040) shows that the new merge-check.sh ran on the build seat on novox. Its checks/deps helper's own test runs, and it is a line the bd7ca80 run (build-1791801551808342545) did not have:That line comes from #231's
(cd checks/deps && go test -count=1 .).gitea printed neither "takes its forge dependencies from the clones beside the check" nor "FAILED: ... could not be tested". So gitea's dependencies resolved without the clones beside the check, and its tests ran.