Skip to content

feat: stamp build identity into every target - #667

Draft
Alex Shabalin (alex-sparus) wants to merge 1 commit into
alex/fix-helper-c2.1from
alex/fix-helper-build-id
Draft

feat: stamp build identity into every target#667
Alex Shabalin (alex-sparus) wants to merge 1 commit into
alex/fix-helper-c2.1from
alex/fix-helper-build-id

Conversation

@alex-sparus

@alex-sparus Alex Shabalin (alex-sparus) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Problem: helper upgrades hinge on exact build identity — activation is admitted only between binaries of the same build, and a GUI whose bundle was replaced underneath it must notice and stop mutating — but no binary or bundle could say which build it came from, and nothing distinguished a canonical /Applications install from a displaced copy.

Solution: one NIXMAC_BUILD_ID resolution in build.rs feeds both the compiled constant in every target and the stamped Info.plist (now generated from a template), so running-vs-on-disk comparison is possible. Packaged builds fail without a CI-supplied ID; dev builds fall back to a fixed literal. install_location supplies the canonical-install verdict the later gates consume.

First PR of the helper-redesign stack (#667#668#669#670).

Test Plan

  • cargo test green across all targets (build-ID resolution and install-location judgment covered by unit tests)
  • CI gains a macOS cargo test -p nixmac job so the cfg(macos) helper coverage actually executes

Docs

  • No docs update needed

Prior review

Every file in this PR is byte-identical to content Scott already approved in the closed drain-era stack: build.rs/build_id.rs/Cargo plumbing in #619 and #620, install_location.rs in #635, Info.template.plist/tauri.conf.json/settings in #620. This PR is a re-cut of that reviewed work onto the new stack; nothing changed but the commit story.

@alex-sparus

Alex Shabalin (alex-sparus) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by jj-ryu.

@darkmatter

darkmatter Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🎨 Storybook preview

Open Storybook preview

Updated for 93a823b


⚠️ Detected UI changes (5)

These stories' HTML snapshots changed. I've added screenshots + links to the changed stories below. Review them carefully then accept the changes to regenerate baselines and include them in this PR:

Flows/Evolve › Playground

Flows/Evolve › Playground

Flows/Evolve › 1. Begin (idle)

Flows/Evolve › 1. Begin (idle)

Flows/Evolve › 2. Evolving (progress)

Flows/Evolve › 2. Evolving (progress)

Flows/Evolve › Evolving With Error Event

Flows/Evolve › Evolving With Error Event

Flows/Evolve › 3. Review (changes generated)

Flows/Evolve › 3. Review (changes generated)


Accept UI changes

  • Click here to accept these changes

Alternatively, you can run bun run test:update-snapshots locally to re-generate the baselines and then push the changes to this PR.

What does this do?

The screenshots above show UI changes detected by the Storybook
snapshot tests run on this PR. Each image is the rendered output of
a Storybook story from the code in this PR branch; the snapshot
test compared it against the committed baseline in
__snapshots__/ and flagged the difference.

Checking the box tells the darkmatter[bot] to regenerate the
baselines from this PR's current code and commit them directly to
this branch. The new baselines become the source of truth for
future runs — only accept after confirming the visual changes are
intentional.

Comparison baseline: the committed __snapshots__/ files on this
PR branch (carried forward from develop). Accept updates them in
place on this branch.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

No Linear issue ID found in this PR's title, description, or branch name (expected something like ENG-123). Add one so this work is traceable in Linear, or add #no-linear to the PR description to acknowledge it's intentionally untracked.

⚠️ PR is marked WIP / draft — do not merge until ready for review.
Messages
📖

🤖 This PR touches CI / infra — reviewers please pay extra attention:

  • .github/workflows/build.yaml

📋 PR Overview

Lines changed 626 (+589 / -37)
Files 1 added, 6 modified, 0 deleted
Draft / WIP yes
Has Test Plan yes
Linear issue no
No Test Plan Needed no
New UI components no
New Storybook stories no
New Rust modules yes (1)
New TS source files no
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched yes

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 35.6% 35.2% 30.5% 29.5%

Generated by 🚫 dangerJS against 93a823b

Problem: helper upgrades hinge on exact build identity — activation is
admitted only between binaries of the same build, and a GUI whose
bundle was replaced underneath it must notice and stop mutating — but
no binary or bundle could say which build it came from, and nothing
distinguished a canonical /Applications install from a displaced copy.

Solution: one NIXMAC_BUILD_ID resolution in build.rs feeds both the
compiled constant in every target and the stamped Info.plist (now
generated from a template), making running-vs-on-disk comparison
possible. Packaged builds fail without a CI-supplied ID; dev builds
fall back to a fixed literal. install_location supplies the
canonical-install verdict the same gates consume.
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