Repository navigation
fix(ci): ship every Swift runtime library SwiftLint links in ci-base - #5538
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
f7216e1 to
92780f3
Compare
Why: Maintenance pipeline 20708 (ci-images stream, blocked since 2026-11-29) failed building docker.io/shepherdjerred/ci-base. After #5389 refreshed the toolchain pins, the swiftlint-runtime stage exited 127: `/opt/swiftlint/bin/swiftlint: error while loading shared libraries: libswiftObservation.so: cannot open shared object file`. The explicit runtime-libraries.txt list had no entry for it, and nothing caught the gap until the minimal runtime image ran the binary. What: - Add libswiftObservation.so and lib_CompilerSwiftWarningControl.so (also linked by the shipped Swift compiler libraries) to runtime-libraries.txt. - Add verify-runtime-libraries.py, run in the builder stage right after the libraries are copied. It reads DT_NEEDED with readelf for the swiftlint binary and every shipped library and fails, printing the exact lines to add, when any Swift toolchain library under /usr/lib/swift (transitively) is linked but not shipped. It runs after the compile layer, so the registry cache for the 10 minute compile is unaffected. - Add a fake-readelf boundary test (accepted, unshipped, transitive) wired into toolchain.test.sh, and register the new inputs in the ci-base fingerprint, bootstrap.sh and script-migrations.json. The version and capability checks in the runtime stage are unchanged. Verification: - Real swift:6.4.3-jammy builder on OrbStack: the new check on the old list fails naming both missing libraries; with the fix it passes. - `docker buildx build --target swiftlint-runtime` succeeds, including the verify-capabilities RUN step, and `swiftlint --version` prints 0.65.1. The local tags were deleted afterwards. - bash ci/scripts/toolchain.test.sh, bun test build-ci-image.test.ts and renovate-mirrored-pins.test.ts pass; turbo jscpd quality-ratchet knip --filter=// pass. - Not run: the full ci-base build in Woodpecker (maintenance retry follows the merge) and the extended tier (no affected workspace has extended steps). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
92780f3 to
b1eeb0c
Compare
|
@codex review Automated re-review request for |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why Woodpecker starts a manual pipeline at main's tip, and the config extension checks out the request's declared verified source (`CI_MAINTENANCE_SOURCE`, `CI_EXTENDED_SOURCE`) in its place. Every command still saw Woodpecker's `CI_COMMIT_SHA`, the tip. Maintenance pipeline #21090 cloned 133b052 (the coordinator's verified source, #5545) while its bootstrap diagnostic, `toolkit ci maintenance` and any image pin reported e8471e9 (#5538). The current ci-base and ci-playwright pins record sourceCommit f69a23f although #19963 built e192613. Push and pull-request pipelines never differed. What - Every emitted command container sets `CI_COMMIT_SHA` to the commit its workflow checks out. Step environment overrides Woodpecker's metadata, so builds, pins and diagnostics name the built commit. Push and PR values are unchanged because their checkout commit is Woodpecker's. - The source-cache clone keeps Woodpecker's value and fails unless its commit is that `CI_COMMIT_SHA` or a declared request source. - `toolkit ci maintenance` reports the declared source a run built as `source`, and Woodpecker's tip as `woodpeckerCommit`. Verification - New tests: the clone check (`test/checkout/declared.test.ts`), a #21090 replay through the signed HTTP app, every emitted command's `CI_COMMIT_SHA`, and the toolkit's reported source. The extension tests fail without the environment change. - `bunx turbo run typecheck lint test` for the extension and toolkit, root `jscpd quality-ratchet knip`, and `bunx lefthook run pre-commit` pass. - Not run: a live maintenance pipeline on the new extension image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why Woodpecker starts a manual pipeline at main's tip, and the config extension checks out the request's declared verified source (`CI_MAINTENANCE_SOURCE`, `CI_EXTENDED_SOURCE`) in its place. Every command still saw Woodpecker's `CI_COMMIT_SHA`, the tip. Maintenance pipeline #21090 cloned 133b052 (the coordinator's verified source, #5545) while its bootstrap diagnostic, `toolkit ci maintenance` and any image pin reported e8471e9 (#5538). The current ci-base and ci-playwright pins record sourceCommit f69a23f although #19963 built e192613. Push and pull-request pipelines never differed. What - Every emitted command container sets `CI_COMMIT_SHA` to the commit its workflow checks out. Step environment overrides Woodpecker's metadata, so builds, pins and diagnostics name the built commit. Push and PR values are unchanged because their checkout commit is Woodpecker's. - The source-cache clone keeps Woodpecker's value and fails unless its commit is that `CI_COMMIT_SHA` or a declared request source. - `toolkit ci maintenance` reports the declared source a run built as `source`, and Woodpecker's tip as `woodpeckerCommit`. Verification - New tests: the clone check (`test/checkout/declared.test.ts`), a #21090 replay through the signed HTTP app, every emitted command's `CI_COMMIT_SHA`, and the toolkit's reported source. The extension tests fail without the environment change. - `bunx turbo run typecheck lint test` for the extension and toolkit, root `jscpd quality-ratchet knip`, and `bunx lefthook run pre-commit` pass. - Not run: a live maintenance pipeline on the new extension image. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Why
Maintenance pipeline 20708 (the
ci-imagesstream, blocked since 2026-11-29) fails buildingdocker.io/shepherdjerred/ci-base. After #5389 refreshed the toolchain pins, swiftlint linkslibswiftObservation.so, whichci/scripts/swiftlint/runtime-libraries.txtdoes not ship, so theswiftlint-runtimestage's version/capability check exits 127. Nothing caught the gap before the minimal runtime image ran the binary.What
libswiftObservation.soandlib_CompilerSwiftWarningControl.so(also linked by the shipped Swift compiler libraries) toruntime-libraries.txt.verify-runtime-libraries.py, run in the builder stage right after the libraries are copied. It readsDT_NEEDEDwithreadelffor the swiftlint binary and every shipped library, and fails (printing the exact lines to add) when any Swift toolchain library under/usr/lib/swift, transitively, is linked but not shipped. It sits after the compile layer, so the cached 10 minute compile is unaffected.readelfboundary test (accepted, unshipped, transitive), wired intotoolchain.test.sh, and register the new inputs in the ci-base fingerprint,bootstrap.shandscript-migrations.json.Demo
Before (CI pipeline 20708, step 5):
The new check against the real
swift:6.4.3-jammybuilder with the old list (it now names the gap one stage earlier, including the transitive library):After (
docker buildx build -f ci/ci-image/Dockerfile --target swiftlint-runtime, OrbStack, exit 0):Verification
swiftlint-runtimetarget build passes (above); the local image tags were deleted afterwards.bash ci/scripts/toolchain.test.sh(includes the new three-case test),bun test ci/scripts/images/build-ci-image.test.ts scripts/renovate-mirrored-pins.test.ts(20 pass),bunx turbo run jscpd quality-ratchet knip --filter=//pass; full lefthook pre-commit passed.🤖 Generated with Claude Code