Skip to content

feat(qa): replay the Aravath slice across three OS - #280

Merged
lazyxeon merged 2 commits into
mainfrom
cursor/gameplay-qa-slice-0073
Oct 15, 2026
Merged

lazyxeon merged 2 commits into
mainfrom
cursor/gameplay-qa-slice-0073

Conversation

@lazyxeon

@lazyxeon lazyxeon commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Description

Scenario 1 of the approved gameplay QA plan, rebased onto current main after #243, #277, and #290. Still a draft. Not for merge.

run_aravath_slice stays one call. The scripted policy and the goal policy slice_sword_then_weave finish on:

ef7e38b580f2d157041d2d58bc0cac41dcf1442ac0ff6064d6ba52039adfc089

Required replay cases, all of them:

  • planner_pure
  • perception_world
  • gameplay_rng
  • fixed64
  • combat_resolve
  • destruction
  • gameplay_qa_aravath_slice

The audio rapid-volume test still writes its beep in a private temp directory (the #289 fix). It does not use the shared tests/assets tree.

ddmin runs only when QA_MINIMIZE=1 and the GitHub event is not pull_request.

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? astraweave-weaving depends on ron 0.8, serde_json, and sha2, already in the lockfile. The audio test uses the existing tempfile dev-dependency.
  • Does this PR modify how user input is handled? The scenario loader accepts a fixed RON action list. It does not read window or network input.
  • 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
Open in Web Open in Cursor 

@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: aaf1a751-2938-48e0-8322-eb76b96787b3
  • 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.

cursoragent and others added 2 commits October 15, 2026 17:30
Scripted and goal policies call run_aravath_slice once and must share
a trace. The failure artifact and ddmin stay off pull requests. The
new gameplay_qa_aravath_slice case joins the existing replay set.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The Windows archive deleted tests/assets while this test still had a
wav there. Write the beep in a private temp directory instead.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/gameplay-qa-slice-0073 branch from 3e80553 to e564037 Compare October 15, 2026 17:31
@lazyxeon
lazyxeon marked this pull request as ready for review October 15, 2026 18:35
Copilot AI balanced review requested due to automatic review settings October 15, 2026 18:35
@lazyxeon
lazyxeon merged commit 52b8c02 into main Oct 15, 2026
26 checks passed
@lazyxeon
lazyxeon deleted the cursor/gameplay-qa-slice-0073 branch October 15, 2026 18:35
@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-15T18:40:46.044936Z e564037 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.

@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: e5640375c3

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

Comment on lines +573 to +578
fn state_bytes(slice: &AravathSlice) -> Vec<u8> {
let mut out = Vec::with_capacity(8 * 3 + 1);
push_i64(&mut out, slice.sword_hp);
push_i64(&mut out, slice.weave_hp);
out.push(u8::from(slice.cover_intact));
push_i64(&mut out, slice.cover_damage);

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 Hash the canonical raw gameplay state

When combat changes only fractional Q32.32 bits, or destruction diverges in fields other than this bond's rounded damage/intact flag, this encoding remains identical because it hashes only four lossy summary values. The required three-OS case can therefore pass despite a real gameplay-state divergence; include raw combat values and DestructionWorld::state_hash() (or an equivalent canonical full-state digest) in the trace.

Useful? React with 👍 / 👎.

Comment on lines +846 to +848
let RunOutcome::Pass(first) = first else {
panic!("scripted and goal traces diverged or Reach failed");
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Persist the artifact before failing the replay test

When the required CI scenario returns RunOutcome::Fail because the goal trace or Reach check regresses, this arm discards the constructed artifact and immediately panics. Neither this test nor the workflow calls write_failure_artifact, so the advertised replayable diagnostic is unavailable precisely when the gate fails; write it under the target directory before aborting and arrange for the workflow to retain it on failure.

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open findings
What changed in this PR

Implements “Scenario 1” of gameplay QA for the Aravath one-tick slice and wires it into cross-OS determinism replay comparison.

Changes:

  • Added a new astraweave-weaving gameplay QA module that loads a bundled RON scenario, verifies scripted-vs-goal trace equality, emits a deterministic SHA-256 case, and can ddmin failures off-PR.
  • Extended the determinism replay workflow (and CI docs) to require and merge the new gameplay_qa_aravath_slice replay case across Ubuntu/Windows/macOS.
  • Adjusted an audio stress test to generate its beep in a private temp directory to avoid cross-test races.
File Description
scripts/​ci/​test_workflow_policy.py Updates deferred PR filter expectations to include the new replay case name.
docs/​current/​CI_ARCHITECTURE.md Documents the expanded determinism required-case set and updated replay behavior.
docs/​current/​AUTONOMOUS_GAMEPLAY_QA.md Updates the QA design doc to reflect Scenario 1 implementation and required replay cases.
docs/​architecture/​weaving.md Bumps doc version and documents new gameplay QA components and invariants.
astraweave-weaving/​src/​lib.rs Exposes the new gameplay_qa module and re-exports key APIs/constants.
astraweave-weaving/​src/​gameplay_qa.rs Adds scenario parsing/execution, hashing, artifact writing, and ddmin minimization logic with tests.
astraweave-weaving/​src/​aravath.rs Factors out ARAVATH_SLICE_SEED constant and uses it consistently.
astraweave-weaving/​scenarios/​aravath_slice_sword.ron Adds the shipped Scenario 1 RON file for the slice replay.
astraweave-weaving/​examples/​aravath_slice.rs Updates the example to run the bundled scenario and print the replay case digest.
astraweave-weaving/​Cargo.toml Adds ron, serde_json, and sha2 dependencies needed by gameplay QA.
astraweave-audio/​tests/​advanced_edge_cases.rs Writes rapid-volume beep into a temp dir instead of shared tests/assets.
.github/​workflows/​determinism-replay.yml Runs the new gameplay QA test and merges its replay-hash JSON into the required set.

🧠 Review effort: Lite


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

[dependencies]
# Core dependencies
anyhow = { workspace = true }
ron = "0.8"
Comment on lines +54 to +60
pub struct Reach {
pub by_tick: u64,
pub sword_hp: i64,
pub weave_hp: i64,
pub cover_intact: bool,
pub min_cover_damage: i64,
}
Comment on lines +386 to +394
pub fn write_replay_case(trace_sha256: &str) -> Result<PathBuf> {
let path = replay_case_path();
if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent).with_context(|| format!("create {}", parent.display()))?;
}
let body = format!("[\n {{ \"case\": \"{CASE_NAME}\", \"sha256\": \"{trace_sha256}\" }}\n]\n");
std::fs::write(&path, body).with_context(|| format!("write {}", path.display()))?;
Ok(path)
}
Comment on lines +503 to +505
let reduced = minimize(inputs, |candidate| {
failure_kind(scenario, candidate) == Some(kind)
});
Comment on lines +533 to +542
inputs: records(&chosen),
hashes: vec![HashRow {
tick: 0,
sha256: report.state_sha256,
}],
failure: FailureBody {
kind: kind.as_str().to_string(),
tick: 0,
detail,
},
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