fix(insights): follow ups from the profile analysis review - #752
Merged
Conversation
Contributor
|
callingmedic911
marked this pull request as ready for review
July 17, 2026 19:17
nicot
approved these changes
Jul 17, 2026
Contributor
📝 WalkthroughWalkthroughThe PR separates credential and environment checks, updates profile parsing and CLI preflight behavior, preserves unrelated YAML keys, and changes testbed restore ordering, release uploads, and repository-scoped bundle caching. ChangesInsights runtime flow
Testbed bundle operations
Sequence Diagram(s)sequenceDiagram
participant User
participant InsightsCLI
participant Preflight
participant Platform
User->>InsightsCLI: run analyze or doctor
InsightsCLI->>Preflight: check credentials
InsightsCLI->>Preflight: check environment
Preflight->>Platform: probe base URL and optional workspace
Platform-->>Preflight: readiness results
Preflight-->>InsightsCLI: check results
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/nemo-insights/src/nemo_insights_plugin/cli.py`:
- Around line 101-103: Update the discovered-profile error path in
_load_profile_or_error so it still loads the discovered profile’s adjacent .env
via load_env_file before raising ProfileError and allowing --agent to continue.
Preserve the existing warning behavior, and add coverage for a malformed
optimizer.yaml with a valid .env and --agent, verifying INFERENCE_API_KEY is
available during analysis.
In `@plugins/nemo-insights/testbed/publish.py`:
- Around line 140-143: Update the publish flow around next_ref and
release._release_gh so concurrent publishers cannot overwrite each other’s
assets: add an atomic publication lock or ref reservation before uploading, or
only pass --clobber after explicitly verifying the existing asset is a partial
upload. Preserve retry behavior for the same publisher while preventing
clobbering an unverified candidate.
In `@plugins/nemo-insights/testbed/reingest.py`:
- Around line 583-584: Update the restore flow in reingest.py so require_empty
performs a preflight pass across every target workspace before issuing any POST
requests. Validate each workspace’s emptiness first, abort the operation if any
target is populated, then run the existing write loop only after all targets
pass.
- Around line 494-497: Update _doc_started_at and the related matching/skip path
so documents with missing or malformed started_at values are rejected or cause
the probe to be unavailable, rather than converted to _EPOCH_ISO or raising
ValueError. Ensure only successfully validated timestamps participate in corpus
fingerprint comparisons, while preserving normal timezone normalization for
valid values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0ff48da0-4579-468c-ba3a-77afc0b4a88b
📒 Files selected for processing (14)
plugins/nemo-insights/src/nemo_insights_plugin/analyst/analyst_backend.pyplugins/nemo-insights/src/nemo_insights_plugin/cli.pyplugins/nemo-insights/src/nemo_insights_plugin/contracts/profile.pyplugins/nemo-insights/src/nemo_insights_plugin/preflight.pyplugins/nemo-insights/testbed/publish.pyplugins/nemo-insights/testbed/reingest.pyplugins/nemo-insights/testbed/release.pyplugins/nemo-insights/tests/contracts/test_profile_contract.pyplugins/nemo-insights/tests/test_cli_profile.pyplugins/nemo-insights/tests/test_periodic_analysis.pyplugins/nemo-insights/tests/test_preflight.pyplugins/nemo-insights/tests/testbed/test_publish.pyplugins/nemo-insights/tests/testbed/test_reingest.pyplugins/nemo-insights/tests/testbed/test_release.py
Post-merge review follow-up to #718. Analyze keeps other top level keys when writing the shared insights file, .env values keep quotes that are part of the secret, --agent alone bypasses a broken profile, local file errors are no longer reported as platform errors, doctor runs its checks even without a profile, analyze drops the duplicate network probes, restore drops the mid-run recheck, the download cache is split per repo, and the first-span guard compares timestamps chronologically. Restores --clobber and substring release matching. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Aditya Pandey <aditypandey@nvidia.com>
callingmedic911
force-pushed
the
fix/insights-profile-followups
branch
from
July 17, 2026 19:30
b31970c to
0cd00ed
Compare
callingmedic911
enabled auto-merge
July 17, 2026 19:31
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #718, from a review of the merged PR.
Analyze fixes: keep other top level keys in the shared insights.yaml, drop the duplicate network probes, only require --agent to bypass a broken profile, stop reporting local file errors as platform errors. Doctor now runs its checks even without a profile. The .env loader only strips real quote pairs. Bad base urls and ~user paths render as normal errors instead of tracebacks.
Testbed fixes: removed the mid run empty recheck that could kill a restore halfway, split the download cache per repo, compare first span timestamps chronologically, restored --clobber on publish and substring matching for missing releases, tests no longer break when TESTBED_STATE_REPO is set.
Tested: plugin suite green (526 passed) plus a local end to end run. Restored state-v6 into a live platform twice (fresh and skip path), ran doctor with and without a profile, and a real analyze that wrote two insights and kept the extra keys in the file.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes