gitea: graph-driven announce, both check statuses, the change plan, branch-protection tools (hq ADR 0238) #98

Merged
mesh-admin merged 4 commits from feat/the-graph-decides-what-is-checked into main 2026-10-06 21:00:27 +00:00
Contributor

Implements the forge side of hq ADR 0238.

  • pull.updated carries what the controller maps a PR onto the module graph with: module_dirs at the head (issue 278), removed, and merge_check (whether the head has a merge-check.sh). Every PR the forge holds is announced; the controller decides.
  • A verdict sets mesh/merge-gate (the gate: modules moved, dependents, the change plan's summary) and mesh/repo-check (the repository's own merge-check.sh). A change that builds something gets its change plan as a comment; a failing/erroring layer gets the check's account.
  • New tools gitea_branch_protection_get / gitea_branch_protection_set (edit the branch's rule — required statuses replaced, everything else kept — or create one that refuses direct pushes unless push=true; optional block_admin_override). Pure body logic in protection.ts, tested.
  • merge-check.sh is the catalogue's own layer: every manifest through the running controller's module check, the touched Go modules' tests (-race when gcc); TypeScript modules and unfetchable deps said as not tested.

Tested: node --test for pulls/protection (the pre-existing client test a commit status is set on the commit fails as on main: client.ts imports ./token.js, which strip-types cannot resolve); tsc clean in the TypeScript toolchain.

Pairs with mesh-controller #101. Do not merge before review.

Implements the forge side of hq ADR 0238. - `pull.updated` carries what the controller maps a PR onto the module graph with: `module_dirs` at the head (issue 278), `removed`, and `merge_check` (whether the head has a merge-check.sh). Every PR the forge holds is announced; the controller decides. - A verdict sets `mesh/merge-gate` (the gate: modules moved, dependents, the change plan's summary) and `mesh/repo-check` (the repository's own merge-check.sh). A change that builds something gets its change plan as a comment; a failing/erroring layer gets the check's account. - New tools `gitea_branch_protection_get` / `gitea_branch_protection_set` (edit the branch's rule — required statuses replaced, everything else kept — or create one that refuses direct pushes unless `push=true`; optional `block_admin_override`). Pure body logic in `protection.ts`, tested. - `merge-check.sh` is the catalogue's own layer: every manifest through the running controller's module check, the touched Go modules' tests (-race when gcc); TypeScript modules and unfetchable deps said as not tested. Tested: `node --test` for pulls/protection (the pre-existing client test `a commit status is set on the commit` fails as on main: client.ts imports ./token.js, which strip-types cannot resolve); tsc clean in the TypeScript toolchain. Pairs with mesh-controller #101. Do not merge before review.
mesh-admin added 3 commits 2026-10-06 20:51:29 +00:00
The controller now decides what a pull request's check runs from the mesh's module
graph, so the announcement carries the changed directories that hold a module at the
head and whether the head has a merge-check.sh. A verdict sets mesh/merge-gate (the
gate, with the modules it judged) and mesh/repo-check (the repository's own tests).
gitea_branch_protection_get/set let the operator's agent make those statuses required.

The catalogue's merge-check.sh leaves the gate to the build seat and keeps its own layer:
every manifest through module check, and the touched Go modules' tests.
The controller asks its planner what a pull request reaches, as if merged: a module whose
manifest the change deletes is one the merge removes, and the plan's dependents are said
on the gate's status beside the modules it moves.
gitea: post a pull request's change plan with its verdict (hq ADR 0238)
mesh/merge-gate pass: the merge check passed
mesh/delivery superseded: a newer head of the same pull request
cc1305a354
The gate's status says what the change does and how it was judged; a change that builds
something gets its plan as a comment — the tiers, what each machine receives, and what
is not an ordinary send.
jschoubben added 1 commit 2026-10-06 20:54:55 +00:00
Test the modules the planner says the change reaches (hq ADR 0238)
mesh/merge-gate pass: the merge check passed
mesh/delivery delivered
mesh/delivery-group group feat/the-graph-decides-what-is-checked merged: every member is merged
81641a4b22
mesh-admin merged commit 88135ad0e7 into main 2026-10-06 21:00:27 +00:00
mesh-admin deleted branch feat/the-graph-decides-what-is-checked 2026-10-06 21:00:28 +00:00
Author
Contributor

Delivery novox/mesh-catalog@cc1305a3541d — superseded since 2026-10-06T23:05:28Z

Group feat/the-graph-decides-what-is-checked, in order:

Transitions

  • 2026-10-06 23:05 (new) → proposed (announced): novox/mesh-catalog#98's head announced
  • 2026-10-06 23:05 proposed → checked (checked): the verdict names this commit
  • 2026-10-06 23:05 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-06 23:05 ready → superseded (new-head): a newer head of the same pull request

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-catalog@cc1305a3541d` — **superseded** since 2026-10-06T23:05:28Z **Group** `feat/the-graph-decides-what-is-checked`, in order: **Transitions** - 2026-10-06 23:05 (new) → proposed (announced): novox/mesh-catalog#98's head announced - 2026-10-06 23:05 proposed → checked (checked): the verdict names this commit - 2026-10-06 23:05 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-06 23:05 ready → superseded (new-head): a newer head of the same pull request The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#98