Skip to content

updates - #250

Merged
mr-git merged 9 commits into
masterfrom
m/updates
Aug 10, 2026
Merged

updates#250
mr-git merged 9 commits into
masterfrom
m/updates

Conversation

@mr-git

@mr-git mr-git commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
  • update scalatest to 3.2.20
  • update cats-effect to 3.7.0
  • update cats to 2.13.0
  • update cats-helper to 3.12.2
  • update Scala to 3.3.8 and 2.13.18 (and drop 2.12 support)
  • update sbt-scalafmt to 2.6.2
  • drop scalafix
  • update SBT to 1.12.15

Summary by CodeRabbit

  • Build & Compatibility

    • Updated supported Scala versions to 2.13.18 and 3.3.8.
    • Upgraded the build system and development tooling for improved reliability.
  • Dependencies

    • Updated Cats, Cats Effect, Cats Helper, ScalaTest, and code coverage tooling.
  • Code Quality

    • Standardized formatting and import organization across the codebase.
    • Improved automated formatting and validation checks.
  • Release Process

    • Updated the release workflow to use its latest supported version.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request updates Scala, SBT, dependency, and plugin versions. It expands Scalafmt configuration, reformats Scala sources, removes Scalafix configuration, and updates CI workflow references.

Changes

Toolchain modernization

Layer / File(s) Summary
Build and dependency updates
build.sbt, project/Dependencies.scala, project/build.properties, project/plugins.sbt
Scala 2.12 support is removed. Scala, library, SBT, and plugin versions are updated. The fmt and check aliases now use repository-wide Scalafmt tasks.
Scalafmt configuration and source formatting
.scalafmt.conf, .scalafix.conf, src/main/scala-2/..., src/main/scala-3/..., src/main/scala/...
Scalafmt 3.11.5 rules are expanded. Scala sources are reformatted without behavior or API changes. The Scalafix import-organization configuration is removed.
Workflow references
.github/workflows/ci.yml, .github/workflows/release.yml
The CI invocation no longer passes scala_versions. The release workflow uses reusable workflow version v5.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: scala-steward

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "updates" is vague and does not identify the dependency, Scala, or build-tooling changes. Rename the title to identify the main change, such as "Update Scala, dependencies, and build tooling".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch m/updates

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Line 10: Update the reusable workflow reference in the release workflow to pin
commit b4557d9a82c03596dc2425e19b3cb9a6280a4739 instead of the v5 tag, and
replace secrets: inherit with an explicit mapping that passes only
JFROG_ACCESS_TOKEN while retaining the automatic GITHUB_TOKEN.

In @.scalafmt.conf:
- Around line 81-86: Update the rewrite.rules entry in .scalafmt.conf to use the
registered PreferCurlyFors rule name instead of the unrecognized lowercase
prefercurlyfors value, preserving the other configured rules.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c7a558b8-6d1e-4e66-9ba7-dfb33c5d9dcc

📥 Commits

Reviewing files that changed from the base of the PR and between 4fc5d3b and defeb2d.

📒 Files selected for processing (12)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .scalafix.conf
  • .scalafmt.conf
  • build.sbt
  • project/Dependencies.scala
  • project/build.properties
  • project/plugins.sbt
  • src/main/scala-2/com/evolutiongaming/random/Random.scala
  • src/main/scala-3/com/evolutiongaming/random/Random.scala
  • src/main/scala/com/evolutiongaming/random/RandomStateOf.scala
  • src/main/scala/com/evolutiongaming/random/SeedOf.scala
💤 Files with no reviewable changes (2)
  • .github/workflows/ci.yml
  • .scalafix.conf

jobs:
release:
uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v3
uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

repo="https://github.com/evolution-gaming/scala-github-actions.git"
sha="$(git ls-remote "$repo" 'refs/tags/v5^{}' | awk '{print $1}')"
: "${sha:=$(git ls-remote "$repo" 'refs/tags/v5' | awk '{print $1}')}"
test -n "$sha"

echo "v5 resolves to $sha"
curl -fsSL "https://raw.githubusercontent.com/evolution-gaming/scala-github-actions/$sha/.github/workflows/release.yml"

Repository: evolution-gaming/random

Length of output: 2245


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- caller workflow ---'
cat -n .github/workflows/release.yml

printf '%s\n' '--- repository references to the reusable workflow and secrets ---'
rg -n -C 3 'scala-github-actions|secrets:|JFROG_ACCESS_TOKEN|permissions:' .github/workflows .github 2>/dev/null || true

Repository: evolution-gaming/random

Length of output: 1573


🌐 Web query:

GitHub Actions reusable workflow secrets inherit secret not defined workflow_call contract

💡 Result:

In GitHub Actions, you can pass secrets to a reusable workflow using either explicit mapping or the inherit keyword [1][2]. When using secrets: inherit in the calling workflow, all secrets from the caller are implicitly passed to the reusable workflow [1][3]. A key behavior of this method is that it bypasses the need to explicitly define the secrets in the workflow_call trigger of the reusable workflow [1][4]. You can access these inherited secrets directly within the reusable workflow using the ${{ secrets.SECRET_NAME }} syntax, even if they are not listed in the on.workflow_call.secrets contract [1][2]. If you choose not to use secrets: inherit, you must explicitly pass each required secret in the calling workflow and define those secrets in the on.workflow_call.secrets block of the reusable workflow [5][6]. Important considerations regarding secret inheritance include: 1. Scope and Access: Secrets are only passed to directly called workflows. In a workflow chain (A > B > C), workflow C will only receive secrets from A if they are explicitly passed or inherited through each step in the chain [1][2]. 2. Environment Secrets: The on.workflow_call trigger does not support the environment keyword [1][7]. Environment secrets are not passed automatically from the caller; instead, if a reusable workflow job references an environment, it will use the environment secrets defined in the repository where the reusable workflow resides [1][7]. 3. Security: The inherit keyword provides a convenient way to share secrets, but ensure that the reusable workflow is intended to have access to all secrets available to the caller [1][3].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

repo="evolution-gaming/scala-github-actions"
tag="v5"
ref_json="$(curl -fsSL "https://api.github.com/repos/${repo}/git/refs/tags/${tag}")"
printf '%s\n' '--- tag object ---'
printf '%s\n' "$ref_json" | jq '{ref, object}'

type="$(printf '%s\n' "$ref_json" | jq -r '.object.type')"
object_sha="$(printf '%s\n' "$ref_json" | jq -r '.object.sha')"
if [ "$type" = "tag" ]; then
  commit_sha="$(curl -fsSL "https://api.github.com/repos/${repo}/git/tags/${object_sha}" | jq -r '.object.sha')
else
  commit_sha="$object_sha"
fi

printf 'resolved commit: %s\n' "$commit_sha"
printf '%s\n' '--- commit existence ---'
curl -fsSL "https://api.github.com/repos/${repo}/commits/${commit_sha}" | jq -r '.sha'

printf '%s\n' '--- v5 workflow at resolved commit ---'
curl -fsSL "https://raw.githubusercontent.com/${repo}/${commit_sha}/.github/workflows/release.yml"

Repository: evolution-gaming/random

Length of output: 212


🏁 Script executed:

#!/usr/bin/env bash
set -u

repo="evolution-gaming/scala-github-actions"
sha="b4557d9a82c03596dc2425e19b3cb9a6280a4739"

printf '%s\n' '--- commit API resolution ---'
if command -v gh >/dev/null 2>&1; then
  gh api "repos/${repo}/commits/${sha}" --jq '.sha' || true
else
  printf '%s\n' 'gh is unavailable'
fi

printf '%s\n' '--- git object resolution ---'
git ls-remote "https://github.com/${repo}.git" "$sha" "refs/tags/v5" "refs/tags/v5^{}" || true

printf '%s\n' '--- v5 workflow contract summary ---'
curl -fsSL "https://raw.githubusercontent.com/${repo}/${sha}/.github/workflows/release.yml" |
  awk '/workflow_call:/,/^jobs:/'

Repository: evolution-gaming/random

Length of output: 862


🌐 Web query:

site:docs.github.com/en/actions reusable workflow caller explicit secrets must be defined workflow_call secrets inherit GITHUB_TOKEN

💡 Result:

In GitHub Actions, secrets do not need to be explicitly defined in a reusable workflow's on.workflow_call block if you use the inherit keyword in the calling workflow [1]. When you use secrets: inherit in the caller workflow, all secrets available to the caller are implicitly passed to the reusable workflow, allowing you to reference them directly without prior definition in the reusable workflow's interface [1]. Regarding the GITHUB_TOKEN, it is important to note that it is automatically generated for every workflow job and is handled differently than user-defined secrets [2][3]. While the inherit keyword passes user-defined repository/environment secrets, the GITHUB_TOKEN is available by default in every job context regardless of secret inheritance [2][3]. You do not need to pass the GITHUB_TOKEN explicitly or via inheritance; it is always available, and you can reference it using ${{ secrets.GITHUB_TOKEN }} [3]. Summary of behavior: 1. Explicit definition: Required only if you are manually mapping specific secrets using the secrets keyword in the caller workflow [4][5]. 2. Implicit inheritance: If you use secrets: inherit, you do not need to define secrets in the reusable workflow's on.workflow_call block [1]. 3. GITHUB_TOKEN: This is not a standard repository secret; it is a built-in token automatically available to all workflow jobs [2]. It does not need to be defined in on.workflow_call or passed via inherit [2][3].

Citations:


🌐 Web query:

GitHub Actions reusable workflow secrets inherit GITHUB_TOKEN secrets context called workflow explicit mapping workflow_call

💡 Result:

In GitHub Actions, the GITHUB_TOKEN behaves differently than standard repository secrets when using reusable workflows. 1. Automatic Availability: The called (reusable) workflow is automatically granted access to the GITHUB_TOKEN without needing explicit mapping or inheritance [1]. You do not need to pass it via the secrets map or use secrets: inherit for the GITHUB_TOKEN to be available within the called workflow [1]. 2. Permissions: When a reusable workflow is triggered, it inherits the permissions associated with the GITHUB_TOKEN as defined by the caller job [1]. If the caller job does not specify permissions, the called workflow will have default permissions [1]. Importantly, any permissions specified in the called workflow can only be the same as or more restrictive (downgraded) than those provided by the caller; they cannot be elevated [1]. 3. Comparison with Other Secrets: Unlike the GITHUB_TOKEN, standard repository secrets are not automatically passed to reusable workflows [2]. To use them, you must either: - Explicitly map them using the secrets keyword in the job definition [3]: jobs: call_workflow: uses: path/to/reusable.yml secrets: MY_SECRET: ${{ secrets.MY_SECRET }} - Use the secrets: inherit keyword to pass all secrets available to the caller workflow to the called workflow [4][5]. For reusable workflows, remember that while GITHUB_TOKEN is always accessible, any other secrets required must be explicitly handled via mapping or inheritance to avoid "secret not defined" errors during the workflow parse phase [5].

Citations:


Pin the reusable workflow and narrow secret access.

Use commit b4557d9a82c03596dc2425e19b3cb9a6280a4739 instead of @v5. The workflow reads only JFROG_ACCESS_TOKEN besides the automatic GITHUB_TOKEN, but secrets: inherit passes all caller secrets. After v5 declares JFROG_ACCESS_TOKEN in its workflow_call contract, replace inheritance with explicit mapping.

🧰 Tools
🪛 zizmor (1.29.0)

[warning] 10-10: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow

(secrets-inherit)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 10, Update the reusable workflow
reference in the release workflow to pin commit
b4557d9a82c03596dc2425e19b3cb9a6280a4739 instead of the v5 tag, and replace
secrets: inherit with an explicit mapping that passes only JFROG_ACCESS_TOKEN
while retaining the automatic GITHUB_TOKEN.

Sources: MCP tools, Linters/SAST tools

Comment thread .scalafmt.conf
Comment on lines +81 to +86
rewrite.rules = [
Imports,
RedundantParens,
SortModifiers,
prefercurlyfors,
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

curl -fsSL \
  https://raw.githubusercontent.com/scalameta/scalafmt/v3.11.5/scalafmt-core/shared/src/main/scala/org/scalafmt/rewrite/Rewrite.scala \
  | rg -n -C 2 'PreferCurlyFors|ConfCodecEx\.oneOf'

Repository: evolution-gaming/random

Length of output: 448


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- repository configuration ---'
sed -n '70,92p' .scalafmt.conf

printf '%s\n' '--- Scalafmt rewrite-rule decoding ---'
curl -fsSL \
  https://raw.githubusercontent.com/scalameta/scalafmt/v3.11.5/scalafmt-core/shared/src/main/scala/org/scalafmt/rewrite/Rewrite.scala \
  | sed -n '96,132p'

printf '%s\n' '--- documented rule name ---'
curl -fsSL \
  https://scalameta.org/scalafmt/docs/configuration.html \
  | rg -n -C 3 'PreferCurlyFors|prefercurlyfors'

Repository: evolution-gaming/random

Length of output: 50380


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- Scalafmt references in the repository ---'
rg -n -i --glob '!target/**' --glob '!node_modules/**' 'scalafmt|scalafmtVersion|scalafmt-core' . | head -80 || true

printf '%s\n' '--- Exact rule-name comparison ---'
python3 - <<'PY'
import re
import urllib.request
from pathlib import Path

source = urllib.request.urlopen(
    "https://raw.githubusercontent.com/scalameta/scalafmt/v3.11.5/"
    "scalafmt-core/shared/src/main/scala/org/scalafmt/rewrite/Rewrite.scala"
).read().decode()
config = Path(".scalafmt.conf").read_text()

registered = re.findall(r"^\s{4}([A-Z][A-Za-z0-9]+),\s*$", source, re.M)
configured = re.search(r"^\s*prefercurlyfors,\s*$", config, re.M)
print("registered_prefer_curly_fors:", "PreferCurlyFors" in registered)
print("configured_lowercase_token:", configured.group(0).strip() if configured else None)
print("exact_registered_match:", configured and configured.group(0).strip() in registered)
print("registered_rules:", registered)
PY

Repository: evolution-gaming/random

Length of output: 2764


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- build plugin configuration ---'
cat -n project/plugins.sbt
printf '%s\n' '--- Scalafmt configuration version declarations ---'
rg -n -i -uu 'scalafmt|version\s*=' .scalafmt.conf .github project build.sbt 2>/dev/null || true

printf '%s\n' '--- sbt-scalafmt 2.6.2 dependency metadata ---'
curl -fsSL \
  https://repo1.maven.org/maven2/org/scalameta/sbt-scalafmt_2.12_1.0/2.6.2/sbt-scalafmt_2.12_1.0-2.6.2.pom \
  | rg -n -C 2 'scalafmt|version' || true
curl -fsSL \
  https://repo1.maven.org/maven2/org/scalameta/sbt-scalafmt_2.12_1.0/2.6.2/sbt-scalafmt_2.12_1.0-2.6.2.pom \
  | head -40 || true

Repository: evolution-gaming/random

Length of output: 4965


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for version in v3.11.4 v3.11.5; do
  printf '%s\n' "--- Rewrite.scala ${version} ---"
  curl -fsSL \
    "https://raw.githubusercontent.com/scalameta/scalafmt/${version}/scalafmt-core/shared/src/main/scala/org/scalafmt/rewrite/Rewrite.scala" \
    | sed -n '/private val rewrites/,/implicit val reader/p'
done

printf '%s\n' '--- Configured rewrite-rule tokens ---'
sed -n '/^rewrite\.rules[[:space:]]*=/,/^[[:space:]]*]/p' .scalafmt.conf

Repository: evolution-gaming/random

Length of output: 1106


Use the registered PreferCurlyFors rule name.

Line 85 uses prefercurlyfors, which Scalafmt does not recognize. This prevents the fmt and check tasks from decoding .scalafmt.conf.

Proposed fix
-  prefercurlyfors,
+  PreferCurlyFors,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
rewrite.rules = [
Imports,
RedundantParens,
SortModifiers,
prefercurlyfors,
]
rewrite.rules = [
Imports,
RedundantParens,
SortModifiers,
PreferCurlyFors,
]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.scalafmt.conf around lines 81 - 86, Update the rewrite.rules entry in
.scalafmt.conf to use the registered PreferCurlyFors rule name instead of the
unrecognized lowercase prefercurlyfors value, preserving the other configured
rules.

@mr-git
mr-git merged commit 1202e4e into master Aug 10, 2026
4 of 5 checks passed
@mr-git
mr-git deleted the m/updates branch August 10, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant