Skip to content

Require reviewed character ownership for legacy stations - #20

Merged
ryanbarlow97 merged 1 commit into
mainfrom
stage6c/owner-guard
Oct 14, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
stage6c/owner-guard

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

An unassigned legacy station currently becomes the property of whichever character on its account opens it next. Station and menu access now require its recorded owning character, so missing reviewed ownership remains held for staff instead of being claimed by an active alternate character.

The existing reviewed-heir backfill and estate transfer remain unchanged. Documentation includes an offline recovery procedure that preserves the fixed plan, original account and project fields: TF-Minecraft/Docs#226. Part of RPCharacters issue 89, stage 6c.

Validation: Java 21 tfmc-mvn -o -B clean verify passed 298 tests and all configured coverage gates. Regressions cover unassigned stations, two characters on one account, stale-menu focus spending and unchanged ownership. Independent source review approved the change.

@github-actions github-actions Bot added the size:S 10-29 effective changed lines (tests excluded in mixed PRs). label Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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: 761de130-ea64-45cd-bfbd-e32166c1d320
📥 Commits

Reviewing files that changed from the base of the PR and between 6314ae0 and 65c4cfd.

📒 Files selected for processing: 5
  • src/main/java/net/tfminecraft/research/database/StationBackfill.java
  • src/main/java/net/tfminecraft/research/manager/ResearchManager.java
  • src/test/java/net/tfminecraft/research/manager/MultipleStationsTest.java
  • src/test/java/net/tfminecraft/research/manager/ResearchManagerTest.java
  • src/test/java/net/tfminecraft/research/manager/ResearchSessionTest.java

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

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Stations without an assigned character can no longer be claimed or used by another character, including through an already-open menu.
    • Station access now requires matching account and character ownership. Existing character ID casing is preserved.
    • Scrap confirmations continue to affect the station shown in the open menu.

Station access now requires the station’s assigned character ID to match the active character ID. Interactions no longer claim unassigned stations. Updated tests cover access checks, open-menu actions, and ownership persistence.

Changes: Station Ownership Enforcement

Layer / File(s) Summary
Enforce assigned character ownership
src/main/java/net/tfminecraft/research/manager/ResearchManager.java, src/main/java/net/tfminecraft/research/database/StationBackfill.java, src/test/java/net/tfminecraft/research/manager/*
Station access requires a non-null character ID that matches the active character ID, ignoring case. Interaction no longer assigns or saves ownership for unassigned stations. Tests verify that unassigned stations remain unclaimed and cannot spend focus through an open menu. Tests also set ownership for scenarios that require an owned station. The backfill comment now states that stations for accounts without an heir remain unassigned and unusable.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 65c4c

Stations without a recorded owning character are no longer claimable through interaction, so they stay held for staff. No merge-blocking risk was identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@ryanbarlow97
ryanbarlow97 merged commit 99b0d4e into main Oct 14, 2026
4 checks passed
@ryanbarlow97
ryanbarlow97 deleted the stage6c/owner-guard branch October 14, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant