Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5ee97c5ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if seen != set(PILLARS): | ||
| raise ValueError("Assessments must include each pillar exactly once") | ||
|
|
||
| resolved_weights = weights or _default_weights() |
There was a problem hiding this comment.
Honor explicit empty weights instead of defaulting
Using weights or _default_weights() causes generate_shift_report(..., weights={}) to silently fall back to defaults rather than failing validation, even though the function later checks that provided weights include every pillar. This can mask invalid caller configuration and return a misleading score instead of raising a ValueError, which is a correctness issue for any external configuration flow.
Useful? React with 👍 / 👎.
| @@ -0,0 +1,91 @@ | |||
| import unittest | |||
|
|
|||
| from myherb_shift_advisor import ( | |||
There was a problem hiding this comment.
Make test imports runnable from repository root
The bare import from myherb_shift_advisor import ... only resolves when tests are executed from inside apps/; running tests from the repository root (for example, via standard unittest module invocation/discovery) raises ModuleNotFoundError. This makes test execution path-dependent and can break CI or developer workflows that run tests from the project root.
Useful? React with 👍 / 👎.
Motivation
Description
apps/myherb_shift_advisor.pyimplementingPillarAssessmentandShiftReport, weighted scoring viagenerate_shift_report, demo/watch/interactive modes, and console rendering.apps/test_myherb_shift_advisor.pythat validate score aggregation, weight-sum validation, report rendering, watch snapshots, and interval handling.apps/web/(index.html,script.js,styles.css) that provides an interactive assessment form, animated score display, and priority recommendations.README.mdwith usage instructions for the CLI, web preview, and test commands.Testing
cd apps && python -m unittest test_myherb_shift_advisor.py.Codex Task