chore: fix assertions for process_data post merge - #554
Conversation
Signed-off-by: mkornfield <mkornfield@nvidia.com>
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🧰 Additional context used📓 Path-based instructions (7)**/*.{md,markdown,py}📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)
Files:
tests/**📄 CodeRabbit inference engine (.cursor/rules/repo-navigation.mdc)
Files:
tests/**/*.py📄 CodeRabbit inference engine (.cursor/rules/repo-navigation.mdc)
Files:
⚙️ CodeRabbit configuration file
Files:
**/*.py📄 CodeRabbit inference engine (STYLE_GUIDE.md)
Files:
**/*.{py,sh,yaml,yml}📄 CodeRabbit inference engine (STYLE_GUIDE.md)
Files:
**/*📄 CodeRabbit inference engine (STYLE_GUIDE.md)
Files:
⚙️ CodeRabbit configuration file
Files:
**/*test*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2026-05-14T21:47:20.140ZApplied to files:
📚 Learning: 2026-05-27T22:20:37.354ZApplied to files:
🔇 Additional comments (1)
WalkthroughTest expectations in three ChangesConfiguration schema method test updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis chore PR updates test assertions in
Confidence Score: 3/5Safe to merge only if the weakened merge-behavior coverage is acceptable; production code is untouched but three test cases no longer detect regressions in the config-merge path they were written to guard. The test assertions now use the same tests/sdk/test_process_data.py — specifically the three tests that changed saved and runtime values to the same default; they should use distinct enum literals (e.g. Important Files Changed
|
| @@ -475,7 +475,7 @@ def test_load_applies_runtime_generation_and_evaluation_config( | |||
| assert builder._nss_config.generation.num_records == 100 | |||
| # Saved value not re-specified at runtime is preserved (field-level merge). | |||
| assert builder._nss_config.generation.use_structured_generation is True | |||
| assert builder._nss_config.generation.structured_generation_schema_method == "json_schema" | |||
| assert builder._nss_config.generation.structured_generation_schema_method == "auto" | |||
There was a problem hiding this comment.
Test no longer verifies override behavior
test_load_applies_runtime_generation_and_evaluation_config is explicitly named and commented as testing that runtime generation overrides are honoured on resume. Setting both saved_config and runtime_config to "auto" (the field's default) means the final assertion == "auto" passes whether the merge chose the runtime value, kept the saved value, or simply applied the schema default — so a broken override path would go undetected. "regex" and "json_schema" are still valid StructuredGenerationSchemaMethod literals; using distinct values here (e.g. saved = "regex", runtime = "json_schema", assert "json_schema") is sufficient to restore the discriminating power this test was providing.
The same pattern appears in test_load_preserves_saved_generation_when_runtime_config_has_no_overrides (line ~498): storing the default "auto" as the saved value means the assertion == "auto" also passes if the merge silently falls back to the schema default instead of preserving the persisted value. A non-default saved value (e.g. "json_schema") is needed for that test to catch regressions.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Pre-Review Checklist
Ensure that the following pass:
make format && make checkor via prek validation.make testpasses locallymake test-e2epasses locallymake test-ci-containerpasses locally (recommended)/syncon this PR to trigger a run (auto-triggers on ready-for-review)Pre-Merge Checklist
Other Notes
Summary by CodeRabbit
Release Notes
No user-facing changes in this release.