Skip to content

chore(ci): harden the build and release supply chain - #1631

Merged
FelixTJDietrich merged 3 commits into
mainfrom
production-readiness-holistic-refactor
Aug 30, 2026
Merged

chore(ci): harden the build and release supply chain#1631
FelixTJDietrich merged 3 commits into
mainfrom
production-readiness-holistic-refactor

Conversation

@FelixTJDietrich

@FelixTJDietrich FelixTJDietrich commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Brings the 1.0 build and release pipeline onto a coherent, immutable supply-chain baseline. This is not a mechanical Renovate roll-up: GitHub Action majors, Node runtime changes, workflow permissions, changed inputs, container manifests, buildpack order, Maven bootstrap integrity, release inventories, and the affected build paths were reviewed together.

Every third-party Action remains pinned to a complete executable commit SHA with an exact upstream version annotation. Container inputs are digest-pinned wherever the upstream supports immutable references. No compatibility branch, mutable fallback, warning suppression, or custom bootstrap implementation is retained.

The operator-facing application and deployment contract are unchanged. PostgreSQL server remains on 17; PostgreSQL 18 is intentionally excluded because it requires separate compatibility and migration work.

Fixes #1582

Outcome at a glance

Area Before This PR Result
GitHub Actions Older majors and patch pins 12 reviewed Action updates Full executable SHAs, exact tag comments, identical duplicate pins
Dockerfile frontend Mutable docker/dockerfile:1.4 / 1.7 1.26 at an OCI digest One immutable frontend across affected Dockerfiles
PostgreSQL image Mutable postgres:17-bookworm Same server/tag at an OCI digest Reproducible input without taking PostgreSQL 18
Paketo inputs Older builder, run-image, and health-checker digests Current tested digests Builder order and distroless health check preserved
Development NATS Mutable nats:alpine 2.14.6-alpine at an OCI digest Version and content are explicit
Release proxy inventory Traefik 3.7.4 3.7.11 at an OCI digest Release evidence matches the deployed tag
Maven bootstrap Takari Wrapper 0.5.6 plus custom downloader Apache Maven Wrapper 3.3.4 Native wrapper and distribution checksum enforcement
Changesets Action 1.9.0 / CLI 2.31.1 Action 2.1.1 / CLI 3.0.1 Current v2 workflow inputs; release ownership remains separate

GitHub Action inventory

All SHAs below were verified against upstream Git refs. Annotated tags use the peeled executable commit rather than the tag-object SHA.

Action Before This PR
marocchino/sticky-pull-request-comment 2.9.4 3.0.5
actions/upload-pages-artifact 3 5.0.0
actions/deploy-pages 4 5.0.0
github/codeql-action/upload-sarif 4 4.37.9
trufflesecurity/trufflehog 3.93.4 3.97.1
chromaui/action 11 18.7.1
Kesin11/actions-timeline 2 3.2.0
actions/labeler 5 7.0.0
actions/github-script 8 9.0.0
actions/attest 4.1.0 4.2.2
actions/attest-build-provenance 4.1.0 4.2.2
changesets/action 1.9.0 2.1.1

Compatibility and permission review

Area Review and result
Changesets v2 Migrated to version-script, pr-title, commit-message, and explicit github-token. The workflow only maintains the version PR; release.yml remains the single owner of tags, publication, and deployment.
Changesets permissions contents: write and pull-requests: write remain job-scoped; no repository-wide permission expansion was introduced.
GitHub Script 9 Uses the peeled v9.0.0 commit (3a2844…), not the annotated tag object. Existing scripts use supported APIs and outputs.
Pages 5 Artifact upload and deployment move together; existing Pages permissions and environment ownership are unchanged.
Labeler 7 Existing configuration path and label application contract are retained.
Attestations 4.2.2 Subject binding, package conversion, provenance inventory, and registry-side digest verification remain guarded by repository policy tests.
PR title validation The first hosted run exposed a pre-existing pnpm migration defect: pnpm run commitlint referenced a script that does not exist. This PR fixes the root cause by invoking the installed CLI with pnpm exec commitlint; the exact PR title passes locally.

Immutable container and release inputs

Input Selection in this PR Review result
Dockerfile frontend docker/dockerfile:1.26@sha256:ecfaec… Same digest in the agent and webapp Dockerfiles
PostgreSQL postgres:17-bookworm@sha256:051f7b… Multi-platform OCI index; server major stays 17
NATS nats:2.14.6-alpine@sha256:ad7a43… Multi-platform OCI index; no mutable shorthand remains
Traefik traefik:v3.7.11@sha256:5203c3… Release inventory tag and digest agree
Paketo builder builder-noble-java-tiny@sha256:3a9f6e… Digest refreshed without replacing the selected builder family
Paketo run image ubuntu-noble-run-tiny@sha256:c32333… Distroless runtime contract retained
Paketo health checker health-checker@sha256:7ef317… Explicitly appended after the builder Java composite so /workspace/health-check remains available

Each named container tag was resolved independently and its configured digest was confirmed to be the matching multi-platform OCI index rather than an accidental architecture-specific manifest.

Maven Wrapper migration

The obsolete Takari 0.5.6 bootstrap and checked-in MavenWrapperDownloader.java are removed. The repository now uses the upstream Apache Maven Wrapper 3.3.4 scripts and JAR with its native integrity controls:

Artifact Integrity control
Maven Wrapper 3.3.4 JAR wrapperSha256Sum matches the checked-in JAR
Apache Maven 3.9.16 distribution distributionSha256Sum matches the upstream ZIP
Wrapper and distribution URLs Immutable versioned Maven Central paths
Linux launcher Executes successfully under the supported JDK 21 environment
Windows launcher Upstream-generated script retained unchanged; hosted Windows execution is the authoritative proof

This removes custom download code rather than carrying it beside the wrapper's supported checksum mechanism.

Remaining dependency cleanup

Dependency Before This PR Reason
@changesets/cli 2.31.1 3.0.1 Paired with Changesets Action v2
fast-xml-parser ^5.11.0 5.11.0 Removes a mutable direct tooling range
@gitlab/svgs ^3.160.0 3.163.0 Exact current tested asset input; avoids an accidental downgrade

The remaining ranges in the web runtime belong to peer-sensitive UI packages such as dnd-kit, Monaco, and XYFlow. They are not mass-pinned here without concrete dashboard evidence; doing so would broaden this supply-chain PR into application dependency resolution work already owned by the web modernization stream.

Deliberate exclusions

Excluded work Why it is not in this PR
PostgreSQL server 18 Explicitly excluded by #1582; it needs compatibility and migration qualification rather than a base-image bump
Server framework dependencies Completed separately by #1586
Web runtime majors Completed separately by #1587
New local emulations of GitHub services Pages deployment, attestations, Changesets PR mutation, and registry publication are best exercised by hosted workflows with real GitHub credentials; bespoke simulations would be weaker test theatre
UI changes No UI behavior or component surface changes in this branch

Honest gaps and limitations

Gap Assessment
Hosted credential paths Local tests cannot prove GitHub Pages publication, attestation issuance, Changesets PR mutation, or registry publication. The real hosted workflows own that evidence.
Windows Maven Wrapper The upstream-generated mvnw.cmd is checksum-backed but was not executed locally; hosted Windows CI is the authoritative environment.
CodeRabbit review The service reported that review was rate-limited. This is not represented as a completed automated review.
Default-branch advisory GitHub reports one existing moderate Dependabot alert on main. This PR neither introduces nor claims to close that separate alert.

Verification

Local evidence

Gate Result
pnpm run format Pass
pnpm run check Pass
pnpm run verify Pass
Webapp unit suite 998 passed
Storybook browser suite 274 files / 1,634 tests passed
Server unit and architecture suite 7,106 passed; coverage floors met
Tooling and agent tests Pass
Webapp, Storybook, and docs production builds Pass
Actionlint across the workflow inventory Pass
Compose and release rendering Pass
Security mutation suite 392 mutants evaluated; 369 killed; 98% test strength
Agent, webapp, PostgreSQL, and Paketo application image builds Pass
Action tag/SHA audit 12 changed mappings verified; duplicate pins identical
Container tag/digest audit Docker frontend, PostgreSQL, NATS, Traefik, and Paketo inputs verified
Maven wrapper/distribution checksum audit Pass
PR title through pnpm exec commitlint Pass

The complete local verification emits existing React Compiler and test-environment warnings from unrelated webapp code, plus Git's expected CRLF normalization notice for the upstream-generated mvnw.cmd; none is hidden or caused by this supply-chain migration.

GitHub evidence

The initial hosted run immediately validated Changesets, Compose rendering, the docs preview build, Action CodeQL analysis, and repository automation. It also exposed the broken pnpm-era title command described above, which is now fixed at the root and pushed. The full hosted matrix is rerunning for the corrected head; this section will only claim a complete pass after GitHub reports it.

How to test manually

There is no UI behavior to exercise. Reviewer smoke tests should target the changed trust boundaries:

  1. Run cd server && ./mvnw --version; confirm Apache Maven 3.9.16 starts through Maven Wrapper 3.3.4 on JDK 21.
  2. Run printf '%s\n' 'chore(ci): harden the build and release supply chain' | pnpm exec commitlint; confirm the title passes.
  3. Render server/compose.yaml and the release Compose files; confirm every updated image resolves by digest and PostgreSQL remains on 17.
  4. Build the agent, webapp, PostgreSQL, and Paketo application images from a clean checkout.
  5. Inspect the GitHub Actions run and confirm Pages, attestations, Changesets verification, workflow syntax, security, image builds, and the final status gate pass on the corrected head.

Checklist

  • The empty changeset explains why no operator- or user-facing release note is needed.
  • No operator action, new required environment variable, manual migration, compatibility shim, mutable fallback, warning suppression, or custom bootstrap remains.
  • Every changed external Action is pinned to a full executable SHA with an exact version annotation.
  • Duplicate Action pins and release-image inventories are internally consistent.
  • PostgreSQL server 18 remains explicitly outside this change.
  • The corrected head has no merge conflicts and every required hosted check passes.

Summary by CodeRabbit

  • Documentation

    • Clarified Traefik version requirements for cookie path configuration.
  • Bug Fixes

    • Updated the bundled Traefik image to version 3.7.11.
    • Improved build and release reliability through checksum validation and pinned tooling.
  • Chores

    • Refreshed CI/CD, security scanning, container build, and Maven tooling.
    • Updated development tools and pinned dependency versions.
    • Removed obsolete Maven wrapper download code.

@FelixTJDietrich
FelixTJDietrich requested a review from a team as a code owner August 30, 2026 07:18
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 756490d8-a9d5-464b-a1c2-fce520391494

📥 Commits

Reviewing files that changed from the base of the PR and between 0af1846 and 5e52836.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • server/.mvn/wrapper/maven-wrapper.jar is excluded by !**/*.jar
📒 Files selected for processing (24)
  • .changeset/fair-falcons-attend.md
  • .github/workflows/cd-docs-teardown.yml
  • .github/workflows/cd-docs.yml
  • .github/workflows/ci-security-scan.yml
  • .github/workflows/ci-tests.yml
  • .github/workflows/cicd.yml
  • .github/workflows/cleanup-preview.yml
  • .github/workflows/deploy-preview.yml
  • .github/workflows/pull-request.yml
  • .github/workflows/release.yml
  • .github/workflows/reusable-docker-build.yml
  • .github/workflows/version-pr.yml
  • docker/agents/pi/Dockerfile
  • docs/contributor/unified-pi-runtime.mdx
  • package.json
  • security/release-images.json
  • server/.mvn/wrapper/MavenWrapperDownloader.java
  • server/.mvn/wrapper/maven-wrapper.properties
  • server/application/pom.xml
  • server/compose.yaml
  • server/mvnw
  • server/mvnw.cmd
  • webapp/Dockerfile
  • webapp/package.json
💤 Files with no reviewable changes (1)
  • server/.mvn/wrapper/MavenWrapperDownloader.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates CI action pins, migrates the Maven Wrapper to 3.3.4, refreshes container and build inputs, pins development dependencies, and updates related documentation.

Changes

Supply-chain and build updates

Layer / File(s) Summary
CI action and release workflow updates
.github/workflows/*
GitHub Actions were upgraded to newer immutable commit pins. The Changesets action inputs and token wiring were updated for its new interface.
Maven Wrapper 3.3.4 migration
server/.mvn/wrapper/*, server/mvnw, server/mvnw.cmd
The Maven Wrapper moved to Apache Maven Wrapper 3.3.4. The scripts now support authenticated downloads and SHA-256 validation.
Container and dependency pin updates
docker/agents/pi/Dockerfile, webapp/Dockerfile, server/application/pom.xml, server/compose.yaml, security/release-images.json, package.json, webapp/package.json, docs/contributor/unified-pi-runtime.mdx, .changeset/*
Dockerfile frontends, container images, Paketo inputs, and development dependencies were refreshed or pinned. Related documentation and release metadata were updated.

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

Merge Risk: ⚪ Minimal · up to 5e528

This PR hardens CI and release inputs through immutable action, container, and build-tool versions without changing the application or deployment contract. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The changes address the linked issue through pinned Action upgrades, container and Paketo digest updates, Maven Wrapper 3.3.4 migration, dependency updates, and obsolete bootstrap removal. Full compli… Include pnpm-lock.yaml and server/.mvn/wrapper/maven-wrapper.jar in the review, or provide equivalent evidence that the lockfile matches package.json and that the Maven Wrapper 3.3.4 JAR matches the configured checksum.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: hardening the CI, build, and release supply chain.
Out of Scope Changes check ✅ Passed The reviewed changes are related to the linked supply-chain hardening objective. The documentation, changeset, workflow, image, dependency, and Maven Wrapper updates support the stated scope, and no u…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The changes address the linked issue through pinned Action upgrades, container and Paketo digest updates, Maven Wrapper 3.3.4 migration, dependency updates, and obsolete bootstrap removal. Full compliance cannot be verified because pnpm-lock.yaml and maven-wrapper.jar were excluded from review, so dependency-lock consistency and wrapper artifact integrity are not observable.

Full details: Out of Scope Changes check

Explanation

The reviewed changes are related to the linked supply-chain hardening objective. The documentation, changeset, workflow, image, dependency, and Maven Wrapper updates support the stated scope, and no unrelated code changes are evident.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (23 skipped: 23 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch production-readiness-holistic-refactor

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

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

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Preview

Preview has been removed (PR closed)

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🧩 Storybook Preview

Preview has been removed (PR closed)

@FelixTJDietrich
FelixTJDietrich force-pushed the production-readiness-holistic-refactor branch 2 times, most recently from 823a315 to 1950435 Compare August 30, 2026 10:00
FelixTJDietrich and others added 3 commits August 30, 2026 13:09
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A digest on the parameterized FROM made Docker resolve the PostgreSQL 18
index regardless of PG_MAJOR, so the upgrade drill's 17 source container
booted an 18 server and never became ready. Digest-pinning this base
needs drill-aware plumbing and belongs to the database stream.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@FelixTJDietrich
FelixTJDietrich force-pushed the production-readiness-holistic-refactor branch from 1950435 to 5e52836 Compare August 30, 2026 11:11
@FelixTJDietrich
FelixTJDietrich added this pull request to the merge queue Aug 30, 2026
Merged via the queue into main with commit dac03b2 Aug 30, 2026
52 checks passed
@FelixTJDietrich
FelixTJDietrich deleted the production-readiness-holistic-refactor branch August 30, 2026 11:42
@github-project-automation github-project-automation Bot moved this to Backlog in Hephaestus Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

chore(ci): update and harden the 1.0 build and release supply chain

1 participant