[scripts][healer] Make Link Unity not a hard requirement to run this script#7395
Conversation
Lower-circle empaths who haven't learned the Unity manifestation of Empathic Link were blocked from running the healer entirely. Now the script warns and continues with wound transfers disabled while still handling poison, disease, parasites, and vitality healing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR refactors Unity link validation to be non-fatal during startup, setting an ChangesUnity Availability Gating
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
Unity is a faster instant-transfer method, not a gate for wound transfers. Without it, wounds still transfer via normal touch flow. Updated all messaging and log lines to reflect this accurately. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Unity is a convenience shortcut, not something worth warning about when absent. The normal touch flow is the standard mechanism. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
healer.lic (1)
198-201:⚠️ Potential issue | 🟠 Major | ⚡ Quick winTimeout path still hard-exits, so Unity is not fully optional at startup.
At Line 198, a transient
linktimeout still callsexit, which can stop empath healing entirely even though Unity is intended to be optional. Prefer falling back to@unity_available = falseand continuing (while keeping the explicit non-empath exit path).Proposed fix
- unless lines - Lich::Messaging.msg('bold', 'Healer: ERROR - Could not check link abilities (timeout).') - exit - end + unless lines + `@unity_available` = false + Lich::Messaging.msg('bold', 'Healer: Could not verify Link Unity (timeout) — using normal touch transfer.') + return + end🤖 Prompt for 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. In `@healer.lic` around lines 198 - 201, The timeout branch currently calls exit which hard-stops startup; change that path so instead of calling exit you set `@unity_available` = false and continue startup (keep the Lich::Messaging.msg('bold', 'Healer: ERROR - Could not check link abilities (timeout).') log intact); ensure any other explicit non-empath exit logic elsewhere still calls exit as before but this transient link timeout only flips `@unity_available` and does not abort the process.
🤖 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 `@spec/healer_spec.rb`:
- Around line 496-497: The negative expectation on DRC.bput is too permissive
because Unity calls use four arguments; update the matcher for the DRC bput
expectation (the call to expect(DRC).not_to receive(:bput)) to assert a
4-argument signature so Unity-style calls can't slip through—e.g., change the
with(...) to match the first arg (/link.*unity/i) and include three subsequent
argument matchers (anything, anything, anything) for the full command + 3
response patterns.
---
Outside diff comments:
In `@healer.lic`:
- Around line 198-201: The timeout branch currently calls exit which hard-stops
startup; change that path so instead of calling exit you set `@unity_available` =
false and continue startup (keep the Lich::Messaging.msg('bold', 'Healer: ERROR
- Could not check link abilities (timeout).') log intact); ensure any other
explicit non-empath exit logic elsewhere still calls exit as before but this
transient link timeout only flips `@unity_available` and does not abort the
process.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 106798bc-51a3-454b-8b1d-c8e0c6da1c31
📒 Files selected for processing (2)
healer.licspec/healer_spec.rb
- Link timeout now sets @unity_available = false and returns instead of killing the healer. The non-empath check still exits. - Tighten negative Unity bput expectations to match the full LINK_RESPONSES signature so regressions can't slip through. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@coderabbitai Both findings addressed in f3bcc58: 1. Timeout hard-exit (major): 2. Loose spec matcher (minor): Both negative Unity |
|
Tip For best results, initiate chat on the files or code changes.
Great work on the fix! (ノ◕ヮ◕)ノ*:・゚✧ |
Summary
Changes
validate_link_unity: sets@unity_availableflag instead of exiting; only messages when Unity is presentheal_patient: gates only thelink <patient> unitycommand on@unity_available; separate log for hands/legs-only skipunityparameter tobuild_healertest helper (defaults totrue)validate_link_unity(Unity present, absent, no spurious messaging)Test plan
bundle exec rspec spec/healer_spec.rb-- 75 examples, 0 failuresrubocop -A healer.lic-- no offensesrubocop -A spec/healer_spec.rb-- no offenses🤖 Generated with Claude Code
Summary by CodeRabbit