Skip to content

fix: constrain NPC model targets#89

Merged
JOY (JOY) merged 1 commit into
mainfrom
dev
May 18, 2026
Merged

fix: constrain NPC model targets#89
JOY (JOY) merged 1 commit into
mainfrom
dev

Conversation

@JOY
Copy link
Copy Markdown
Contributor

Summary

  • send explicit nearby_actors from Unity so the model sees valid NPC social targets
  • include allowed_target_ids in the DOS.AI decision prompt and require exact target ids
  • accept both id and actor_id in backend target checks and extract JSON objects from slightly noisy model output

Local review

  • Local code-review fallback: approved, no blockers found in the scoped target-context diff
  • Boundary check: Unity still calls Nakama only; Nakama still validates all model target ids before applying intent

Verification

  • npm run build (backend/nakama)
  • npm test (backend/nakama)
  • dotnet build Unity/SecondSpawn.AI.csproj --no-restore
  • dotnet build Unity/SecondSpawn.Networking.csproj --no-restore
  • git diff --check
  • docker restart second-spawn-nakama and /v2/rpc/secondspawn_health smoke

Notes

A context canceled log immediately after restart was caused by the active Unity Play session hitting Nakama during container restart. The server came back healthy.

@JOY JOY (JOY) merged commit 0222abe into main May 18, 2026
5 checks passed
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