Skip to content

fix: wire BUILD_IROH_SERVICES_API_KEY into bundle and release workflows#149

Open
zachsmith1 wants to merge 2 commits intomainfrom
fix/wire-iroh-services-api-key
Open

fix: wire BUILD_IROH_SERVICES_API_KEY into bundle and release workflows#149
zachsmith1 wants to merge 2 commits intomainfrom
fix/wire-iroh-services-api-key

Conversation

@zachsmith1
Copy link
Copy Markdown
Contributor

@zachsmith1 zachsmith1 commented Apr 28, 2026

Summary

  • Map the BUILD_IROH_SERVICES_API_KEY GitHub repo secret into the build env in both bundle.yml and manual-release.yml, alongside the other BUILD_* secrets.
  • Without this, option_env!(\"BUILD_IROH_SERVICES_API_KEY\") in lib/src/diagnostics.rs:42 resolves to None at compile time, so released apps log Net diagnostics disabled: IROH_SERVICES_API_KEY not set on launch and net diagnostics never start unless the user manually exports the runtime env var.

Test plan

  • Trigger a bundle workflow run on this branch and confirm the build env contains BUILD_IROH_SERVICES_API_KEY (no value will be printed since it's a secret, but the step should not fail).
  • After the next release, install the app and confirm ~/Library/Application Support/Datum/ui.log shows connecting to iroh-services for net diagnostics and Granted NetDiagnosticsCap::GetAny to iroh-services on launch (rather than the "disabled" line).


env:
BUILD_N0DES_API_SECRET: ${{ secrets.N0DES_API_SECRET }}
BUILD_IROH_SERVICES_API_KEY: ${{ secrets.BUILD_IROH_SERVICES_API_KEY }}
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.

What does this API key have access to? Just publishing telemetry?

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.

@Frando do you have a good answer here? from what i can tell there is no fine grained access we can associate with these tokens

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.

@Frando Any thoughts?

The diagnostics module reads BUILD_IROH_SERVICES_API_KEY via option_env!()
at compile time as a fallback when the runtime IROH_SERVICES_API_KEY isn't
set, but neither workflow exported the secret to the build env, so released
apps shipped without a key baked in and logged "Net diagnostics disabled:
IROH_SERVICES_API_KEY not set" on launch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zachsmith1 zachsmith1 force-pushed the fix/wire-iroh-services-api-key branch from 3b7e6b8 to 86dc324 Compare April 28, 2026 16:48
The dep was declared with a bare git URL and no rev pin. Combined with
bundle CI's `cargo generate-lockfile` step (which discards the committed
lockfile before `dx bundle --locked`), every CI run resolved upstream
HEAD. Upstream just landed a Select API change (`value` is now
`Option<ReadSignal<Option<T>>>` and `placeholder` was removed), breaking
the bundle build with no source changes on our side.

Pin to ffbc750 (the rev currently in Cargo.lock and the last known to
build cleanly), matching the same approach used for the recent pkcs8
pin. Bumps should be deliberate going forward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@drewr drewr self-assigned this May 8, 2026
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.

3 participants