Skip to content

fix(registry): suppress X-Nono-UUID when update check is opted out - #1508

Merged
SequeI merged 1 commit into
nolabs-ai:mainfrom
scp7:fix/1507-registry-uuid-optout
Jul 27, 2026
Merged

fix(registry): suppress X-Nono-UUID when update check is opted out#1508
SequeI merged 1 commit into
nolabs-ai:mainfrom
scp7:fix/1507-registry-uuid-optout

Conversation

@scp7

@scp7 scp7 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1507.

Registry requests to registry.nono.sh continued to send the persistent installation identifier X-Nono-UUID even after the user opted out of the update check, whenever the update-check state file already existed on disk (the default after the first nono run). The opt-out (NONO_NO_UPDATE_CHECK / [updates] check = false) gated only the update.nono.sh ping, not the registry header, so the documented opt-out was inaccurate in the common case.

Approach

  • Added a single authoritative opt-out predicate update_check_opted_out() in crates/nono-cli/src/update_check.rs (env NONO_NO_UPDATE_CHECK presence — any value — or config [updates] check = false).
  • Routed start_background_check() through it (behaviour-preserving).
  • Gated read_installation_uuid() on the predicate — it now returns None when opted out, suppressing X-Nono-UUID at the source for every consumer, even if a state file was written on an earlier run. The state file is intentionally not deleted (transmission stops; users still remove the file to erase the on-disk UUID).
  • De-duplicated pack_update_hint::is_opted_out() to reuse the shared predicate.
  • Corrected the header doc comment in registry_client.rs.

The coarse fingerprinting headers (X-Nono-Platform/Arch/CI/Install-Source) are intentionally out of scope — they remain gated by the separately-tracked master telemetry switch. This change is limited to the persistent identifier.

Tests

  • update_check::test_read_installation_uuid_respects_opt_out — reader returns the UUID when opted in; None under both the env-var and config opt-outs; state file left on disk.
  • registry_client::context_headers_gate_uuid_on_opt_outX-Nono-UUID present when opted in, absent when opted out, while X-Nono-Platform/X-Nono-Install-Source remain (pins the scope boundary).

Both tests are hermetic (serialized on ENV_LOCK, all env vars guard-managed, isolated temp HOME/XDG_STATE_HOME/XDG_CONFIG_HOME). make ci is clean locally.

Files consulted

crates/nono-cli/src/update_check.rs, crates/nono-cli/src/registry_client.rs, crates/nono-cli/src/pack_update_hint.rs, crates/nono-cli/src/config/user.rs, crates/nono-cli/src/state_paths.rs, crates/nono-cli/src/config/mod.rs, crates/nono-cli/src/test_env.rs.

Contributor disclosure

This PR was prepared by an AI-assisted contributor at the request of the maintainer, following the repository Coding Agent Contribution Policy (issue filed and disclosed before any code change).

Agent Compliance Check

  • I am not prohibited from contributing under this policy
  • An issue already exists (Registry requests still send X-Nono-UUID after update-check opt-out #1507)
  • I described my intent and approach in the issue discussion
  • I reviewed repository coding and security rules for the affected area
  • I provided required attribution for reused or adapted code
  • I did not use forbidden unwrap/expect in production code (test code uses .expect() consistent with the repo's existing test convention; clippy::unwrap_used passes under make ci)
  • I used NonoError where required
  • I validated and canonicalized all relevant paths
  • This PR matches the approved or disclosed issue scope

read_installation_uuid() returned the persisted installation UUID
whenever the state file existed, so registry.nono.sh requests kept
sending the X-Nono-UUID identifier even after the user opted out via
NONO_NO_UPDATE_CHECK or [updates] check = false. Because the first
run writes the state file before any opt-out can take effect, this made
the documented opt-out inaccurate in the common case.

Add a single authoritative update_check_opted_out() predicate and gate
read_installation_uuid() on it, so the persistent identifier is
suppressed at the source for every consumer. Route start_background_check()
and pack_update_hint::is_opted_out() through the same predicate to remove
duplicated opt-out logic. The coarse platform/arch/CI/install-source
headers are intentionally out of scope, and the on-disk state file is
left untouched (transmission stops; users still delete the file to remove
the stored UUID).

Fixes nolabs-ai#1507

Signed-off-by: Stephen Parkinson <scparkinson@gmail.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added bug Something isn't working nono-cli size/medium labels Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Summary

Size

Metric Value
Lines added +167
Lines removed -19
Total changed 186
Classification Medium (50–300 lines)

Affected crates

  • crates/nono-cli — CLI changes. Verify argument parsing, flag documentation, and UX behaviour across supported platforms.

Blast radius — Contained

This PR touches: source code


Updated automatically on each push to this PR.

@nogent-nolabs-ai nogent-nolabs-ai 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.

nogent code review

No blocking issues; 0 suggestions.

Findings: none flagged in scope.

Automated code + security review. CI already covers clippy, rustfmt, tests, cargo-audit and commit-lint.

@scp7
scp7 requested a review from SequeI July 27, 2026 12:02

@SequeI SequeI left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm!

@SequeI
SequeI merged commit 00be31e into nolabs-ai:main Jul 27, 2026
17 checks passed
@scp7
scp7 deleted the fix/1507-registry-uuid-optout branch July 27, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nono-cli size/medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Registry requests still send X-Nono-UUID after update-check opt-out

2 participants