Hello @susnux,
thanks for this change, taking compilation out of the PR loop removes a lot of daily friction.
I would even advocate going one step further: not committing compiled assets at all, and putting the compiled directories behind .gitignore.
The post-merge model fixes the conflicts, but it keeps the underlying oddity that build output lives in version control. That is where the remaining machinery comes from: the desync window on master, an extra asset commit after every merge (with the repository growing forever), a CI check that has to police PRs for accidentally committed assets, and special rules for stable branches and tags. All of that exists only to manage artifacts that git was never meant to hold.
The classic argument for committing them is that a git checkout must be runnable without a build toolchain. I think that argument has quietly expired: master currently requires Node 24 and npm 11, which hardly any distribution ships today. So “runnable from checkout” already depends on a very specific toolchain, and the real problem was never the compilation itself, it was setting up the toolchain.
That problem has a simple solution: build in throwaway containers. I maintain ncmake, a single generic Makefile for Nextcloud apps. Its concept, which I have spent a good amount of design work on, is strictly DRY: everything is derived from the repository itself, the app id and version from appinfo/info.xml, the PHP image from the declared min-version, the Node image from engines.node in package.json. composer and npm run in disposable podman or docker containers, the host needs neither PHP nor Node, and uid/gid mapping keeps the produced files owned by you. The same make build behaves identically on a laptop, on a test server and inside GitHub Actions, so local builds and CI cannot drift apart. My apps use this one Makefile for building, dist tarballs, deploying into a live instance or an AIO container, App Store publishing and the release workflow itself.
Applied to server, the same concept would mean: compiled assets are ignored, and make builds them from any commit with exactly the Node version the repo declares, in a container. The desync window disappears, the post-merge asset commits disappear, the new CI check becomes unnecessary because there is nothing left to police, and testing a PR no longer requires a local Node 24 setup. Tagged releases would of course keep shipping precompiled tarballs, produced by the same make target developers use. The one honest cost: running master from a bare checkout then needs podman or docker (or a matching local Node). In CI that cost does not even exist, GitHub’s own ubuntu-latest runners ship both podman and docker preinstalled, and self-hosted runners (like nextclouds ubuntu-latest-low) can be provisioned the same way. Daemonless, rootless podman is a particularly good fit for throwaway build containers, it adds next to no overhead. For the audience that actually runs master, that seems like a fair trade.
The “derive everything, repeat nothing” approach also covers a neighbouring chore: server#62407 updates eight workflow files by hand from the organization templates. In my app repos this is already automated end to end: a small GitHub App runs ncmake’s make workflows-update, which refreshes the managed workflows from their upstream templates (nextcloud/.github plus ncmake’s own) and opens a PR when something changed, leaving locally modified workflows untouched. twofactor_oath#52 shows what that looks like. No repo needs its own dependabot on .github/workflows for this, dependabot already watches nextcloud/.github, and the updater propagates from that single source. The same would work at organization scale.
ncmake is still evolving and more targets are planned, but the app side of the concept is running in production today. If there is interest I would be happy to prototype a server profile: I have already sketched what it would need, repository type detection, containerized npm ci and build through build/demi.sh, and an assets status target for the post-merge model. ncmake is MIT licensed, so if Nextcloud would rather adapt or copy the idea than depend on my repository, that is perfectly fine with me.
ernolf