Skip to content

docs: plan autonomous gameplay QA for the Aravath slice - #277

Merged
lazyxeon merged 1 commit into
mainfrom
cursor/gameplay-qa-design-0073
Oct 15, 2026
Merged

lazyxeon merged 1 commit into
mainfrom
cursor/gameplay-qa-design-0073

Conversation

@lazyxeon

Copy link
Copy Markdown
Owner

Description

Design only. No runner, scenario loader, or workflow is added. Review the plan in docs/current/AUTONOMOUS_GAMEPLAY_QA.md before any implementation.

Synthetic players should attempt objectives in headless fixed-tick runs and report softlocks, unreachable objectives, save/reload breakage, and simple exploits. Each failure writes a seed, an input stream, per-tick state hashes, and a failure condition that replays on Linux, Windows, and macOS. Scripted and goal-driven bots come first. Learning-based exploit hunters stay deferred.

The dig found:

This pull request does not merge.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security enhancement

Security Considerations

  • Does this PR introduce new dependencies? No.
  • Does this PR modify how user input is handled? No. The plan describes a future tick-input adapter and does not change input code.
  • Does this PR change authentication or authorization mechanisms?
  • Does this PR access sensitive data or modify how it's stored?
  • Does this PR introduce new network communication or modify existing protocols?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have run security checks (cargo audit, cargo deny) locally

Tests are intentionally absent: this change is a design document. Claims in the doc were checked against main and the open PR heads (golden hash 9b607d1a840ecd64, run_aravath_slice on #212 and #275, required replay cases on main).

Open in Web Open in Cursor 

Map the slice, greybox golden replay, save path, and CI tiers, and
stop before adding a runner. The design is for review and is not merged.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b90e2a23-43fe-4a6f-ae7b-3d7fa0e2cdc4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lazyxeon
lazyxeon marked this pull request as ready for review October 15, 2026 16:46
Copilot AI balanced review requested due to automatic review settings October 15, 2026 16:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-10-15T16:48:24.776401Z f4cc6b1 Draft marked ready
ℹ️ 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.

@lazyxeon
lazyxeon merged commit 379e4b1 into main Oct 15, 2026
23 checks passed
@lazyxeon
lazyxeon deleted the cursor/gameplay-qa-design-0073 branch October 15, 2026 16:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4cc6b1ac5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- `Reach` matches the unit test: sword hp 15, weave hp 25, cover not intact, cover damage at least 25.
- `SaveReload` at that tick writes `combat_vitals` plus `DestructionWorld::state_hash` through the combat and destruction helpers, loads them into a new app with the same seed and table, and requires the twin hash. It does not call `SaveManager::save`, so `Uuid` and the clock stay out of the trace.
- `SameSeqTwice` replays the sword hit with seq 0 a second time in that tick. The predicate fails if vitals or the destruction hash move. If today's resolver applies the hit twice, the run fails and the artifact is the finding. The design does not pre-decide a resolver change.
- A goal-bot twin of the same file must finish on the same hash trace. A difference is `TerminalMismatch` with detail `goal_bot_diverged`, which means the policy is wrong. It is not a game defect until the scripted run also fails.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Compare the goal bot's terminal state instead

The scripted bot applies both hits and WeaveDecay in one tick, whereas the policy defined above necessarily emits the sword hit, weave hit, and decay on successive ticks because it calls decide only once per tick. Their per-tick hash traces therefore differ even when both reach exactly the intended final state, so this required goal-bot twin will always report goal_bot_diverged; compare the terminal hash or give both bots the same action schedule.

Useful? React with 👍 / 👎.

- Seed `0xA11C_E5EE`, the seed already in `run_aravath_slice`.
- Scripted bot emits the two `HitEvent`s the function already pushes (`sword_light` id 1 at the cover, `weave_bolt` id 3 at the woven target) and the weave-decay command, in one tick, seq order 0 then 1.
- `Reach` matches the unit test: sword hp 15, weave hp 25, cover not intact, cover damage at least 25.
- `SaveReload` at that tick writes `combat_vitals` plus `DestructionWorld::state_hash` through the combat and destruction helpers, loads them into a new app with the same seed and table, and requires the twin hash. It does not call `SaveManager::save`, so `Uuid` and the clock stay out of the trace.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Persist restorable destruction state

DestructionWorld::state_hash is only a digest and cannot be loaded to reconstruct the broken cover bond. Creating a new app with the same seed recreates the initial intact destruction world, so the proposed save/reload twin either mismatches every time or must replay prior inputs instead of testing restoration; the checkpoint needs to serialize and restore the actual destruction state, using the hash only for comparison.

Useful? React with 👍 / 👎.


The minimizer runs only after a predicate fails, and only off the pull-request path. It is ddmin on the input list:

- Delete a chunk of ticks, replay from tick 0, keep the deletion when the failure `kind` is the same. The tick index inside the condition is allowed to move. The kind is not.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the exact failing predicate during minimization

Keeping a deletion whenever only the failure kind matches can minimize to an unrelated defect: all named exploit predicates map to Exploit, and both reach failures and goal-policy divergence map to TerminalMismatch. In scenarios with more than one such check, ddmin can remove the input that triggers the original finding while retaining another failure of the same kind, producing a misleading artifact; preservation must include a stable predicate/check identifier as well as the kind.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Replay, minimization, action ordering, and snapshot contracts need corrections before they can reliably guide implementation.

5 open findings
What changed in this PR

Designs autonomous gameplay QA for Aravath without adding runtime code or workflows.

Changes:

  • Maps existing simulation, replay, and persistence capabilities.
  • Defines bot actions, scenarios, failure artifacts, and minimization.
  • Plans staged implementation within existing CI tiers.
File Description
docs/​current/​AUTONOMOUS_GAMEPLAY_QA.md Defines the QA design, dependencies, and rollout plan.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}
```

Per-tick state bytes for the slice are the combat replay's layout: sorted entity ids, `Fixed64` raw little-endian, then the 32-byte destruction hash. That is integer data, so Linux, Windows, and macOS can match without an FMA pin. The greybox FNV `Canon` digest may be stored in a later artifact as 16 hex digits. It is not a required three-OS case until a macOS run matches Ubuntu and Windows on the same pin. Putting `f32` physics bits into the required compare would fail macOS for a reason the greybox workflow has never measured.
2. Build `setup` at `seed`.
3. Apply `inputs[t]` and step once. Hash. Compare to `hashes[t]`.
4. Stop at the first mismatch. The message includes the tick, the expected hash, and the actual hash.
5. If the hashes match through the end, re-evaluate `failure` against the live world. A reproduced failure exits non-zero with the condition. A clean run of an artifact that claimed a failure exits non-zero with `artifact_did_not_reproduce`.

The minimizer runs only after a predicate fails, and only off the pull-request path. It is ddmin on the input list:

- Delete a chunk of ticks, replay from tick 0, keep the deletion when the failure `kind` is the same. The tick index inside the condition is allowed to move. The kind is not.
- Seed `0xA11C_E5EE`, the seed already in `run_aravath_slice`.
- Scripted bot emits the two `HitEvent`s the function already pushes (`sword_light` id 1 at the cover, `weave_bolt` id 3 at the woven target) and the weave-decay command, in one tick, seq order 0 then 1.
- `Reach` matches the unit test: sword hp 15, weave hp 25, cover not intact, cover damage at least 25.
- `SaveReload` at that tick writes `combat_vitals` plus `DestructionWorld::state_hash` through the combat and destruction helpers, loads them into a new app with the same seed and table, and requires the twin hash. It does not call `SaveManager::save`, so `Uuid` and the clock stay out of the trace.
The runner:

1. Builds the world with the scenario seed by running the same table install and spawns as `run_aravath_slice`. The function stays the reference for the unsplit end state. The tickable session is that function's steps pulled apart, still calling `install`, `combat_resolve_system`, `enqueue_weave`, and `DestructionWorld::tick`. It is not a new resolver.
2. For each tick, takes `decide`, applies actions in `seq` order, runs the existing systems once, appends the state hash.
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.

3 participants