Skip to content

feat(update-check): discover ci environments on update - #1113

Merged
SequeI merged 3 commits into
mainfrom
update-type
Jun 18, 2026
Merged

feat(update-check): discover ci environments on update#1113
SequeI merged 3 commits into
mainfrom
update-type

Conversation

@lukehinds

Copy link
Copy Markdown
Contributor

Provide improved classification of nono running in a CI environment. This helps us understand how nono well is (or is not) set to run recent versions in automated workflows versus local development.

  • Detection relies solely on well-known environment variable names (e.g., GITHUB_ACTIONS, CI).
  • Raw environment variable values are never collected or transmitted.
  • The update service's privacy assurances remain unchanged: no personally identifiable information is collected. Can be opt out of.
  • Updated the test-update-server.py script to log the new CI fields.

Signed-off-by: Luke Hinds lukehinds@gmail.com

lukehinds added 2 commits June 9, 2026 17:49
The update check now includes a coarse classification of the CI environment.
This helps us understand how nono well (or not) recent versions are used in automated
workflows versus local development.

- Detection relies solely on well-known environment variable names (e.g., GITHUB_ACTIONS, CI).
- Raw environment variable values are never collected or transmitted.
- The update service's privacy assurances remain unchanged: no personally identifiable information is collected.
- Updated the `test-update-server.py` script to log the new CI fields.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
The `CiEnvironment` struct has been removed to streamline the representation of CI detection.

The `detect_ci_environment` function has been renamed to `detect_ci_provider` and now directly returns an `Option<&'static str>` representing the detected CI provider. This simplifies the API by removing the need for an explicit `is_ci` boolean, as its presence can be inferred from `ci_provider.is_some()`.

New tests have been added to:
- Ensure that environment variables with "falsey" values (e.g., empty string, "0") do not inadvertently trigger CI detection.
- Validate that no CI is detected when no relevant environment variables are present.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Size

Metric Value
Lines added +197
Lines removed -4
Total changed 201
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.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds CI environment classification to the update check request, allowing the CLI to detect and report the CI provider (e.g., GitHub Actions, GitLab CI, etc.) using environment variables. It also updates the local test update server and adds comprehensive unit tests. The review feedback suggests simplifying the env_marker_present helper function by using std::env::var directly instead of std::env::var_os and to_string_lossy(), and recommends treating additional values like "off" and "no" as falsey to improve robustness.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/nono-cli/src/update_check.rs
@scp7

scp7 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Looks good to me, just need to resolve the gemini recommendation

@SequeI
SequeI merged commit cc11b38 into main Jun 18, 2026
15 checks passed
oscarmackjr-twg pushed a commit to OscarMackJr/nono that referenced this pull request Jun 23, 2026
* feat(update-check): discover ci environments on update

The update check now includes a coarse classification of the CI environment.
This helps us understand how nono well (or not) recent versions are used in automated
workflows versus local development.

- Detection relies solely on well-known environment variable names (e.g., GITHUB_ACTIONS, CI).
- Raw environment variable values are never collected or transmitted.
- The update service's privacy assurances remain unchanged: no personally identifiable information is collected.
- Updated the `test-update-server.py` script to log the new CI fields.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

* refactor(update_check): simplify ci environment detection

The `CiEnvironment` struct has been removed to streamline the representation of CI detection.

The `detect_ci_environment` function has been renamed to `detect_ci_provider` and now directly returns an `Option<&'static str>` representing the detected CI provider. This simplifies the API by removing the need for an explicit `is_ci` boolean, as its presence can be inferred from `ci_provider.is_some()`.

New tests have been added to:
- Ensure that environment variables with "falsey" values (e.g., empty string, "0") do not inadvertently trigger CI detection.
- Validate that no CI is detected when no relevant environment variables are present.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

---------

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
Co-authored-by: Aleks <121458075+SequeI@users.noreply.github.com>
(cherry picked from commit cc11b38)
Signed-off-by: oscarmackjr-twg <oscar.mack.jr@gmail.com>
klassm pushed a commit to klassm/nono that referenced this pull request Jul 3, 2026
* feat(update-check): discover ci environments on update

The update check now includes a coarse classification of the CI environment.
This helps us understand how nono well (or not) recent versions are used in automated
workflows versus local development.

- Detection relies solely on well-known environment variable names (e.g., GITHUB_ACTIONS, CI).
- Raw environment variable values are never collected or transmitted.
- The update service's privacy assurances remain unchanged: no personally identifiable information is collected.
- Updated the `test-update-server.py` script to log the new CI fields.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

* refactor(update_check): simplify ci environment detection

The `CiEnvironment` struct has been removed to streamline the representation of CI detection.

The `detect_ci_environment` function has been renamed to `detect_ci_provider` and now directly returns an `Option<&'static str>` representing the detected CI provider. This simplifies the API by removing the need for an explicit `is_ci` boolean, as its presence can be inferred from `ci_provider.is_some()`.

New tests have been added to:
- Ensure that environment variables with "falsey" values (e.g., empty string, "0") do not inadvertently trigger CI detection.
- Validate that no CI is detected when no relevant environment variables are present.

Signed-off-by: Luke Hinds <lukehinds@gmail.com>

---------

Signed-off-by: Luke Hinds <lukehinds@gmail.com>
Co-authored-by: Aleks <121458075+SequeI@users.noreply.github.com>
@SequeI
SequeI deleted the update-type branch July 10, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants