Skip to content

fix(wasm): seed AI passes in resolve all - #7471

Merged
matthewevans merged 2 commits into
mainfrom
ship/fix-wasm-seed-ai-passes-in-resolve-all
Aug 16, 2026
Merged

fix(wasm): seed AI passes in resolve all#7471
matthewevans merged 2 commits into
mainfrom
ship/fix-wasm-seed-ai-passes-in-resolve-all

Conversation

@matthewevans

@matthewevans matthewevans commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Improved AI action handling during game resolution.
    • AI priority passes now resolve correctly during fast-forward scenarios.
    • Resolution now stops when an AI declines to pass or provides an unsupported action.
    • Fixed stack resolution in three-player games involving seeded AI priority passes.

@matthewevans
matthewevans enabled auto-merge August 16, 2026 02:34
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d06c96c-9334-4d44-a0a4-bdc46669ae96

📥 Commits

Reviewing files that changed from the base of the PR and between 1191630 and 5d88c43.

📒 Files selected for processing (1)
  • crates/engine-wasm/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/engine-wasm/src/lib.rs

Included review availability: Your plan includes up to 2 reviews per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The resolve-all path now evaluates AI actions with the callback actor’s cloned priority prompt. It accepts only direct PassPriority actions and stops for other or absent actions. A three-player regression test verifies complete stack resolution.

Changes

AI resolve-all flow

Layer / File(s) Summary
Resolve-all action selection and regression coverage
crates/engine-wasm/src/lib.rs
The AI decision path installs the callback actor’s priority prompt before selecting an action. Only PassPriority continues direct resolution. The stop-condition documentation and three-player regression test reflect this behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 5d88c

This localized change has no actionable merge-blocking risk identified at the current head and is merge-ready after normal checks and review.

Possibly related PRs

  • phase-rs/phase#6977: Both changes affect AI PassPriority handling during priority resolution.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: seeding AI passes in the WASM resolve-all flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ship/fix-wasm-seed-ai-passes-in-resolve-all

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.

@matthewevans
matthewevans added this pull request to the merge queue Aug 16, 2026
Merged via the queue into main with commit a789357 Aug 16, 2026
15 checks passed
@matthewevans
matthewevans deleted the ship/fix-wasm-seed-ai-passes-in-resolve-all branch August 16, 2026 04:03
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