doc: update the readme.md - #91
Conversation
Signed-off-by: kerthcet <kerthcet@gmail.com>
|
/lgtm |
There was a problem hiding this comment.
🟡 Changes recommended
Adds behavioral validation without corresponding tests and the PR metadata currently frames it as documentation-only.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates Nebula documentation to better describe capabilities and configuration while tightening provider catalog CSV validation to prevent invalid pricing data from entering the system.
Changes:
- Add a README “Features” section and document NodePool
spec.egressconfiguration in the example. - Reject negative
price_per_hourvalues when parsing provider offering CSVs (in addition to non-finite values).
File summaries
| File | Description |
|---|---|
| README.md | Adds a Features section and expands the NodePool example to include spec.egress. |
| pkg/provider/catalog/catalog.go | Extends CSV price validation to reject negative values with a clearer error message. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a behavior change (reject negative prices) without corresponding test coverage, and adds a doc TOC entry that links to a missing section.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
pkg/provider/catalog/catalog.go:196
- This change now rejects negative prices, but the existing tests only cover non-finite values (see TestLoadFrom_RejectsNonFinitePrice). Please add a test case that ensures a negative price_per_hour (e.g. "-1") is rejected, so this behavior stays protected.
if math.IsNaN(price) || math.IsInf(price, 0) || price < 0 {
return nil, fmt.Errorf("row %d: price_per_hour %q must be a non-negative finite number", i, field(rec, colPrice))
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
|
/hold |
e3eb568 to
e939d35
Compare
|
/unhold |
|
/lgtm |
There was a problem hiding this comment.
🔵 Needs a closer look
The PR scope/title is doc-only but includes functional code changes, and the new negative-price behavior should be covered by a unit test.
Review details
Suppressed comments (2)
pkg/provider/catalog/catalog.go:196
- The new validation also rejects negative prices, but the unit tests only cover non-finite values (NaN/Inf). Add a test case for a negative price_per_hour (e.g. "-0.01") to ensure this behavior stays covered.
if math.IsNaN(price) || math.IsInf(price, 0) || price < 0 {
return nil, fmt.Errorf("row %d: price_per_hour %q must be a non-negative finite number", i, field(rec, colPrice))
pkg/provider/catalog/catalog.go:196
- This PR is titled/positioned as a README-only doc update, but it also changes CSV parsing/validation behavior in code. Please update the PR title/description to reflect the code change (or split the code fix into a separate PR) so reviewers can triage scope correctly.
if math.IsNaN(price) || math.IsInf(price, 0) || price < 0 {
return nil, fmt.Errorf("row %d: price_per_hour %q must be a non-negative finite number", i, field(rec, colPrice))
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
InftyAI-Agent
left a comment
There was a problem hiding this comment.
Approved: PR has both lgtm and approved labels
What this PR does / why we need it
Which issue(s) this PR fixes
Fixes #
Special notes for your reviewer
Does this PR introduce a user-facing change?