Repository navigation
refactor(playerbots): run goals tests through the Package test root - #74
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughWorkflow jobs now pin LyraCore to a newer revision. Goal tests moved to a separate module, and the legacy-source comparison now accounts for that separation. ChangesLyraCore Checkout Pin
Goal Test Extraction
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to This PR moves the goals tests to their own file and updates the Core pin used by CI. It does not change production behavior. Core PR 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
The goals tests reached runtime_script and test_scan through three package-api exemptions. They now live in goals/tests.rs, gated on #![cfg(test)], and use crate::package_test for the offline Runtime Script run and the source scans. goals.rs keeps its production code byte-identical. The Legacy pin keeps its commit and blob, and now checks that goals.rs equals that committed source with the inline test module replaced by its declaration. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
d5dda16 to
aa9191b
Compare
The playerbots goals tests reached Core internals through three
package-api: exemptlines. They ran a shipped Runtime Script offline throughruntime_scriptand scanned source throughtest_scan. LyraCoreProject/LyraCore#629 addscrate::package_test, a test-only Package API root for both.This PR moves the test module out of
goals.rsintogoals/tests.rs. The new file starts with#![cfg(test)], the gate the lint requires for the root. The tests now callpackage_test::ask_offlineand the scan helpers, and playerbots has no exemption that namesruntime_scriptortest_scan. The production code ingoals.rsis byte-identical. Only the inline module became#[cfg(test)]\nmod tests;.goals.rsis pinned for the Legacy policy comparison. A new pin commit cannot work here, because the squash merge creates a new commit and the branch commit never reaches main. So the pin keeps its commit50e2cd1and blobe72a7f9, which are on main. The check now requires the currentgoals.rsto equal that committed source with its one inline test module replaced by the declaration, and it fails if that module is missing, repeated, or not at the end of the file. The pinned expressions still hold.The workflows pin Core at the #629 head. Baseline jobs keep their old Core pins.
Pair: LyraCoreProject/LyraCore#629. Merge Core first, then this PR.
Checks run locally against the Core branch: the 85 goals tests pass, and three deliberate breaks made four of them fail before I reverted them. The pin transform reproduces the new
goals.rsexactly.Claude Opus 5.5 made this change in Claude Code.
🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Maintenance