Skip to content

feat(playerbots): gate bot control and verify durable objectives - #484

Merged
Mathih13 merged 7 commits into
mainfrom
feat/playerbots-durable-runner
Sep 8, 2026
Merged

Mathih13 merged 7 commits into
mainfrom
feat/playerbots-durable-runner

Conversation

@Mathih13

@Mathih13 Mathih13 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Automatic bot invitations could still be accepted after the Package selected RecordOnly or Frozen. A new Account Claim could also arrive before the Character's online flag changed.

Put session-less ownership and consent Gates in the Module. The Gateway asks the owning World Shard to admit each automatic group action and distinguishes suppression from unavailable Actors. Controller selection clears unclaimed Group Intents in the same transaction. Consent follows Character Transfer. An action admitted before selection may finish at Realm-core afterwards.

Expose the ownership Gate and optional navigation coverage generation to the Package. Add real durable runner cases for retained return-home objectives, interruption and cancellation, bounded scheduling, explanations, human ownership handoff, and populated migration from the pinned preceding Wasm. The paired Package implements the runner: LyraCoreProject/packages#26.

Validation: clean Package union at Core 41488bf and Package 584d01b passed 1,631 library tests, 1,632 with debug reducers, 31 real action/runner cases, two personality cases and five consent cases. The migration published populated preceding Wasm and upgraded the same private database. Every runtime input record reports clean source trees and Wasm BLAKE3 70b3d7ea1d39a79b947f3cf69078ed45c0775e2bec7218d3d611e412579e6a0c.

Current-head CI passed default Module, Gateway, importer/shared suites, formatting, Clippy, Wasm and Gateway binding parity. Both standards and specification reviews are clear. All Core workflow jobs, including the full durable suite, passed.

Implemented with GPT-6 Astra in the Codex harness. Independent standards review uses GPT-5.6 Sol; specification review uses GPT-6 Astra.

Summary by CodeRabbit

  • New Features

    • Added sessionless action consent controls for characters acting without an active session.
    • Added admission checks for automatic group actions and bot invitations.
    • Consent now follows characters during transfers and clears pending, unclaimed group intents when changed.
    • Added clearer outcomes for accepted, refused, suppressed, or unavailable group actions.
  • Bug Fixes

    • Prevented suppressed or unavailable actions from automatically accepting invitations.
    • Improved handling of already-claimed bot invitations and other refusal scenarios.
  • Documentation

    • Documented bot behavior, sessionless consent, action gating, and related API capabilities.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Review Change StackReview 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: 517f01fa-4aa9-4f50-9d1e-3e3cbef0e504

📥 Commits

Reviewing files that changed from the base of the PR and between ca33b76 and 41488bf.

📒 Files selected for processing (26)
  • CONTEXT.md
  • crates/lyracore-shared/src/group.rs
  • docs/package-api.md
  • gateway/src/stdb/bindings/admit_sessionless_group_action_reducer.rs
  • gateway/src/stdb/bindings/bot_invite_intent_type.rs
  • gateway/src/stdb/bindings/debug_emit_sessionless_group_intent_reducer.rs
  • gateway/src/stdb/bindings/debug_set_sessionless_action_consent_reducer.rs
  • gateway/src/stdb/bindings/game_sessionless_action_consent_table.rs
  • gateway/src/stdb/bindings/mod.rs
  • gateway/src/stdb/bindings/sessionless_action_consent_type.rs
  • gateway/src/stdb/reducers.rs
  • gateway/src/stdb/world_store.rs
  • gateway/src/world/party.rs
  • gateway/src/world/party_tests.rs
  • gateway/src/world/social.rs
  • gateway/src/world/store.rs
  • gateway/src/world/tests.rs
  • module/src/actor.rs
  • module/src/group.rs
  • module/src/lib.rs
  • module/src/nav.rs
  • module/src/sessionless.rs
  • module/src/tripwires.rs
  • module/tests/playerbots_rewrite.rs
  • module/tests/playerbots_rewrite/runner.rs
  • module/tests/sessionless_consent.rs
💤 Files with no reviewable changes (1)
  • module/src/tripwires.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds character-owned sessionless action consent, World Shard admission gates, structured party outcomes, generated Gateway bindings, character transfer handling, and integration tests for party and bot behavior.

Changes

Sessionless consent and bot admission

Layer / File(s) Summary
Consent storage and gating
crates/lyracore-shared/src/group.rs, module/src/sessionless.rs, module/src/group.rs, module/src/lib.rs, module/src/actor.rs, module/src/nav.rs
The module adds consent storage, action gates, group-action gates, consent reducers, intent clearing, character transfer hooks, and the ActionSuppressed refusal.
World Shard admission and party routing
gateway/src/world/*, gateway/src/stdb/reducers.rs, gateway/src/stdb/world_store.rs, gateway/src/world/party_tests.rs
Sessionless party actions use World Shard admission. Invite and intent handling now use PartyOutcome values and preserve pending invitations when admission is unavailable or refused.
Gateway bindings and consent table
gateway/src/stdb/bindings/*
Generated bindings add consent rows, reducer calls, indexed table access, callbacks, cache updates, and query support.
Bot behavior validation and API documentation
CONTEXT.md, docs/package-api.md, module/tests/*, module/src/tripwires.rs
Documentation describes bot and consent behavior. Integration tests cover consent lifecycle, transfers, admission, controller modes, scheduling, casts, objectives, migration, and movement.

Priority: ➖ Normal — Schedule the playerbot control change because it spans consent gating, World Shard admission, durable objectives, and party behavior across Core, Package, and Gateway.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: ⚪ Minimal · up to 41488

No remaining issue blocks merging this change.

Sequence Diagram(s)

sequenceDiagram
  participant Party as Party flow
  participant WorldShard as World Shard
  participant Module as Sessionless module
  participant RealmCore as Realm-core
  Party->>WorldShard: Request sessionless admission
  WorldShard->>Module: Validate ownership, session, entity, and consent
  Module-->>WorldShard: Return admission outcome
  WorldShard-->>Party: Return PartyOutcome
  Party->>RealmCore: Accept or decline the group action
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 55.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 101 functions across 22 files. (3 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: bot-control gating and durable objective verification.
Full details: Docstring Coverage

Explanation

Docstring coverage is 55.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 101 functions across 22 files. (3 skipped: 2 unsupported, 1 too large.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/playerbots-durable-runner

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.

@Mathih13

Mathih13 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Source review is complete for core 41488bfe8fecae21498371e172969c01948e7bc2 and Package 584d01b00b2b241b6d5667bb810b49af0430d634.

Standards

No remaining findings. Actions now carry their required data, home movement has an explicit target type, Candidate terminology matches the glossary, and the core owns the route expansion limit. Strategy defaults and priority adjustments remain because PB-002 explicitly requires them.

Spec

No remaining source findings. Review found and checked fixes for Survival bypassing destination deferral, false stalls during tactical movement, and repeated cycle refusal being mistaken for prerequisite completion. The final serializer correction preserves action data, dispatch, and ordering.

The strengthened tactical case pursues away from home, so an arrival-stage change cannot mask the old stall. The ownership case exercises an Account Claim while online is still false and preserves a later human cast.

Final checks are running from clean, fixed commits. Merge still waits for their results, the populated upgrade, and current CI. Earlier runs that overlapped source edits are excluded from final source-identity evidence.

Independent standards review used GPT-5.6 Sol; specification review used GPT-6 Astra in Codex. The orchestrator reviewed the complete final encoding correction against both axes.

@Mathih13
Mathih13 marked this pull request as ready for review September 8, 2026 14:50
@Mathih13
Mathih13 merged commit 7614201 into main Sep 8, 2026
7 checks passed
@Mathih13
Mathih13 deleted the feat/playerbots-durable-runner 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.

1 participant