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 local runtime execution to correctly set the deployment type via environment variables for the spawned process.
  • Tests

    • Added a unit test to verify the local command passes the expected environment variable to the runtime subprocess.

@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: 7c908392-7dd5-4212-b496-2c31d813ecca

📥 Commits

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

📒 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
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/nemo-safe-synthesizer/tests/unit/test_cli.py

📝 Walkthrough

Walkthrough

The CLI adds two constants and now explicitly copies os.environ, sets NEMO_DEPLOYMENT_TYPE=nmp, and passes that environment to subprocess.run in run-local. A unit test checks the env value and 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 | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: setting an environment variable for safe-synthesizer runtime behavior.
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

github-actions Bot commented Jun 24, 2026

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

Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
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