Skip to content

Credit aged brews taken from BreweryX barrels - #85

Merged
JustinasLa merged 1 commit into
mainfrom
feat/brewery-age
Sep 30, 2026
Merged

JustinasLa merged 1 commit into
mainfrom
feat/brewery-age

Conversation

@JustinasLa

@JustinasLa JustinasLa commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Part 4 of 5, stacked on the distilling PR.

  • brew_age credits the player who takes a brew aged at least 1 BreweryX year (20 min on our servers) out of a barrel, once per brew (activity:brew_aged tag).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Earn activity credit for taking brews aged at least one year from barrels. Progress is awarded for every three brews, with a daily completion limit of one.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 362653cd-f00b-47d3-8c5c-5a0917a49c26

📥 Commits

Reviewing files that changed from the base of the PR and between 1f06b18 and 11327e9.

📒 Files selected for processing (3)
  • src/main/java/net/tfminecraft/activitytf/listeners/BreweryListener.java
  • src/main/resources/config.yml
  • src/test/java/net/tfminecraft/activitytf/listeners/BreweryListenerTest.java

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The listener now credits qualifying brews taken from barrels when they are at least 1.0 BreweryX years old. The brew_age activity awards 1 point for every 3 brews, with a daily completion limit of 1. A test verifies that aging and distilling use independent marks.

Changes

Year-aged brew credit

Layer / File(s) Summary
Barrel age credit
src/main/java/net/tfminecraft/activitytf/listeners/BreweryListener.java, src/main/resources/config.yml, src/test/java/net/tfminecraft/activitytf/listeners/BreweryListenerTest.java
The listener checks barrel brews against a 1.0-year minimum and credits qualifying brews with the brew_age activity using a separate persistent-data key. The configuration sets the activity reward and daily limit. The test verifies that aged and distilled marks are independent.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature · Unblocks: 1 PR

Merge Risk: ⚪ Minimal · up to 11327

The new credit applies to brews aged at least one BreweryX year and remains separate from distilling credit. No supported merge-blocking risk remains.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 11327

Barrel aging credit remains subject to existing player reward limits. The main risk is lost credit: deployment before configuration is ready, or interruption during recording, can leave a brew marked without recording its activity.

Retained concerns

  • Low · reliability · inferred: The new aging-credit lifecycle can strand a consumed marker without recorded activity. Taking a qualifying brew before brew_age configuration is loaded leaves its marker despite an UNKNOWN result. Interruption before confirmation can have the same effect if the modified item persists, because pending ownership has no durable recovery state. The shared helper already serves distillation; this PR extends that failure mode to aging credit.
Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is player activity accounting on the server running the plugin and aging markers on qualifying brew items. The shipped reward policy limits brew_age to one point per player per day, subject to task eligibility and shared reward budgets. Operators can change that policy.

Trust Boundaries and Controls

  • observed — Player-controlled inventory clicks pass cancellation, player, take-action, top-inventory, potion, BreweryX barrel, and age checks before submission. ActivityManager then rejects unknown or unrevealed activities and uses normal capped player accounting; the barrel branch does not invoke an ungated reward path.

Resilience and Maintainability Implications

  • inferred — Downstream rejection contains rewards but does not undo the item marker. Consequently, missing configuration fails closed for points while potentially losing future aging-credit eligibility. The durable marker and transient pending ownership have different recovery lifetimes.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: awarding credit for aged brews taken from BreweryX barrels.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ 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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


I’m a rabbit with a barrel in sight,
One year of aging makes the brew right.
Three little brews earn a point,
A daily limit keeps the count in joint.
Distilled and aged marks each have their place,
I hop away with a smile on my face.

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from feat/brewery-distill to main September 30, 2026 20:30
brew_age credits the player who takes a brew aged at least one BreweryX
year out of a barrel, once per brew, using the same take-and-tag
approach as distilling.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@JustinasLa
JustinasLa merged commit b4e3143 into main Sep 30, 2026
2 checks passed
@JustinasLa
JustinasLa deleted the feat/brewery-age branch September 30, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant