Skip to content

Document the unit identity invariant for agents - #523

Merged
Frotty merged 1 commit into
codex/unit-entry-release-tracefrom
claude/unit-identity-docs
Nov 2, 2026
Merged

Frotty merged 1 commit into
codex/unit-entry-release-tracefrom
claude/unit-identity-docs

Conversation

@Frotty

@Frotty Frotty commented Nov 2, 2026

Copy link
Copy Markdown
Member

Documentation only. Stacked on #522 (base codex/unit-entry-release-trace), because it describes the identity contract that PR introduces; merge it after #522.

Adds a "Unit Lifecycle and Identity" section to AGENTS.md:

  • the invariant: every entering unit receives an index unless shouldIndex excludes it, with no lazy or dynamic indexing;
  • a unit without an index on getIndex/toUnitIndex is a bug or misuse, never something a lookup repairs; peekIndex and isIndexCurrent for lifecycle code and deferred work;
  • native events before entry (Tornado Slow Aura's zero self-damage inside CreateUnit) are handled by the listener, not by moving indexing;
  • never work around a missing index where it shows up: the failure seen in only some games came from a stale destroy freeing a live listener CodeList (refused on Lua by Refuse a destroy through a stale reference on Lua WurstScript#1593);
  • no references past destroy, since Lua reuses freed ids across classes;
  • which in-game suites prove changes here.

The detailed contract stays at the code sites (UnitIndexer and DamageEvent headers); this section links to them.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T15:44:09.052904Z c7e801a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty
Frotty merged commit 3c2afe6 into codex/unit-entry-release-trace Nov 2, 2026
2 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