Skip to content

fix(parser): gate same-name artifact wins - #7318

Merged
matthewevans merged 3 commits into
mainfrom
ship/6398-same-name-artifact-wins
Aug 12, 2026
Merged

fix(parser): gate same-name artifact wins#7318
matthewevans merged 3 commits into
mainfrom
ship/6398-same-name-artifact-wins

Conversation

@matthewevans

@matthewevans matthewevans commented Aug 12, 2026

Copy link
Copy Markdown
Member

Fixes #6398.

Parses the complete with the same name as one another condition using the existing grouped-name maximum quantity, so Mechanized Production only wins when one artifact name reaches the required threshold.

Validation: cargo fmt --all; focused parser regression added. Exact compilation/tests are delegated to CI.

Summary by CodeRabbit

  • New Features

    • Parser now accepts the optional phrase “as one another” in shared-name control-count conditions.
    • Added support for parsing Mechanized Production, including its upkeep, token-copy effect, and conditional win effect.
  • Documentation

    • Updated grammar documentation to reflect the expanded condition syntax.
  • Tests

    • Added coverage for Mechanized Production parsing and its gameplay conditions.

@matthewevans
matthewevans enabled auto-merge August 12, 2026 22:36
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@matthewevans, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 10df0497-0c2e-457b-b739-14c16aac3e9b

📥 Commits

Reviewing files that changed from the base of the PR and between 1a328f0 and 0b2f257.

📒 Files selected for processing (1)
  • crates/engine/src/parser/oracle_tests.rs

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: 99ef3c84-20bb-4b4d-96d8-194feba9b6a9

📥 Commits

Reviewing files that changed from the base of the PR and between 479ad39 and 1a328f0.

📒 Files selected for processing (2)
  • crates/engine/src/parser/oracle_nom/condition.rs
  • crates/engine/src/parser/oracle_tests.rs

📝 Walkthrough

Walkthrough

The Oracle parser now accepts “as one another” in shared-name control-count conditions. A Mechanized Production test verifies that the parser requires eight artifacts with the same name for its win condition.

Changes

Oracle condition parsing

Layer / File(s) Summary
Shared-name grammar support
crates/engine/src/parser/oracle_nom/condition.rs
The parser accepts the optional “as one another” phrase after name. The parser documentation reflects the expanded grammar.
Mechanized Production parser validation
crates/engine/src/parser/oracle_tests.rs
The test verifies that the win condition uses a maximum shared-name artifact count of eight.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 1a328

This localized parser change tightens same-name artifact matching and adds a focused regression test; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

Suggested labels: bug

Suggested reviewers: keloide, lgray, jacobwoodson

🚥 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 describes the parser fix for same-name artifact win conditions.
Linked Issues check ✅ Passed The parser change enforces same-name grouping and the required artifact quantity for issue #6398.
Out of Scope Changes check ✅ Passed The parser update, documentation change, and focused regression test are within issue #6398 scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/6398-same-name-artifact-wins

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.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

Generated for head 0b2f2575b6d2f24a5894a1afe9bfee813829ba56.

Parse changes introduced by this PR · 2 card(s), 4 signature(s) (baseline: main 62f33f52400c)

🟢 Added (1 signature)

  • 1 card · ➕ ability/Token · added: Token (token=+4/+4 Construct (Artifact Creature Construct))
    • Affected (first 3): Chrome Replicator

🔴 Removed (1 signature)

  • 1 card · ➖ ability/nontoken · removed: nontoken (conditional=# of in battlefield you control non-land ≥ 2)
    • Affected (first 3): Chrome Replicator

🟡 Modified fields (2 signatures)

  • 1 card · 🔄 trigger/ChangesZone · changed field condition: greatest shared Name count among nontoken in battlefield you control permanent non-land ≥ 2
    • Affected (first 3): Chrome Replicator
  • 1 card · 🔄 ability/WinTheGame · changed field conditional: greatest shared Name count among in battlefield you control artifact ≥ 8
    • Affected (first 3): Mechanized Production

@matthewevans
matthewevans added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit cc76680 Aug 12, 2026
15 checks passed
@matthewevans
matthewevans deleted the ship/6398-same-name-artifact-wins branch August 12, 2026 23:56
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.

mechanized production — [[mechanized production]] seems to automatically win the game as soon as it copies a token once…

1 participant