feat: record the materials each mage weapon was crafted from - #36
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughGear crafting records charged materials as JSON metadata on the prepared item. Gear copy and refresh operations preserve this metadata. ChangesCraft input provenance
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change records crafting inputs and preserves them through gear rebuilds and refreshes. No actionable merge-blocking issue is established; merge after normal checks pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change records crafting history without adding new refund authority. Recorded amounts come from server-defined costs, and free staff crafts receive an empty record. Remaining uncertainty concerns exceptional crafting failures and how a future recycler will validate and consume this metadata. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the forge at night, Comment |
The weapon now carries what the craft actually charged (gear_craft_inputs PDC, item path to amount; empty for staff bypass crafts). Socket rewrites and refreshes copy it along with the part list. Recycler reads it with GearProvenance.readInputs instead of today's part costs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
b5956c7 to
9565aaa
Compare
Summary
Recycler returns the current cost of a weapon's stamped parts. That is wrong when a part's cost changed after crafting, and it returns materials for weapons staff crafted for free (
magic.bypass_crafting_cost).GearInventoryManager.tryPreparestamps thechargedmap (already computed for abort refunds) onto the prepared weapon:magic:gear_craft_inputs, JSON item path to amount. Empty for staff bypass crafts.copyGearPdchelpers (socket rewrite after charging, andGearRefresher) carry the stamp to the rebuilt item, likegear_parts.GearProvenance.readInputs(ItemStack)returns the map, ornullfor weapons crafted before this change.Recycler will read this in a follow-up PR.
Testing
mvn verifypasses locally at 100%.🤖 Generated with Claude Code
Summary by CodeRabbit