Skip to content

Allow overriding the build secret at runtime - #24

Merged
dank merged 2 commits into
masterfrom
claude/issue-23-review-hgsf31
Sep 25, 2026
Merged

dank merged 2 commits into
masterfrom
claude/issue-23-review-hgsf31

Conversation

@dank

@dank dank commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Closes #23

The PsyBuildSecret header added in e1a48f7 came from a package constant, so callers had to wait for a new release every time the secret rotated. This makes it configurable, the same way game version and feature set already are.

Changes

  • psynet.go: PsyNet now has a buildSecret field. Both constructors set it from the buildSecret constant. New SetBuildSecret / GetBuildSecret methods let callers change and read it. postJSON sends p.buildSecret instead of the constant.
  • These are separate methods, not a new argument to SetVersion, so existing callers keep compiling. The SetVersion doc comment now points to SetBuildSecret.
  • README.md: new "Game Version" section showing SetVersion + SetBuildSecret. Added a PsyBuildSecret row to the required-headers table and to the Auth/AuthPlayer/v2 request example.
  • The update-version.yml sed pattern still matches only the constant line. The new struct/field lines contain no = "...", so the pattern skips them.

Testing

  • gofmt -l ., go vet ./..., go build ./..., and go test ./... all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WssehDH7cG5ZuoFFptPrgJ


Generated by Claude Code

Store the build secret on PsyNet and add SetBuildSecret/GetBuildSecret,
mirroring SetVersion/GetVersion, so callers can update it after a game
patch without waiting for a new release. Document the PsyBuildSecret
header and the version overrides in the README.

Closes #23

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WssehDH7cG5ZuoFFptPrgJ
Comment thread README.md Outdated
Comment thread psynet.go Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WssehDH7cG5ZuoFFptPrgJ
@dank
dank merged commit 32907ea into master Sep 25, 2026
1 check passed
@dank
dank deleted the claude/issue-23-review-hgsf31 branch September 25, 2026 13:47
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.

Editable buildSecret

2 participants