Skip to content

feat(nakama): add BodyTime event flow#15

Merged
JOY (JOY) merged 1 commit into
devfrom
feat/bodytime-events
May 17, 2026
Merged

feat(nakama): add BodyTime event flow#15
JOY (JOY) merged 1 commit into
devfrom
feat/bodytime-events

Conversation

@JOY
Copy link
Copy Markdown
Contributor

Summary

  • Add secondspawn_bodytime_event to the Nakama runtime for prototype BodyTime earn, spend, and danger-zone drain events.
  • Validate event kind/source pairs, cap per-event amounts, enforce retry idempotency when an event ID is supplied, and add a short prototype cooldown for repeated earn claims from the same source.
  • Log accepted BodyTime events into bounded agent_activity, expose body lifecycle in Unity DTOs, and add a Unity gateway wrapper for the Nakama RPC.
  • Mark bodies as dead when BodyTime reaches zero; further non-idempotent BodyTime mutations are rejected until reincarnation flow exists.
  • Update the pre-alpha changelog.

Verification

  • npm run build in backend/nakama
  • npm test in backend/nakama
  • go test -count=1 ./... in backend/gateway
  • go vet ./... in backend/gateway
  • npx --yes markdownlint-cli2@0.18.1 "*.md" "docs/**/*.md" ".github/**/*.md"
  • git diff --check
  • Changed-file em-dash/en-dash scan

Local Review

Local code-review skill pass result: approved with suggestions. No engine specialist is configured in .Codex/docs/technical-preferences.md, so specialist routing was skipped. The implementation follows ADR 0010 by keeping game-backend profile/economy state in Nakama runtime modules, and follows the Time-as-Currency rule that BodyTime mutations are server-authoritative validated intents.

Caveat

Unity clean-worktree batchmode compile is still blocked by the existing Package Manager path undefined issue in this repo family, so Editor/MCP compile verification remains required before a no-caveat Unity merge claim.

Gemini (@gemini-code-assist) review
Codex (@codex) review

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@JOY JOY (JOY) force-pushed the feat/character-stats-animation branch from ca363a0 to c7d00a8 Compare May 16, 2026 23:52
@JOY JOY (JOY) force-pushed the feat/bodytime-events branch from 8ca5b9c to 16f5fbe Compare May 17, 2026 00:06
@JOY JOY (JOY) changed the base branch from feat/character-stats-animation to dev May 17, 2026 00:06
@JOY
Copy link
Copy Markdown
Contributor Author

Local delta review after rebase onto dev:

  • Verified BodyTime RPC coexists with the actor profile registry from dev.
  • Checked source caps, retry idempotency, earn cooldown, activity logging, and zero-time death behavior in backend/nakama/tests/supabase_custom_auth.test.mjs.
  • Verified Unity DTO additions are limited to BodyTime/lifecycle surfaces and do not grant authority.
  • Reviewer bots are quota-limited on this PR, so this is the local code-review fallback.

Verification:

  • npm run build && npm test in backend/nakama
  • go test -count=1 ./... && go vet ./... in backend/gateway
  • markdownlint-cli2
  • git diff --check

Verdict: APPROVED for merge into dev.

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