Skip to content

Add append-only Nakama ledgers for economy and agent audit #80

@JOY

Description

@JOY

Project: Second Spawn
Area: Nakama
Milestone: Foundation
Priority: P1
Size: M
Review Gate: Local Review
Verification: Backend Tests

Goal

Add append-only audit trails for sensitive systems so snapshots can be debugged, replayed, and investigated.

Scope

  • Define ledger records for BodyTime, SECOND, inventory, reward claims, reincarnation, and agent activity.
  • Keep current state as snapshots, not as the only source of truth.
  • Include actor id, source, reason, amount or delta, target id, validation result, and timestamp where relevant.
  • Keep retention bounded for high-volume agent activity.

Acceptance Criteria

  • BodyTime and reward mutations write an auditable event.
  • Agent decision activity can record model vs fallback source and reason.
  • Tests verify ledger writes for at least one economy path and one agent path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ai-agentOffline player agent, NPC intelligence, and agent observabilityarea:economyBodyTime, SECOND token, rewards, sinks, and loot economyarea:nakamaNakama runtime, storage, auth, social, or backend modulesenhancementNew feature or requestpriority:p1High priority for current milestonesize:mMedium task

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions