Skip to content

feat: DisallowAgents also ignores COLLIDER_RECORD - #16

Merged
LucasAntunesdeAlmeida merged 1 commit into
masterfrom
record-lockdown
Sep 29, 2026
Merged

LucasAntunesdeAlmeida merged 1 commit into
masterfrom
record-lockdown

Conversation

@LucasAntunesdeAlmeida

Copy link
Copy Markdown
Owner

What

g.DisallowAgents() now also makes the game ignore COLLIDER_RECORD. Before, a shipped game that locked agents out still wrote a GIF to whatever path COLLIDER_RECORD named, and games had to unset the variable before Run.

Design

  • No new API. COLLIDER_RECORD is part of the same outside-control surface as COLLIDER_AGENT (it is how an agent records its own demo, per AGENTS.md), and "lock the shipped build" is one decision. A separate call would be another switch every shipped game must remember. A game that still wants demo GIFs calls DisallowAgents only in release builds (a build tag), which is what shipping games already do.
  • Run reads the path through a small recordPath() helper: "" when agents are disallowed, else the env var.
  • Docs: DisallowAgents and Run doc comments, README cheat-sheet row, the agents section, the "Record a GIF" section, AGENTS.md.

Proof

  • TestDisallowAgentsIgnoresRecording: with COLLIDER_RECORD=demo.gif, a normal game records to it, the same game after DisallowAgents records nothing.
  • Full gate: gofmt, vet, staticcheck, go test ./..., wasm vet/build.

A shipped game calls DisallowAgents to stop outside programs taking
control, yet COLLIDER_RECORD still made Run write a GIF to any path the
environment named; games had to unset it before Run. Recording belongs
to the same outside-control surface as COLLIDER_AGENT (it is how agents
record their demos), so the same call now locks both. No new API: a
second switch would be one more thing every shipped game must remember,
and a game that wants demos keeps recording by calling DisallowAgents
only in release builds.

Run reads the path through recordPath, which returns "" for a game that
disallowed agents. Documented on DisallowAgents and Run, in the README
cheat sheet, agent and recording sections, and AGENTS.md.
@LucasAntunesdeAlmeida
LucasAntunesdeAlmeida merged commit cf12746 into master Sep 29, 2026
1 check passed
@LucasAntunesdeAlmeida
LucasAntunesdeAlmeida deleted the record-lockdown branch September 29, 2026 13:35
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