Skip to content

fix(package-delta): protect fixture creatures from cast claims - #434

Merged
Mathih13 merged 1 commit into
mainfrom
fix/fixture-creature-casts
Sep 5, 2026
Merged

Mathih13 merged 1 commit into
mainfrom
fix/fixture-creature-casts

Conversation

@Mathih13

@Mathih13 Mathih13 commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Package Delta parsing accepted cast claims that named the Module fixture creature cluster. A partial game_creature_spell update could also hide its fixture target in the existing row, or replace that target while changing the fixture-owned row.

The parser now applies the existing creature-entry fixture policy at each table's artifact boundary. game_creature_cast checks its creature_entry key. game_creature_spell keeps its surrogate id policy and checks an explicit creature_entry field.

The casts reference Gate also checks the existing and final creature targets after it resolves the row on the Shard. This closes partial-update and retarget-away paths without requiring creature_entry on every update. Imported creature entries remain accepted.

Closes #404

Verification:

  • cargo test -p lyracore-package-delta
  • cargo test -p lyracore-module
  • Both cast reference tests against new private loopback Shards
  • cargo clippy -p lyracore-package-delta --all-targets -- -D warnings
  • Standard Clippy for both affected crates, with no warnings in changed files
  • rustfmt --edition 2021 --check on the four changed files
  • ./lyracore preflight

Implemented by GPT-5.6 Sol via Codex.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9b2faaab-e495-4bfb-884d-d2564978a9e5

📥 Commits

Reviewing files that changed from the base of the PR and between 1ff8d3c and 784b67f.

📒 Files selected for processing (2)
  • crates/lyracore-package-delta/src/delta.rs
  • crates/lyracore-package-delta/tests/cast_identifiers.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change reuses creature-entry validation for creature casts and creature spells. Claims now reject zero, oversized, and fixture-reserved creature entries. Tests cover fixture rejection for both cast tables.

Changes

Creature cast validation

Layer / File(s) Summary
Shared creature-entry validation
crates/lyracore-package-delta/src/delta.rs
The shared validator now receives table and key-member context. Creature casts and creature spells use checks for zero, 24-bit width, and fixture reservation.
Cast identifier validation coverage
crates/lyracore-package-delta/tests/cast_identifiers.rs
Documentation and tests cover fixture-reserved creature entries in game_creature_spell and game_creature_cast.

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

Merge Risk: ⚪ Minimal · up to 784b6

Creature cast and spell claims now reject reserved fixture creature entries while preserving valid imported entries and partial spell updates. The affected validation paths and rejection behavior are covered, with no remaining merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy #404. They reuse shared creature-entry validation for both cast tables, reject fixture-cluster entries, preserve imported-entry handling, and add coverage for both tables.
Out of Scope Changes check ✅ Passed All implementation, documentation, and test changes directly support the linked issue objectives. No unrelated changes are shown.
Docstring Coverage ✅ Passed Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing cast claims from targeting fixture creatures in Package Delta.
✨ 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 fix/fixture-creature-casts

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

@Mathih13
Mathih13 force-pushed the fix/fixture-creature-casts branch from 784b67f to 1b120cc Compare September 5, 2026 06:53
@Mathih13
Mathih13 merged commit 2365075 into main Sep 5, 2026
6 checks passed
@Mathih13
Mathih13 deleted the fix/fixture-creature-casts branch October 11, 2026 18:20
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.

Package Deltas: creature casts can retarget the Module's fixture creatures

1 participant