Context
KtsuBuild commits VERSION.md, CHANGELOG.md, and LATEST_CHANGELOG.md back to main during a release, then pushes. MetadataService stages them, commits as Github Actions, and calls GitService.PushAsync.
That push is the single reason branch rulesets cannot be enforced on this org. github-actions[bot] holds write, not admin, and GitHub Actions cannot be a ruleset bypass actor here because it is not an installed app. So any ruleset requiring a pull request blocks releases.
The observation
The commit is not needed for a correct release. CiCommand.cs:124 already computes shouldCommitMetadata = buildConfig.IsOfficial && buildConfig.IsMain and passes it as CommitChanges. When false, MetadataService still writes the files into the workspace, it just does not commit or push them, and ReleaseHash falls back to the current HEAD.
The build reads VERSION.md off disk, not out of git. Sdk.Common.MetadataFiles.props reads it at build time, and KtsuBuild writes it before the build runs. So the published package carries the right version whether or not the file is ever committed.
These are derived artifacts. The version comes from git tags, and the changelog comes from commit history. Committing them back into source is what created the constraint.
What changes if the commit is dropped
Gained: no push to main during a release, so a strict ruleset needs no bypass actor and works everywhere.
Lost:
VERSION.md in each repo goes stale between releases, so a local dotnet pack produces a stale version number
CHANGELOG.md stops accumulating in the repo. The GitHub release body is unaffected, since LATEST_CHANGELOG.md is generated in the workspace
Acceptance criteria
Note
This deserves its own design discussion rather than being bolted onto the Terraform work. It changes release behaviour across every repo in the org.
Context
KtsuBuild commits
VERSION.md,CHANGELOG.md, andLATEST_CHANGELOG.mdback tomainduring a release, then pushes.MetadataServicestages them, commits asGithub Actions, and callsGitService.PushAsync.That push is the single reason branch rulesets cannot be enforced on this org.
github-actions[bot]holdswrite, notadmin, and GitHub Actions cannot be a ruleset bypass actor here because it is not an installed app. So any ruleset requiring a pull request blocks releases.The observation
The commit is not needed for a correct release.
CiCommand.cs:124already computesshouldCommitMetadata = buildConfig.IsOfficial && buildConfig.IsMainand passes it asCommitChanges. When false,MetadataServicestill writes the files into the workspace, it just does not commit or push them, andReleaseHashfalls back to the current HEAD.The build reads
VERSION.mdoff disk, not out of git.Sdk.Common.MetadataFiles.propsreads it at build time, and KtsuBuild writes it before the build runs. So the published package carries the right version whether or not the file is ever committed.These are derived artifacts. The version comes from git tags, and the changelog comes from commit history. Committing them back into source is what created the constraint.
What changes if the commit is dropped
Gained: no push to
mainduring a release, so a strict ruleset needs no bypass actor and works everywhere.Lost:
VERSION.mdin each repo goes stale between releases, so a localdotnet packproduces a stale version numberCHANGELOG.mdstops accumulating in the repo. The GitHub release body is unaffected, sinceLATEST_CHANGELOG.mdis generated in the workspaceAcceptance criteria
shouldCommitMetadatano longer returns true for officialmainbuilds, or the behaviour is put behind a settingNote
This deserves its own design discussion rather than being bolted onto the Terraform work. It changes release behaviour across every repo in the org.