Skip to content

fix(build): preserve reviewed CrowdSec module version - #340

Merged
RentnerKev merged 1 commit into
mainfrom
rentner/fix/crowdsec-module-pin
Nov 2, 2026
Merged

RentnerKev merged 1 commit into
mainfrom
rentner/fix/crowdsec-module-pin

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Fresh Caddy builds began failing the existing effective-module-version check after the reviewed CrowdSec bouncer commit gained a release tag. Go now resolves the commit selector to that tag instead of the previously reviewed pseudo-version.

Both Docker images now request v0.14.2-0.20261030164527-4a6ce1d3094d explicitly. This identifies the same upstream source commit and preserves the existing compiler, dependency, binary and required-module checks. Hermetic tests cover the argument contract and continue rejecting an unreviewed effective version.

Related issue

N/A — isolated correction to the existing reproducible Caddy build, discovered during fresh container verification.

Type of change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • CI / tooling
  • Dependency update
  • Other

Testing

  • Disposable Linux Bun container: Caddy build script and Dockerfile contract fixtures — 3 passed, 92 assertions.
  • Actual docker/proxy-runtime/Dockerfile Caddy build with this exact patch — passed compilation and all existing build-info, version and module checks.
  • All PR CI workflows passed for 8d8f6eb1ef31167bcc23b82d8f16e48d6ced2e0f, including full web/database tests, Caddy builds, the complete upgrade matrix, production backup/restore/recovery, dependency audits and short runtime reliability.
  • CodeRabbit source review of all five changed files — no actionable findings. The full-review job is currently quota-limited.

Checklist

  • I tested the relevant functionality.
  • Existing tests pass.
  • I added or updated tests where appropriate.
  • This PR does not include secrets, credentials, production data, or private certificates/keys.
  • I updated documentation where necessary.
  • I linked the relevant issue for a feature or fix, or explained why no issue is needed.

Breaking changes

None.

Screenshots

None.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
Pre-merge checks: Passed 2
Check name Status Explanation
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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@RentnerKev

Copy link
Copy Markdown
Member Author

@coderabbitai run pre-merge checks

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Running Pre-merge checks. Results will be posted in the summary comment once complete.

@RentnerKev RentnerKev added this to the v1.0.0-beta.3 milestone Nov 2, 2026
@RentnerKev RentnerKev added area: ci Continuous integration and GitHub automation. area: docker Docker images, Compose configuration, and deployment. labels Nov 2, 2026
@RentnerKev

Copy link
Copy Markdown
Member Author

@coderabbitai Please inspect the five-file diff at head 8d8f6eb1ef31167bcc23b82d8f16e48d6ced2e0f against main 69295d87e4f5ecd14c3ed19b38ee423da471108e for correctness while the full review quota resets.

Fresh builds failed their unchanged effective-module verification after the pinned CrowdSec bouncer commit gained the v0.15.0 tag. Both images now request the existing reviewed Go pseudo-version v0.14.2-0.20261030164527-4a6ce1d3094d explicitly. The source revision and the strict compiler/module/binary checks remain unchanged. Contract fixtures still reject an unreviewed effective version. The Linux fixtures passed 3 tests/92 assertions, and the actual Caddy Docker build passed with this exact patch.

Please verify the canonical module selector, both Docker ARG contracts, and that the tests preserve effective dependency verification. Report any actionable issue you find; please also assess whether this bounded maintenance PR's title and description match its current diff.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Analysis chain

Script executed:

#!/bin/bash
set -euo pipefail
base=69295d87e4f5ecd14c3ed19b38ee423da471108e
head=8d8f6eb1ef31167bcc23b82d8f16e48d6ced2e0f
git rev-parse HEAD
git diff --stat "$base" "$head"
git diff --no-ext-diff "$base" "$head"
gh pr view 340 --repo RentnerKev/RentnerProxy --json title,body,headRefOid,baseRefOid
git diff --name-only "$base" "$head" | while IFS= read -r file; do
  printf '\n--- OUTLINE %s ---\n' "$file"
  ast-grep outline "$file" || true
done

Length of output: 10197


Script executed:

#!/bin/bash
set -euo pipefail
ast-grep outline docker/caddy/tooling/verify-buildinfo.sh || true
for file in docker/caddy/tooling/build.sh docker/caddy/tooling/verify-buildinfo.sh web/src/tests/tooling/github/caddy-build-script.test.ts web/src/tests/tooling/github/caddy-build.test.ts; do
  printf '\n--- %s ---\n' "$file"
  nl -ba "$file"
done
printf '\n--- Docker builder scopes ---\n'
sed -n '1,110p' docker/production/Dockerfile
sed -n '1,100p' docker/proxy-runtime/Dockerfile
printf '\n--- Selector references ---\n'
rg -n -C2 'CADDY_CROWDSEC_BOUNCER_(COMMIT|VERSION)|4a6ce1d3094d' .
printf '\n--- Public upstream module metadata ---\n'
for version in v0.14.2-0.20261030164527-4a6ce1d3094d v0.15.0 4a6ce1d3094dbfd270fecf2a91aaab81663d0cb4; do
  printf '\n%s\n' "$version"
  curl --fail --silent --show-error --max-time 25 "https://proxy.golang.org/github.com/hslatman/caddy-crowdsec-bouncer/@v/${version}.info" || true
  printf '\n'
done

Length of output: 42350


@RentnerKev I inspected all five changed files at 8d8f6eb1ef31167bcc23b82d8f16e48d6ced2e0f against 69295d87e4f5ecd14c3ed19b38ee423da471108e. I found no actionable correctness issue.

Verification

  • Module selector: The public Go proxy returns the exact requested pseudo-version without rewriting it. Its origin is commit 4a6ce1d3094dbfd270fecf2a91aaab81663d0cb4. Both v0.15.0 and the raw commit query resolve to that same commit, but the raw commit query now returns v0.15.0. This confirms the stated cause and supports the explicit pseudo-version fix.
  • Docker ARG contracts: Both Dockerfiles declare the same CADDY_CROWDSEC_BOUNCER_VERSION inside the caddy-build stage, before the shared build script runs. The script requires a nonempty value. Both test files use the new variable and exact selector.
  • Effective dependency verification: verify-buildinfo.sh is unchanged. It still checks the effective version after replacements and requires the reviewed pseudo-version. The added fixtures reject an effective v0.15.0 and accept v0.15.0 only when a same-module replacement supplies the reviewed pseudo-version. That acceptance case preserves the existing effective-version policy; it does not weaken it.
  • Other safeguards: The compiler check, dependency pins, go mod verify, response-cache tests, binary version check, and required-module checks remain unchanged.

PR title and description

The title, fix(build): preserve reviewed CrowdSec module version, matches the diff. The description correctly presents this as a bounded build correction, not a source revision upgrade. The five-file scope contains only the selector change and related contract tests.

Verification limit: I performed static inspection and public module-metadata checks. I did not rerun the fixtures or Docker build. Your reported test and build results remain separate evidence. Before merging, confirm that the required CI checks pass for this exact head.

You are interacting with an AI system.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🐳 RentnerProxy PR Preview

A test-only image for this pull request has been published successfully.

Images

Type Image
Moving preview for this PR ghcr.io/rentnerkev/rentnerproxy:pr-340
Exact tested build ghcr.io/rentnerkev/rentnerproxy:pr-340-5f4976212b08-41457334723-1

Image digest: sha256:df7c4a4a15b5b854e5546910ecf692279ee9723a82ef17e2b5233a1484332f44

Tested and built merge commit: 5f4976212b089fff30243959bcbe9a87810b9c8a

Pull request head commit: 8d8f6eb1ef31167bcc23b82d8f16e48d6ced2e0f

For reproducible testing and bug reports, prefer pr-340-5f4976212b08-41457334723-1. The pr-340 tag moves to the newest successful preview for this PR.


⚠️ Unreviewed development preview

This image contains unreviewed pull-request code. It may contain bugs, breaking changes, incomplete or incompatible migrations, configuration errors, and changes that damage data or runtime state.

Do not use this PR preview image with production data.

Before testing:

  1. Back up PostgreSQL.
  2. Back up the complete RentnerProxy controller/runtime state in /var/lib/rentnerproxy, including certificates, private keys, ACME state, active configuration, last-known-good state, and trusted CA material.
  3. Prefer a separate test database and separate Docker volumes.
  4. Use an isolated Docker Compose project and avoid production port bindings.

Docker

docker pull ghcr.io/rentnerkev/rentnerproxy:pr-340-5f4976212b08-41457334723-1

Docker Compose

In a separate test copy of docker-compose.yml, replace the service image with:

image: ghcr.io/rentnerkev/rentnerproxy:pr-340-5f4976212b08-41457334723-1

Then use an isolated Compose project:

docker compose --project-name rentnerproxy-pr-340 pull
docker compose --project-name rentnerproxy-pr-340 up -d

The repository Compose file binds ports 80, 81, and 443; change those bindings or stop the production stack before testing.

This preview is intended only for testing this pull request and is not a production release.

@RentnerKev
RentnerKev merged commit b78e8f1 into main Nov 2, 2026
32 checks passed
@RentnerKev
RentnerKev deleted the rentner/fix/crowdsec-module-pin branch November 2, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Continuous integration and GitHub automation. area: docker Docker images, Compose configuration, and deployment.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant