Repository navigation
fix(bot): stop ending offers and questions with a line about not answering (0.2.2) - #25
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Choice hint behavior supermedicaldoctor/bot.py, supermedicaldoctor/locales/en.yaml, supermedicaldoctor/locales/es.yaml, tests/test_chat.py |
Bot.say adds the yes/no hint only when the offered choices match the localized yes/no labels. The separate options_hint is removed from both locales. Choice tests reflect the updated prompt. |
No-response text removal supermedicaldoctor/locales/en.yaml, supermedicaldoctor/locales/es.yaml, supermedicaldoctor/principles/en.md, supermedicaldoctor/principles/es.md, docs/how-it-works.md, tests/test_bot.py, tests/test_edits.py, tests/test_i18n.py, tests/test_principles.py, supermedicaldoctor/__init__.py |
The prompts, principles, and documentation omit the specified no-response statements. Tests check the updated text and principles hashes. The package version changes from 0.2.1 to 0.2.2. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- GeiserX/SuperMedicalDoctor#24: Changed the same option-button guidance that this pull request further updates.
- GeiserX/SuperMedicalDoctor#23: Introduced the choice and reply-prompt behavior that this pull request modifies.
Merge Risk: 
Minimal · up to 92587
-
The prompt wording changes preserve the supported choice and unanswered-offer behavior and are ready to merge.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 6 functions across 7 files. (5 skipped: 5 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Every offer and every question with buttons ended with «Si no respondes, no hago nada.» / "If you do not answer, I do nothing.". The buttons already show the choices and an untapped offer simply expires, so the line added nothing.
The line is gone from the calendar offer, the follow-up after an appointment, the reminder offer, the instructions and edit asks, and the Sí/No hint (which keeps "Tap Yes or No. If you want something else, reply to this message."). Option buttons other than Sí/No now carry no line at all, so
options_hintis removed from both locales. Principle 7 of the shared principles keeps "an offer nobody answers does nothing", without the quoted line; it is the same new text as in SuperMealPlanner and the cycle bot. docs/how-it-works.md is updated. Behaviour is unchanged: an untapped offer still expires and does nothing. Version 0.2.2.Tests: the tests that asserted the line now check the text ends where it should, and a new i18n test checks that no message in either locale says what happens without an answer. 11 tests fail on the old code; the full suite passes (294).
Summary by CodeRabbit