Skip to content

deps: bump radiance for build stamping + jsDelivr config mirror - #8928

Merged
myleshorton merged 3 commits into
mainfrom
fisk/bump-radiance-build-stamp
Jul 25, 2026
Merged

deps: bump radiance for build stamping + jsDelivr config mirror#8928
myleshorton merged 3 commits into
mainfrom
fisk/bump-radiance-build-stamp

Conversation

@myleshorton

@myleshorton myleshorton commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What

  • Bump radiance eea72f0584a056 (latest main), picking up:
    • radiance#556 — stamp build time + commit; log build identity and the linked versions of every getlantern/* dep (plus sing-box) at Info in every build, with replace directives surfaced. A shipped binary is now self-describing in logs.
    • radiance#575 — race a jsDelivr mirror for fronted.yaml.gz; raw.githubusercontent.com is blocked in China, and jsDelivr is served from a non-getlantern mirror account since jsDelivr bans the getlantern org.
  • Makefile: inject the new common.BuildTime (UTC RFC3339) and common.Commit (short rev) ldflags — the lantern-side half of radiance#556. Verified the resolved flags:
    -X '...common.Version=9.1.18-13f9212-20260725T142515Z' -X '...common.BuildTime=2026-07-25T14:25:15Z' -X '...common.Commit=13f92127f'
    

Why

A 9.1.14 iOS TestFlight build shipped a pre-fix keepcurrent despite go.mod declaring the fixed version, and nothing in the logs revealed it. With this bump every build logs what was actually linked, so a stale-cache build is visible in the first lines of any user log instead of silent.

go mod tidy run; go.mod and go.sum committed together.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Build artifacts now include build timestamp and source revision metadata alongside the application version, improving release traceability.
    • Updated the Radiance library dependency to a newer revision.

Picks up radiance#556 (log build identity + linked getlantern dep versions
in every build) and radiance#575 (race a jsDelivr mirror for fronted.yaml.gz,
reachable from China where raw.githubusercontent.com is blocked).

Injects the new common.BuildTime / common.Commit ldflags from the Makefile —
the lantern-side half of radiance#556.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 14:25
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e345891f-a07c-460d-90c2-cc09a3dcfbd0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Radiance dependency is updated in go.mod. The Makefile adds UTC build-time and short commit variables, then injects them alongside the existing version into Radiance linker metadata.

Changes

Radiance build metadata

Layer / File(s) Summary
Radiance dependency and build stamping
go.mod, Makefile
The Radiance module is updated, and Makefile linker flags now set common.BuildTime and common.Commit alongside common.Version.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: a radiance dependency bump and build-time stamping updates.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fisk/bump-radiance-build-stamp

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.

@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: 1

🤖 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 `@Makefile`:
- Around line 75-80: Make BUILD_TIME generation in the Makefile compatible with
OS=Windows_NT while preserving the existing UTC RFC3339 timestamp format for
non-Windows builds. Use the Windows-specific timestamp command in the BUILD_TIME
assignment, leaving GIT_REVISION and EXTRA_LDFLAGS behavior unchanged.
🪄 Autofix (Beta)

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: 441c6a67-d0cb-4a5a-b8b2-f4b4faaf0eda

📥 Commits

Reviewing files that changed from the base of the PR and between 13f9212 and a4987f2.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • Makefile
  • go.mod

Comment thread Makefile

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the github.com/getlantern/radiance dependency to a newer main commit and updates Lantern’s build/linker flags so Radiance can log build identity (version + build time + commit) at startup, making shipped binaries self-describing in logs.

Changes:

  • Bump github.com/getlantern/radiance to v0.0.0-20260725142156-584a0568abac.
  • Stamp build time (UTC RFC3339) and commit (short SHA) into Radiance via new -ldflags -X values in the Makefile.
  • Commit accompanying go.sum updates from go mod tidy.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
Makefile Adds build-time and commit stamping via EXTRA_LDFLAGS for Radiance startup identity logging.
go.mod Bumps Radiance module version to the new pseudo-version.
go.sum Updates checksums for the new Radiance pseudo-version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile Outdated
- BUILD_TIME: date -u is POSIX and doesn't work under the cmd.exe shell
  make uses on Windows_NT (where recipes already rely on powershell), so
  Windows artifacts would stamp an empty common.BuildTime. Branch on
  OS=Windows_NT and use powershell, matching the existing Windows handling
  for APP_VERSION and the file ops.
- GIT_REVISION: pin git rev-parse --short=7 (as scripts/ci/version.sh
  already does) so common.Commit length is stable regardless of the repo's
  core.abbrev.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 14:49
@myleshorton

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

Comment thread Makefile Outdated
Comment thread Makefile
BUILD_TIME := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
endif
GIT_REVISION := $(shell git rev-parse --short=7 HEAD)
EXTRA_LDFLAGS ?= -X '$(RADIANCE_REPO)/common.Version=$(APP_VERSION_PUBSPEC)' -X '$(RADIANCE_REPO)/common.BuildTime=$(BUILD_TIME)' -X '$(RADIANCE_REPO)/common.Commit=$(GIT_REVISION)'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Leaving this for @myleshorton to decide rather than changing it here — it's not an active bug and the fix changes the intended override semantics. Nothing in the repo, workflows, or scripts sets EXTRA_LDFLAGS today (the only reference is this ?= line), so the stamp flags are always applied in every current build path. The ?= is a deliberate full-override idiom; splitting mandatory stamp flags from optional extras (always including the stamps, appending extras) is a reasonable hardening toward the self-describing-binary goal, but it removes a caller's ability to fully suppress the stamps — a design call that's yours to make. Leaving this thread open for your input.

git rev-parse yields an empty string in a source tree with no .git,
producing an empty common.Commit and dropping the build-identity signal.
Fall back to "unknown" via $(or ...). Pure-make so it works under both the
cmd.exe and POSIX shells the Makefile targets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

@myleshorton
myleshorton requested a review from Copilot July 25, 2026 14:57
@myleshorton

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Comment thread Makefile
Comment on lines +78 to +87
ifeq ($(OS),Windows_NT)
BUILD_TIME := $(shell powershell -NoProfile -ExecutionPolicy Bypass -Command "[DateTime]::UtcNow.ToString('yyyy-MM-ddTHH:mm:ssZ')")
else
BUILD_TIME := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
endif
## Fall back to a sentinel so common.Commit is never empty (e.g. a build from a
## source tree with no .git); an empty -X value would drop the build-identity
## signal from logs.
GIT_REVISION := $(or $(strip $(shell git rev-parse --short=7 HEAD)),unknown)
EXTRA_LDFLAGS ?= -X '$(RADIANCE_REPO)/common.Version=$(APP_VERSION_PUBSPEC)' -X '$(RADIANCE_REPO)/common.BuildTime=$(BUILD_TIME)' -X '$(RADIANCE_REPO)/common.Commit=$(GIT_REVISION)'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Leaving this for @myleshorton — it's cosmetic and doesn't occur in any lantern build path. Every lantern build (CI and local) runs from a git checkout at the repo root, so git rev-parse succeeds and writes only the SHA to stdout; the fatal stderr line only appears in a no-.git tree, which we don't build from. The value is already safely unknown in that case.

Worth noting there's no git-native way to silence it: git rev-parse --verify --quiet suppresses ref-resolution errors but not "fatal: not a git repository", which comes from repo discovery before that flag applies (verified). So the redirect has to be OS-branched (2>/dev/null vs 2>NUL) since the Makefile targets both the POSIX and cmd.exe shells — machinery for a case that can't happen here.

If you do want to harden it, the clean cross-platform option is a pure-make guard that skips git entirely when there's no repo:
GIT_REVISION := $(if $(wildcard .git),$(or $(strip $(shell git rev-parse --short=7 HEAD)),unknown),unknown)
(caveat: assumes make runs from the repo root, which the Makefile already assumes for pubspec.yaml/version.sh). Your call — leaving the thread open.

@myleshorton
myleshorton merged commit 444c139 into main Jul 25, 2026
12 checks passed
@myleshorton
myleshorton deleted the fisk/bump-radiance-build-stamp branch July 25, 2026 15:03
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.

2 participants