Skip to content

Credit bottles filled from BreweryX cauldrons - #83

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

JustinasLa merged 1 commit into
mainfrom
feat/brewery-bottle

Conversation

@JustinasLa

@JustinasLa JustinasLa commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Part 2 of 5, stacked on the ingredients PR.

  • New activity brew_bottle: one action per bottle filled from a brewing cauldron (BrewModifyEvent FILL, which carries the player).
  • Bottles taken before a minute of cooking (BreweryX "thick brew") earn nothing.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Bottle filling from a brewing cauldron now counts toward activity after at least one minute of cooking. Every three bottles earns one point, with a limit of two completions per day.

@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: 0ed1134a-31b7-490f-b372-5e38e7b4b2c1

📥 Commits

Reviewing files that changed from the base of the PR and between 9a3ac3d and 401bc4a.

📒 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; 6 remain after this review.


📝 Walkthrough

Walkthrough

The BreweryX listener now records a brew_bottle action for uncancelled bottle-fill events when the brew has cooked for at least one minute. The default configuration defines the activity, and tests cover null players and cooked-bottle counts.

Changes

BreweryX bottle activity

Layer / File(s) Summary
Bottle-fill activity recording
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 ignores cancelled events, non-FILL modifications, null players, and brews cooked for less than one minute. Missing brews or ingredients yield zero cooked minutes. Eligible events record one brew_bottle action. The configuration uses GLASS_BOTTLE, requires 3 bottles per completion, awards 1 point, and sets a daily cap of 2. Tests cover null players and counts of 0, 1, and 12.

Priority: ➖ Normal

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

Change: Feature · Unblocks: 3 PRs

Merge Risk: ⚪ Minimal · up to 401bc

Eligible bottles filled through BreweryX cauldrons receive one credit after at least one minute of cooking; no actionable merge-blocking risk remains.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 401bc

The new bottle activity preserves existing task eligibility and reward limits. No introduced security issue was established, but the external event’s delivery and failure-ordering guarantees remain incompletely verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated new exposure is player activity progress on the hosting server. Each invocation selects state by the provider-supplied player UUID, and shipped policy limits bottle-derived points to two daily per player, subject to additional shared budgets. This depends on the event provider identifying the actor correctly.

Trust Boundaries and Controls

  • observed — The listener consumes player identity and cooking state from BreweryX events. It filters cancellation at handler execution, accepts only FILL, and applies the cooking threshold before delegation. These consumer controls do not establish the provider’s cancellation timing relative to successful bottle delivery.

Resilience and Maintainability Implications

  • observed — The consumer records each eligible invocation independently and has no event-identity deduplication. Existing reward budgets bound awarded points, but do not prove exactly-once action accounting. Tests confirm helper eligibility and repeated recording, not producer ordering, interruption or concurrent delivery.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 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: crediting bottles filled from BreweryX cauldrons.
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 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 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.


A rabbit watched the bottles fill
One minute passed beside the still
A glass icon joined the brew
Three bottles count toward one task, too
The listener logged the action true
Then hopped away with ears askew

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

@JustinasLa
JustinasLa force-pushed the feat/brewery-ingredients branch from b47f62a to b99140e Compare September 30, 2026 17:54
@JustinasLa
JustinasLa force-pushed the feat/brewery-ingredients branch from b99140e to 7023e6b Compare September 30, 2026 18:20
@JustinasLa
JustinasLa force-pushed the feat/brewery-ingredients branch from 7023e6b to e675c1c Compare September 30, 2026 18:30
Base automatically changed from feat/brewery-ingredients to main September 30, 2026 18:40
Add a brew_bottle activity fed by BrewModifyEvent FILL. Bottles scooped
before the cauldron has cooked for a minute ("thick brew") earn nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@JustinasLa
JustinasLa merged commit 71db678 into main Sep 30, 2026
2 checks passed
@JustinasLa
JustinasLa deleted the feat/brewery-bottle branch September 30, 2026 18:50
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