A pull request runs the tests only, through its own workflow with the literal kind verify #412

Merged
claude merged 2 commits from feature/409-pull-request-verify-build into develop 2026-11-13 03:24:43 -05:00
Owner

A pull request runs the tests only: it has its own workflow with the literal kind verify, and only pre-release and release builds open the publishing jobs. CI workflows and documentation only.

  • Defect: build.yml chose the kind with an expression on forgejo.event_name. Every pull-request run got a kind other than verify, so it built the binaries, packages, image and NuGet packages and published a pre-release tagged v...R<pr>+<sha>, with the inherited secrets. The expression has been there since the first commit.
  • Cause: not proven. The value of kind in a pull-request run could not be read; the likely cause is how the runner evaluates the forgejo context in the with: of a reusable-workflow call.
  • Fix, without that expression:
    • New .forgejo/workflows/pull-request.yml: pull requests into develop and main, literal kind: 'verify', no secrets: inherit. Its name is Build, so the status stays Build / Pipeline (pull_request).
    • build.yml no longer has the pull_request trigger and passes the literal kind: 'prerelease'.
    • pipeline.yml: every gate inputs.kind != 'verify' is now inputs.kind == 'prerelease' || inputs.kind == 'release' (13 places), so an unexpected kind closes the gates. The test job gives the Docker socket and the unfiltered tests to those two kinds only, and prints the kind it received.
  • Push, hand-started and release builds: unchanged. The verifier compared every changed condition for prerelease and release.
  • Documentation: workflow headers, README ("The pipeline", "Pull requests") and CONTRIBUTING say what a pull request runs.

What a green pull-request pipeline covers after this

  • Lint and script tests, the C# format check, the build and all .NET tests except RequiresDocker, and the admin console lint, format check and tests.
  • Not covered: Docker-backed tests, Windows tests, binaries, packages, image, smoke test, publish. The branch's push build and the develop push build after the merge cover those. Q-PROC-13 (a pull request merges only when its whole pipeline is green) therefore gates less than it did in practice; that is the owner's decision to revisit.

Proof: this pull request's own run

  • Must run: Lint and Script Tests, Test .NET, Test Admin Console.
  • Must be skipped: Compute Version, Stage Draft Release, Build Binary (5), the Arch, Deb and RPM packages, Build and Push Image, Pack and Push NuGet (4), Smoke Test the Windows Binary, Test .NET on Windows, Windows Test Gate, Publish Release.
  • No v...R<this pr>+<sha> pre-release may appear.
  • It is merged only after that is checked by hand.

Verified

  • Container lint: shellcheck, actionlint and every script self-test pass.
  • Verifier: accepted. Open points it raised: the unproven cause (this run settles it), and that an unknown kind gives a green tests-only run and not a red one.

Closes #409

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

A pull request runs the tests only: it has its own workflow with the literal kind `verify`, and only pre-release and release builds open the publishing jobs. CI workflows and documentation only. - **Defect:** `build.yml` chose the kind with an expression on `forgejo.event_name`. Every pull-request run got a kind other than `verify`, so it built the binaries, packages, image and NuGet packages and published a pre-release tagged `v...R<pr>+<sha>`, with the inherited secrets. The expression has been there since the first commit. - **Cause:** not proven. The value of `kind` in a pull-request run could not be read; the likely cause is how the runner evaluates the `forgejo` context in the `with:` of a reusable-workflow call. - **Fix, without that expression:** - New `.forgejo/workflows/pull-request.yml`: pull requests into `develop` and `main`, literal `kind: 'verify'`, no `secrets: inherit`. Its name is `Build`, so the status stays `Build / Pipeline (pull_request)`. - `build.yml` no longer has the `pull_request` trigger and passes the literal `kind: 'prerelease'`. - `pipeline.yml`: every gate `inputs.kind != 'verify'` is now `inputs.kind == 'prerelease' || inputs.kind == 'release'` (13 places), so an unexpected kind closes the gates. The test job gives the Docker socket and the unfiltered tests to those two kinds only, and prints the kind it received. - **Push, hand-started and release builds:** unchanged. The verifier compared every changed condition for `prerelease` and `release`. - **Documentation:** workflow headers, README ("The pipeline", "Pull requests") and CONTRIBUTING say what a pull request runs. **What a green pull-request pipeline covers after this** - Lint and script tests, the C# format check, the build and all .NET tests except `RequiresDocker`, and the admin console lint, format check and tests. - Not covered: Docker-backed tests, Windows tests, binaries, packages, image, smoke test, publish. The branch's push build and the develop push build after the merge cover those. Q-PROC-13 (a pull request merges only when its whole pipeline is green) therefore gates less than it did in practice; that is the owner's decision to revisit. **Proof: this pull request's own run** - Must run: Lint and Script Tests, Test .NET, Test Admin Console. - Must be skipped: Compute Version, Stage Draft Release, Build Binary (5), the Arch, Deb and RPM packages, Build and Push Image, Pack and Push NuGet (4), Smoke Test the Windows Binary, Test .NET on Windows, Windows Test Gate, Publish Release. - No `v...R<this pr>+<sha>` pre-release may appear. - It is merged only after that is checked by hand. **Verified** - Container lint: shellcheck, actionlint and every script self-test pass. - Verifier: accepted. Open points it raised: the unproven cause (this run settles it), and that an unknown kind gives a green tests-only run and not a red one. Closes #409 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #409

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The contributing guide says what to do when a pull request run starts a build job
All checks were successful
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Has been skipped
Build / Stage Draft Release (push) Successful in -2m36s
Build / Pack and Push NuGet Packages (common) (push) Successful in -2m28s
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in -2m13s
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -2m2s
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in -2m16s
Build / Build Binary (linux-amd64) (pull_request) Has been skipped
Build / Build Binary (linux-arm64) (pull_request) Has been skipped
Build / Build Binary (macos-amd64) (pull_request) Has been skipped
Build / Build Binary (macos-arm64) (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (pull_request) Has been skipped
Build / Smoke Test the Windows Binary (pull_request) Has been skipped
Build / Build Binary (linux-amd64) (push) Successful in -1m19s
Build / Build Binary (linux-arm64) (push) Successful in -1m8s
Build / Build Binary (macos-amd64) (push) Successful in -1m10s
Build / Build Binary (macos-arm64) (push) Successful in -1m9s
Build / Build Binary (windows-amd64) (push) Successful in -50s
Build / Smoke Test the Windows Binary (push) Successful in 15s
Build / Build Arch Linux Packages (pull_request) Has been skipped
Build / Build and Test Deb and RPM Packages (pull_request) Has been skipped
Build / Build and Push Image (pull_request) Has been skipped
Build / Build Arch Linux Packages (push) Successful in -2m15s
Build / Build and Push Image (push) Successful in -2m29s
Build / Build and Test Deb and RPM Packages (push) Successful in 8s
Build / Publish Release (pull_request) Has been skipped
Build / Pipeline (pull_request) Successful in 0s
Build / Publish Release (push) Successful in -2m35s
Build / Pipeline (push) Successful in 0s
f45eb6a8d0
Closes #409

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 60d4b18eb9 into develop 2026-11-13 03:24:43 -05:00
claude deleted branch feature/409-pull-request-verify-build 2026-11-13 03:24:43 -05:00
Sign in to join this conversation.
No reviewers
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!412
No description provided.