Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,18 @@ The current major themes are:
- smoother worker motion
- clearer economy/build bottleneck feedback
- focus mode and zoom

## Testing Traps (learned by the loop)

- `assert_eq` takes `(actual, expected, name)` — the `name` is **required**. A
2-arg call is a GDScript **parse error**, and a parse error drops the whole
test file: every other test in it silently stops running, and the failure is
reported as "Parse Error" in the output, never as a failing assertion. Check
output for `Parse Error` as well as the summary line. (Shipped in #321: the
suite lost its pre-existing coverage without a single red assertion.)
- Run suites headless the way CI does:
`godot --headless --path . --script res://tests/<suite>.gd` with
`HOME=/tmp XDG_DATA_HOME=/tmp/.local/share` in constrained environments.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor (docs): The documented headless invocation adds HOME=/tmp and XDG_DATA_HOME=/tmp/.local/share as part of 'the way CI does', but the CI script-tests job in .github/workflows/test.yml runs Godot headless without setting those environment variables; consider clarifying they are only for constrained local environments.

Automated finding from AI PR review.

- `tick_rewards` checks `remaining <= 0` **before** decrementing: a reward with
duration N survives N ticks and expires on tick N+1. Tests asserting expiry
must tick one past the duration.