feat(update-check): discover ci environments on update - #1113
Conversation
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>
PR Review SummarySize
Affected crates
Blast radius — ContainedThis PR touches: source code Updated automatically on each push to this PR. |
There was a problem hiding this comment.
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.
|
Looks good to me, just need to resolve the gemini recommendation |
* 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>
* 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>
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.
test-update-server.pyscript to log the new CI fields.Signed-off-by: Luke Hinds lukehinds@gmail.com