Skip to content

chore: set telemetry env for safe-synthesizer#430

Open
mckornfield wants to merge 1 commit into
mainfrom
set-env-nss/mck
Open

chore: set telemetry env for safe-synthesizer#430
mckornfield wants to merge 1 commit into
mainfrom
set-env-nss/mck

Conversation

@mckornfield

@mckornfield mckornfield commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Fixed environment variable configuration for local runtime execution to ensure proper deployment type settings.
  • Tests

    • Added unit test to verify correct environment variable handling during local command execution.

Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
@mckornfield mckornfield requested review from a team as code owners June 24, 2026 03:07
@github-actions github-actions Bot added the chore label Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5b78e5bd-72db-411c-9870-ee9f47f374b6

📥 Commits

Reviewing files that changed from the base of the PR and between d8ea9e2 and 0ceec6b.

📒 Files selected for processing (2)
  • plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/cli.py
  • plugins/nemo-safe-synthesizer/tests/unit/test_cli.py

📝 Walkthrough

Walkthrough

The CLI gains two module-level constants (NEMO_DEPLOYMENT_TYPE_ENVVAR, NMP_DEPLOYMENT_TYPE) and now explicitly copies os.environ, injects NEMO_DEPLOYMENT_TYPE=nmp, and passes that env to subprocess.run in the run-local path. A unit test verifies the injected value and that check=False.

Changes

Deployment type env injection

Layer / File(s) Summary
Constants and subprocess env injection
plugins/nemo-safe-synthesizer/src/nemo_safe_synthesizer_plugin/cli.py, plugins/nemo-safe-synthesizer/tests/unit/test_cli.py
Adds os import and two string constants; run-local now builds an explicit env dict with NEMO_DEPLOYMENT_TYPE=nmp before calling subprocess.run. Test monkeypatches runtime_task_command and subprocess.run to assert the env var is set and check=False.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Title mentions 'telemetry env' but changes actually set NEMO_DEPLOYMENT_TYPE to control deployment mode, not telemetry configuration. Revise title to reflect the actual change: e.g., 'chore: set NEMO_DEPLOYMENT_TYPE env for safe-synthesizer runtime' or similar.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch set-env-nss/mck

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 20908/27478 76.1% 61.2%
Integration Tests 12109/26247 46.1% 19.5%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant