Skip to content

feat: add playtime interval reward gating - #58

Open
koji-assistant[bot] wants to merge 1 commit into
mainfrom
feat/playtime-interval-item-rewards
Open

koji-assistant[bot] wants to merge 1 commit into
mainfrom
feat/playtime-interval-item-rewards

Conversation

@koji-assistant

Copy link
Copy Markdown
Contributor

Summary

  • Adds optional playtimeIntervalMinutes gating to playtime-buff-rewards so admins can grant item/buff/command/currency rewards only after each full playtime interval (for example every 120 minutes).
  • Tracks each player's last rewarded interval in module-scoped variables, so cron can run more often without sending “rewarded with nothing” style noise.
  • Keeps the existing behavior by default with playtimeIntervalMinutes: 0 (grant on every cron run).

Discord source

  • svmotnik in #discussion, 2026-07-19T11:43:04Z, Akari message 48dbe712-d708-46be-9cb2-42461c55f000
  • Follow-up context: wanted item-only playtime rewards every 2 hours without “nothing” messages when players are not eligible yet.

Test plan

  • PASS: npm run build
  • PASS: node --check modules/playtime-buff-rewards/src/functions/playtime-buff-helpers.js
  • PASS: node dist/scripts/module-to-json.js modules/playtime-buff-rewards /tmp/playtime-buff-rewards.json plus JSON validation; verified playtimeIntervalMinutes is present in exported config schema.
  • BLOCKED: Focused sandbox integration test attempted with Redis on alternate port, but mock gameserver identification hit transient DNS getaddrinfo EAI_AGAIN api.k8s.takaro.dev; no runtime pass claimed.

Remaining QA

  • Run focused integration once sandbox DNS is stable.
  • Real game/bot verification remains pending per module QA policy.

@koji-assistant

Copy link
Copy Markdown
Contributor Author

CI follow-up: exact-head checks on 9c7d59c33713e39771f36db4d767267a1f04eab0 show:

  • Build and typecheck: success
  • Integration tests: failure in Bootstrap Takaro stack

I could not download the job log with the GitHub App token (403 on the Actions job logs endpoint), but the failing step matches the known shared Takaro stack bootstrap class for this repo rather than module-code execution. Local/static validation already completed: npm run build, node --check on the helper, and module-to-json export/schema validation. Runtime module QA is still pending; no runtime PASS claimed.

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.

0 participants