CI=true in every build (v1.38.0) #132

Merged
ai-reviewer merged 3 commits from mihoe/ci-env-in-every-build into main 2026-10-09 21:29:22 +02:00
Collaborator

Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation.

The Problem

Many build tools ask the variable CI whether they run unattended.
Test runners then run once instead of watching, package managers ask nothing, and progress bars do not fill the log.
Forgejo Actions, GitHub Actions, GitLab and Jenkins set it; Werkator did not.
A build that works on another CI system could therefore hang on a prompt or flood its log on Werkator.

RFC 0006 step 2 lists CI=true together with the GITHUB_* and FORGEJO_* variables.
Only CI is useful on its own: the other names help only scripts written for another system, and no project on Werkator has one.

Non-Goals

  • No GITHUB_* or FORGEJO_* variables; they wait until a project brings a script that reads them.
  • No new configuration key.

The Scenarios

Feature: The environment of a build

Scenario#132.01: Every command of a build runs with CI=true

So that build tools run unattended on Werkator, as they do on any other CI system.

  • Given a build with a clean command and a build command
  • When the build runs
  • Then both commands see CI=true
  • This holds natively, in the Docker container and in the werkdock sandbox, because all three runners pass the same build environment on.
Verified by

Scenario#132.02: A sandbox environment may set another value

So that a build that must not run in CI mode can still say so.

  • Given a build definition that sets CI=false in the environment of its Docker container or werkdock sandbox
  • When the build runs
  • Then its commands see CI=false
Verified by

The Solution

  • BuildExecutor.buildEnvironment puts CI=true next to branch into every build environment.
  • The runners already pass this environment on: natively into the process, as --env to docker run, as -e to werkdock run, which becomes bwrap's --setenv.
  • docs/configuration.md gets the section "What a build finds in its environment", which also names the variables Werkator set before.
  • The version is 1.38.0: a build behaves differently, so this is new behaviour, not a fix.

🤖 Generated with Claude Code

> Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation. ## The Problem Many build tools ask the variable `CI` whether they run unattended. Test runners then run once instead of watching, package managers ask nothing, and progress bars do not fill the log. Forgejo Actions, GitHub Actions, GitLab and Jenkins set it; Werkator did not. A build that works on another CI system could therefore hang on a prompt or flood its log on Werkator. RFC 0006 step 2 lists `CI=true` together with the `GITHUB_*` and `FORGEJO_*` variables. Only `CI` is useful on its own: the other names help only scripts written for another system, and no project on Werkator has one. ## Non-Goals - No `GITHUB_*` or `FORGEJO_*` variables; they wait until a project brings a script that reads them. - No new configuration key. ## The Scenarios ### Feature: The environment of a build #### Scenario#132.01: Every command of a build runs with CI=true So that build tools run unattended on Werkator, as they do on any other CI system. - **Given** a build with a clean command and a build command - **When** the build runs - **Then** both commands see `CI=true` - This holds natively, in the Docker container and in the werkdock sandbox, because all three runners pass the same build environment on. ##### Verified by - [BuildExecutorUnitTest: every command of a build runs with CI=true](../../src/test/kotlin/de/hoennig/werkator/build/BuildExecutorUnitTest.kt) #### Scenario#132.02: A sandbox environment may set another value So that a build that must not run in CI mode can still say so. - **Given** a build definition that sets `CI=false` in the environment of its Docker container or werkdock sandbox - **When** the build runs - **Then** its commands see `CI=false` ##### Verified by - [DockerBuildRunnerUnitTest: assembles the exact docker run command](../../src/test/kotlin/de/hoennig/werkator/build/DockerBuildRunnerUnitTest.kt) - [WerkdockBuildRunnerUnitTest: adds the sandbox env after the branch environment](../../src/test/kotlin/de/hoennig/werkator/build/WerkdockBuildRunnerUnitTest.kt) ## The Solution - `BuildExecutor.buildEnvironment` puts `CI=true` next to `branch` into every build environment. - The runners already pass this environment on: natively into the process, as `--env` to `docker run`, as `-e` to `werkdock run`, which becomes bwrap's `--setenv`. - `docs/configuration.md` gets the section "What a build finds in its environment", which also names the variables Werkator set before. - The version is 1.38.0: a build behaves differently, so this is new behaviour, not a fix. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-code added 1 commit 2026-10-09 21:15:15 +02:00
PR-doc skeleton for CI=true in every build
werkator build succeeded after 02:31
0484f6d3c7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 1 commit 2026-10-09 21:20:55 +02:00
CI=true in every build (v1.38.0)
werkator build succeeded after 02:51
ai-review/assessment human review required; a human approval unlocks the merge; review requested from mi; merge scheduled for when the checks succeed
ai-review/gate build succeeded after 01:22
1eadd006ac
Build tools ask CI whether they run unattended: no prompts, no progress
bars, no watch mode. Werkator now sets it in every build environment,
which all three runners pass on; a docker.env or werkdock.env entry comes
later and may still set another value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-code changed title from WIP: CI=true in every build to CI=true in every build (v1.38.0) 2026-10-09 21:24:01 +02:00
Collaborator
🟡 werkrevisor YELLOW for 1eadd00, superseded by the result for 52f784a

🟡 werkrevisor: YELLOW / HUMAN_REVIEW

Change kind: mixed.

Reasons

  • YELLOW spec: docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md Scenario#132.02 implementation_details (0.64 > yellow_above = 0.6)
  • YELLOW model reports a security concern: False
  • hint 3 changed file(s) that neither weaken the checks, touch security nor show a risk category of jvm-spring-backend according to Jev
  • hint 1 build change(s) of low risk according to Jev: build.gradle.kts (weakens checks 0.03, risk 0.00, security 0.01)
  • hint 1 changed file was given to the AI as excerpt of the selected lines and 5 lines around each changed line, not in full (each larger than [review] max_full_file_chars = 80000): src/main/resources/templates/releases.html
  • hint 1 finding(s) of low severity or rated minor by Jev: docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md:45

Findings

  1. Implementation Narration in Scenario at docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md:45, severity unknown, counted as medium

    hint; Jev: real 0.45, severity 1.0 of 3

    Scenario#132.02's "Then" clause narrates the internal mechanism ("because the sandbox environment is passed after the build environment and the last value wins") rather than stating the observable behavior. This is a style issue: if the runners' internal ordering is ever changed, the scenario's reasoning becomes misleading even though the observable outcome (the definition's CI value applies) still holds. The "Then" should focus on what the build's command sees.

Classifier

Unit Question Problem Confidence Verdict
docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md Scenario#132.02 implementation_details 0.64 – YELLOW

4 of 5 units passed all questions (1 PR document(s)).
2 answers ignored because of a confidence below [classifier] min_confidence.

Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 35423, calls 1, tokens in 34091 / out 9247 (reasoning included in out), duration 60.7 s, cost 0.0213 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 3996, cost 0.0002 USD, finding judge `jev-1.13.0` calls 1, tokens in 2066, cost 0.0001 USD, excerpt selection `openrouter/openai/gpt-6-luna` calls 1, tokens in 28561 / out 181, cost 0.0037 USD (reported), build file judge `jev-1.13.0` calls 4, tokens in 4291, cost 0.0002 USD, phases: path_judge 0.4 s, classifier 0.4 s, context 3.5 s, model_review 55.0 s, finding_judge 0.3 s, config: defaults + host + repository (.werkrevisor.toml at main fb48cf1).
Reviewed head `1eadd006acae4d6aa4e06302ebe5cdcb387692f6` against base `fb48cf1a1f711a062635d0dc923d359f1a796204`, werkrevisor 0.31.1.
<!-- werkrevisor:1eadd006acae4d6aa4e06302ebe5cdcb387692f6 --> <!-- werkrevisor-verdict:YELLOW --> <!-- werkrevisor-folded --> <details><summary>🟡 werkrevisor YELLOW for <code>1eadd00</code>, superseded by <a href="http://git.javagil.de/mi/werkator/pulls/132#issuecomment-2816">the result for <code>52f784a</code></a></summary> ## 🟡 werkrevisor: YELLOW / HUMAN_REVIEW Change kind: `mixed`. ### Reasons - **YELLOW** spec: docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md Scenario#132.02 implementation_details (0.64 > yellow_above = 0.6) - **YELLOW** model reports a security concern: False - **hint** 3 changed file(s) that neither weaken the checks, touch security nor show a risk category of jvm-spring-backend according to Jev - **hint** 1 build change(s) of low risk according to Jev: build.gradle.kts (weakens checks 0.03, risk 0.00, security 0.01) - **hint** 1 changed file was given to the AI as excerpt of the selected lines and 5 lines around each changed line, not in full (each larger than [review] max_full_file_chars = 80000): src/main/resources/templates/releases.html - **hint** 1 finding(s) of low severity or rated minor by Jev: docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md:45 ### Findings 1. **Implementation Narration in Scenario** at `docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md:45`, severity unknown, counted as medium hint; Jev: real 0.45, severity 1.0 of 3 Scenario#132.02's "Then" clause narrates the internal mechanism ("because the sandbox environment is passed after the build environment and the last value wins") rather than stating the observable behavior. This is a style issue: if the runners' internal ordering is ever changed, the scenario's reasoning becomes misleading even though the observable outcome (the definition's CI value applies) still holds. The "Then" should focus on what the build's command sees. ### Classifier | Unit | Question | Problem | Confidence | Verdict | |---|---|---|---|---| | docs/prs/2026-10-09-PR#132-ci-true-in-every-build.md Scenario#132.02 | implementation_details | 0.64 | – | YELLOW | 4 of 5 units passed all questions (1 PR document(s)). 2 answers ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 35423, calls 1, tokens in 34091 / out 9247 (reasoning included in out), duration 60.7 s, cost 0.0213 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 3996, cost 0.0002 USD, finding judge `jev-1.13.0` calls 1, tokens in 2066, cost 0.0001 USD, excerpt selection `openrouter/openai/gpt-6-luna` calls 1, tokens in 28561 / out 181, cost 0.0037 USD (reported), build file judge `jev-1.13.0` calls 4, tokens in 4291, cost 0.0002 USD, phases: path_judge 0.4 s, classifier 0.4 s, context 3.5 s, model_review 55.0 s, finding_judge 0.3 s, config: defaults + host + repository (.werkrevisor.toml at main fb48cf1).<br> Reviewed head `1eadd006acae4d6aa4e06302ebe5cdcb387692f6` against base `fb48cf1a1f711a062635d0dc923d359f1a796204`, werkrevisor 0.31.1. </sub> </details>
ai-reviewer scheduled this pull request to auto merge when all checks succeed 2026-10-09 21:25:28 +02:00
ai-reviewer requested review from mi 2026-10-09 21:25:29 +02:00
mi added 1 commit 2026-10-09 21:26:01 +02:00
PR-doc of PR#132: Scenario#132.02 without the argument order
ai-review/assessment AI review passed; approved by werkrevisor; merge already scheduled; review request of mi withdrawn
ai-review/gate build succeeded after 00:46
werkator build succeeded after 03:16
52f784a650
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator

🟢 werkrevisor: GREEN / PASS

Change kind: mixed.

Reasons

  • hint 3 changed file(s) that neither weaken the checks, touch security nor show a risk category of jvm-spring-backend according to Jev
  • hint 1 build change(s) of low risk according to Jev: build.gradle.kts (weakens checks 0.03, risk 0.00, security 0.01)
  • hint 1 changed file was given to the AI as excerpt of the selected lines and 5 lines around each changed line, not in full (each larger than [review] max_full_file_chars = 80000): src/main/resources/templates/releases.html

Classifier

5 of 5 units passed all questions (1 PR document(s)).
2 answers ignored because of a confidence below [classifier] min_confidence.

Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 35359, calls 1, tokens in 34033 / out 9846 (reasoning included in out), duration 43.1 s, cost 0.0220 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 3965, cost 0.0002 USD, excerpt selection `openrouter/openai/gpt-6-luna` calls 1, tokens in 28561 / out 192, cost 0.0004 USD (reported), build file judge `jev-1.13.0` calls 4, tokens in 4291, cost 0.0002 USD, phases: path_judge 0.3 s, classifier 0.4 s, context 3.6 s, model_review 38.6 s, config: defaults + host + repository (.werkrevisor.toml at main fb48cf1).
Reviewed head `52f784a6503d08d83b23c7dbe10cd6079f82edfc` against base `fb48cf1a1f711a062635d0dc923d359f1a796204`, werkrevisor 0.31.1.
<!-- werkrevisor:52f784a6503d08d83b23c7dbe10cd6079f82edfc --> <!-- werkrevisor-verdict:GREEN --> ## 🟢 werkrevisor: GREEN / PASS Change kind: `mixed`. ### Reasons - **hint** 3 changed file(s) that neither weaken the checks, touch security nor show a risk category of jvm-spring-backend according to Jev - **hint** 1 build change(s) of low risk according to Jev: build.gradle.kts (weakens checks 0.03, risk 0.00, security 0.01) - **hint** 1 changed file was given to the AI as excerpt of the selected lines and 5 lines around each changed line, not in full (each larger than [review] max_full_file_chars = 80000): src/main/resources/templates/releases.html ### Classifier 5 of 5 units passed all questions (1 PR document(s)). 2 answers ignored because of a confidence below [classifier] min_confidence. <sub> Usage: model `openrouter/minimax/minimax-m3`, LLM done, tokens counted before the call 35359, calls 1, tokens in 34033 / out 9846 (reasoning included in out), duration 43.1 s, cost 0.0220 USD (reported), classifier `jev-1.13.0` calls 5, tokens in 3965, cost 0.0002 USD, excerpt selection `openrouter/openai/gpt-6-luna` calls 1, tokens in 28561 / out 192, cost 0.0004 USD (reported), build file judge `jev-1.13.0` calls 4, tokens in 4291, cost 0.0002 USD, phases: path_judge 0.3 s, classifier 0.4 s, context 3.6 s, model_review 38.6 s, config: defaults + host + repository (.werkrevisor.toml at main fb48cf1).<br> Reviewed head `52f784a6503d08d83b23c7dbe10cd6079f82edfc` against base `fb48cf1a1f711a062635d0dc923d359f1a796204`, werkrevisor 0.31.1. </sub>
ai-reviewer left a comment
Collaborator

werkrevisor: GREEN / PASS for 52f784a6503d08d83b23c7dbe10cd6079f82edfc.
The result comment of werkrevisor holds the details.

werkrevisor: GREEN / PASS for `52f784a6503d08d83b23c7dbe10cd6079f82edfc`. The result comment of werkrevisor holds the details. <!-- werkrevisor-review:52f784a6503d08d83b23c7dbe10cd6079f82edfc -->
ai-reviewer removed review request for mi 2026-10-09 21:26:46 +02:00
ai-reviewer merged commit cbdaaacc74 into main 2026-10-09 21:29:22 +02:00
ai-reviewer deleted branch mihoe/ci-env-in-every-build 2026-10-09 21:29:22 +02:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#132