feat(core): let embedding executables own build identity

WI
8d ago
+640-195

Changing only a desktop release version currently recompiles the public node library and its private consumers. Add a library-only embedded-build-info mode so the executable owns version/revision stamping and Windows resources, while the heavy node library retains only stable code and compile-time site/scheme inputs.

The executable installs immutable BuildInfo before entering the core. version() and build_revision() feed CLI output, daemon status, user agents, and handshake metadata. Missing initialization fails; later replacement is rejected. Default standalone builds retain the existing constants and stamping. No site, scheme, branding, or runtime environment configuration is introduced.

A separate explicit test-build-info feature supplies deterministic identity only for downstream dev-dependencies. Production startup tests run without it. Both embedding features require disabling standalone production binaries.

Validation:

  • Default build metadata tests pass.
  • Strict embedded tests cover missing initialization, immutable installation, concurrent setters, and daemon version/revision reporting.
  • Fixture tests cover concurrent reads, explicit-first initialization, immutability, and ignored runtime environment values.
  • Actual build-script test proves embedded mode ignores release/Git/changelog/icon inputs while retaining site validation.
  • All integration-test targets compile/link with the fixture feature; independent review found no remaining blocker/major.
  • rustfmt, diff checks, and actionlint pass. CI includes strict embedding tests and full fixture-graph compilation.

An isolated desktop executable-package migration measured a version-only release rebuild dropping from 67.342s to 2.695s (final prototype; initial diagnostic run: 1.149s), with both node and private libraries Fresh and only the executable rebuilt. A revision-only change took 3.573s with the same library reuse. The binary reports the new compiled version, contains the new revision, and ignores a conflicting runtime version environment variable. This is a local macOS arm64 benchmark, not a hosted CI or end-to-end release result. It uses desktop review snapshot 17c4b47d and equivalent API changes applied to its pinned node source for a controlled comparison. Desktop adoption is coordinated with layered after the pending profile/core restructure lands; this PR alone does not change the desktop pin.


Agent Relay sessions

  • codex session 01a182e7 · opened via gh pr create · last active 2026-11-04