diff --git a/OKF_Nuxt/decisions/release-engineering.md b/OKF_Nuxt/decisions/release-engineering.md index d33b8b3..4e0e48d 100644 --- a/OKF_Nuxt/decisions/release-engineering.md +++ b/OKF_Nuxt/decisions/release-engineering.md @@ -70,32 +70,62 @@ The workflow now creates both labels (`autorelease: pending`, `autorelease: tagged`) before the action runs. Idempotent: it reads the label list and creates only what is missing. -# Recovering a release that was merged without a label +# The head branch must survive the merge (2026-10-27) -Labels exist only from the fixed workflow onwards. PRs merged before that -still carry none, so tagging them is a one-time manual step: +The label fix was necessary but not sufficient. PR #22 carried +`autorelease: pending` when it was merged, and the run after it still +created no tag. From its log (task 475): -```sh -# add the pending label to the merged release PRs -for n in 20 21; do - curl -sS -X POST -H "Authorization: token $TOKEN" \ - -H 'Content-Type: application/json' \ - -d '{"labels":["autorelease: pending"]}' \ - "https://git.noelsabia.dev/api/v1/repos/CV_Website/CV_Site_Nuxt/issues/$n/labels" -done +``` +❯ Found pull request #22: 'chore: release main' +✖ Bad branch name: refs/pull/22/head +⚠ Expected 1 releases, only found 0 ``` -Then run the release-please workflow again (it now has -`workflow_dispatch`). It creates `v1.2.0` and `v1.3.0` from those PRs' -bodies and replaces the label with `autorelease: tagged`. +Gitea rewrites a merged PR's `head.ref` to `refs/pull//head` once the +head branch is deleted; the branch name survives only in `head.label`. +The Gitea build of release-please reads `head.ref` +(`BranchName.parse(mergedPullRequest.headBranchName)`, bundled at +`dist/index.js:15288`) and abandons the release when it is not a release +branch. GitHub keeps the branch name there, which is why the plugin's +assumption holds on GitHub and not here. + +The repository deleted the head branch of every merged PR +(`default_delete_branch_after_merge: true`). It is `false` now, and a +release PR must be merged with its branch kept. The mechanism was +confirmed by comparison, not inference: while `fix/release_please` still +existed, PR #23 reported `head.ref = fix/release_please`; every PR whose +branch was gone reported `refs/pull//head`. + +# Recovering the versions that never got a tag + +The label alone cannot recover them — #20, #21 and #22 all lost their head +branch, so release-please skips them for the reason above. Creating those +tags is a one-time manual step: + +| Version | Merge commit | +|---|---| +| `v1.1.0` | `67cf232` (#12) | +| `v1.2.0` | `4e8aa28` (#20) | +| `v1.3.0` | `08eb042` (#21) | +| `v1.4.0` | `0c937e6` (#22) | + +`v1.0.0` is the bootstrap changelog entry from the configuration commit +`c89747e` (2026-10-18); no release PR produced it. + +The manifest moved to 1.4.0 without any tag existing, so until a tag is +present release-please has no baseline: it reported "No latest release +found for path: ., component: , but a previous version (1.4.0) was +specified in the manifest" and would compute the next release from the +whole history. # Not verified +* That the release phase tags correctly once the head branch survives a + merge. The next release cycle proves it. * That `RELEASE_PLEASE_TOKEN_CV_SITE_NUXT` carries the `write:issue` scope the same way `PR_GITEA_TOKEN` needed it; the previous failure was an immediate API rejection consistent with a scope problem. -* That the release phase tags correctly once the label is present. The - label path is now fixed at the source; the first recovery run proves it. # Revisit when diff --git a/OKF_Nuxt/log.md b/OKF_Nuxt/log.md index 006f791..f924e3a 100644 --- a/OKF_Nuxt/log.md +++ b/OKF_Nuxt/log.md @@ -1,5 +1,9 @@ # Update Log +## 2026-10-27 (release-please still never tagged: the deleted head branch) + +* **Fix**: [release-please-config.json](../release-please-config.json) gained `"changelog-host": "https://git.noelsabia.dev"` - the changelog compare links were generated against `github.com/CV_Website/CV_Site_Nuxt`, a host this repository does not live on. Root cause of the missing tags: **Gitea rewrites `head.ref` to `refs/pull//head` when the merged PR's branch is deleted**, and release-please parses that field as the release branch, so `BranchName.parse` fails and the release is dropped - silently, exit code 0. Evidence: run 143 (task 475) logs `✖ Bad branch name: refs/pull/22/head` right after `Found pull request #22`, then `Expected 1 releases, only found 0`; #22 did carry `autorelease: pending`. The repository deleted every merged branch (`default_delete_branch_after_merge: true`); it is `false` now. Four versions (1.1.0-1.4.0) were consumed by the manifest with no tag ever created, so the release baseline has to be restored by hand. See [Release engineering](decisions/release-engineering.md). + ## 2026-10-24 (release-please never tagged: the missing labels) * **Fix**: [release-please.yml](../.gitea/workflows/release-please.yml) - the workflow now creates `autorelease: pending` and `autorelease: tagged` before the action runs, and gained `workflow_dispatch` so a missed release can be replayed. Root cause: release-please finds merged release PRs **by label**, and Gitea resolves label names with `GetLabelIDsInRepoByNames`, a SQL `IN` filter that silently drops unknown names. The repository had no labels at all, so PRs #20 and #21 were merged unlabeled, every run found zero merged release PRs, created zero tags and opened the next release PR instead - reporting success each time. Evidence: run 137 green, 0 tags, 0 releases, `labels: []` on #20/#21/#22, and the repo's label list empty. See [Release engineering](decisions/release-engineering.md). diff --git a/release-please-config.json b/release-please-config.json index 052b86e..8132984 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -3,6 +3,7 @@ "release-type": "node", "include-component-in-tag": false, "separate-pull-requests": false, + "changelog-host": "https://git.noelsabia.dev", "packages": { ".": { "package-name": "CV_Site_Frontend",