meta {
  name: GET perk state
  type: http
  seq: 1
}

docs {
  NEO-48: per-player perk state read model (branch picks + unlocked perk ids).
  Empty state until branch picks; pair with skill-progression grant + POST branch select.
}

get {
  url: {{baseUrl}}/game/players/{{playerId}}/perk-state
  body: none
  auth: none
}

tests {
  test("returns 200 JSON schema v1", function () {
    expect(res.getStatus()).to.equal(200);
    expect(res.getHeader("content-type")).to.contain("application/json");
    const body = res.getBody();
    expect(body.schemaVersion).to.equal(1);
    expect(body.playerId).to.equal(bru.getEnvVar("playerId") || bru.getVar("playerId"));
    expect(body.branchPicks).to.be.an("array");
    expect(body.unlockedPerkIds).to.be.an("array");
  });
}
