diff --git a/.github/workflows/core-tip.yml b/.github/workflows/core-tip.yml index 6f51513..76acc88 100644 --- a/.github/workflows/core-tip.yml +++ b/.github/workflows/core-tip.yml @@ -46,7 +46,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false @@ -85,7 +85,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false @@ -151,7 +151,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - name: Install the Rust toolchain and Wasm target @@ -704,7 +704,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - name: Install the Rust toolchain and Wasm target @@ -926,7 +926,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - name: Install the Rust toolchain and Wasm target @@ -1125,7 +1125,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - name: Install the Rust toolchain and Wasm target diff --git a/.github/workflows/playerbots-capacity.yml b/.github/workflows/playerbots-capacity.yml index de3ad19..a745c40 100644 --- a/.github/workflows/playerbots-capacity.yml +++ b/.github/workflows/playerbots-capacity.yml @@ -42,7 +42,7 @@ jobs: with: repository: LyraCoreProject/LyraCore # Core supplies the shared private integration fixtures. - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -69,6 +69,13 @@ jobs: ref: 9c8a28944314cc9baa1f8ea6ff5a76be266e6cf2 path: preceding-runner-collection persist-credentials: false + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: LyraCoreProject/LyraCore + # Core main before the three-argument client-command marker, which the baseline predates. + ref: 0cae690301552430d713a582b0036e7096c215d2 + path: preceding-runner-core + persist-credentials: false - name: Install pinned Rust and SpacetimeDB run: | rustup toolchain install 1.93.0 --profile minimal @@ -109,12 +116,12 @@ jobs: sha256sum "$RUNNER_TEMP/movement-baseline.wasm" > "$RUNNER_TEMP/movement-baseline.sha256" echo "PLAYERBOTS_MOVEMENT_PRECEDING_WASM=$RUNNER_TEMP/movement-baseline.wasm" >> "$GITHUB_ENV" - name: Build the preceding Runner for movement queue migration - working-directory: lyracore + working-directory: preceding-runner-core env: CARGO_TARGET_DIR: ${{ runner.temp }}/runner-baseline-target run: | - "$GITHUB_WORKSPACE/preceding-runner-collection/.github/check-core-tip.sh" "$GITHUB_WORKSPACE/lyracore" \ - cargo build --manifest-path "$GITHUB_WORKSPACE/lyracore/Cargo.toml" --locked \ + "$GITHUB_WORKSPACE/preceding-runner-collection/.github/check-core-tip.sh" "$GITHUB_WORKSPACE/preceding-runner-core" \ + cargo build --manifest-path "$GITHUB_WORKSPACE/preceding-runner-core/Cargo.toml" --locked \ --release --target wasm32-unknown-unknown -p lyracore-module --features=debug_reducers cp "$CARGO_TARGET_DIR/wasm32-unknown-unknown/release/lyracore_module.wasm" "$RUNNER_TEMP/runner-baseline.wasm" sha256sum "$RUNNER_TEMP/runner-baseline.wasm" > "$RUNNER_TEMP/runner-baseline.sha256" diff --git a/.github/workflows/playerbots-class-behavior.yml b/.github/workflows/playerbots-class-behavior.yml index dcf2fcb..f091955 100644 --- a/.github/workflows/playerbots-class-behavior.yml +++ b/.github/workflows/playerbots-class-behavior.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - name: Install pinned Rust and SpacetimeDB diff --git a/.github/workflows/playerbots-target-claims.yml b/.github/workflows/playerbots-target-claims.yml index 9934866..2f3c8a9 100644 --- a/.github/workflows/playerbots-target-claims.yml +++ b/.github/workflows/playerbots-target-claims.yml @@ -41,7 +41,14 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: LyraCoreProject/LyraCore - ref: aa97e268610e6ac5ffd7d16eecfff678f86ee8fb + # Core main before the three-argument client-command marker, which the baseline predates. + ref: 0cae690301552430d713a582b0036e7096c215d2 + path: baseline-core + persist-credentials: false + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: LyraCoreProject/LyraCore + ref: 6ad7a35276e619678a9c8d2ef7f6395473c22dc5 path: lyracore persist-credentials: false - name: Install pinned Rust and SpacetimeDB @@ -61,14 +68,12 @@ jobs: with: workspaces: lyracore - name: Build the published Package baseline for additive migration - working-directory: lyracore - # A separate target directory keeps Cargo from reusing baseline artifacts for the current - # build, which differs only in where the Package symlinks point. + working-directory: baseline-core env: CARGO_TARGET_DIR: ${{ runner.temp }}/claim-baseline-target run: | - ../baseline/.github/check-core-tip.sh "$GITHUB_WORKSPACE/lyracore" \ - cargo build --manifest-path "$GITHUB_WORKSPACE/lyracore/Cargo.toml" --locked \ + ../baseline/.github/check-core-tip.sh "$GITHUB_WORKSPACE/baseline-core" \ + cargo build --manifest-path "$GITHUB_WORKSPACE/baseline-core/Cargo.toml" --locked \ --release --target wasm32-unknown-unknown -p lyracore-module --features=debug_reducers cp "$CARGO_TARGET_DIR/wasm32-unknown-unknown/release/lyracore_module.wasm" "$RUNNER_TEMP/claim-baseline.wasm" echo "PLAYERBOTS_CLAIM_BASELINE_WASM=$RUNNER_TEMP/claim-baseline.wasm" >> "$GITHUB_ENV" diff --git a/playerbots/src/orders.rs b/playerbots/src/orders.rs index 6863d18..6d39a49 100644 --- a/playerbots/src/orders.rs +++ b/playerbots/src/orders.rs @@ -9,6 +9,8 @@ pub(crate) const STAY: u8 = 1; pub(crate) const ASSIST: u8 = 2; pub(crate) const TARGET: u8 = 3; const HISTORY_LIMIT: usize = 8; +/// The addon command that carries each Companion Order outcome back to the issuer. +pub(crate) const ORDER_RESULT_COMMAND: &str = "playerbots.order.result"; #[derive(spacetimedb::SpacetimeType, Clone, Debug)] pub struct CommandIssuerFence { @@ -336,7 +338,7 @@ pub(crate) fn record_runtime_outcome( states.character_guid().update(state); } -crate::game_client_command!(parse_command, apply_command); +crate::game_client_command!(parse_command, apply_command, ORDER_RESULT_COMMAND); #[cfg(test)] mod tests { diff --git a/playerbots/testsuite/gateway_coordinator.rs b/playerbots/testsuite/gateway_coordinator.rs index 37e82b0..377bcce 100644 --- a/playerbots/testsuite/gateway_coordinator.rs +++ b/playerbots/testsuite/gateway_coordinator.rs @@ -1598,13 +1598,13 @@ fn companion_command_lost_receipt_after_guarantee_reports_unknown_without_reappl topology.cli.call( topology.node.server(), &topology.target, - "playerbots_fixture_command_release_receipt", + "party_command_fixture_release_receipt", &[&topology.target_party.warrior.to_string()], ); topology.cli.call( topology.node.server(), topology.source(), - "playerbots_fixture_command_expire_after_receipt_window", + "party_command_fixture_expire_after_receipt_window", &[&intent_id.to_string()], ); assert!(poll_until(POLL_TIMEOUT, || { @@ -1835,7 +1835,7 @@ fn companion_command_capacity_waits_without_ack_then_recovers_or_expires() { topology.cli.call( topology.node.server(), &topology.target, - "playerbots_fixture_command_release_receipt", + "party_command_fixture_release_receipt", &[&topology.target_party.warrior.to_string()], ); assert_eq!( @@ -1860,7 +1860,7 @@ fn companion_command_capacity_waits_without_ack_then_recovers_or_expires() { topology.cli.call( topology.node.server(), topology.source(), - "playerbots_fixture_command_expire", + "party_command_fixture_expire", &[&expiry_id.to_string()], ); let expired = cached_intent_when(&source, expiry_id, |row| { diff --git a/playerbots/testsuite/tests/playerbots_orders.rs b/playerbots/testsuite/tests/playerbots_orders.rs index a1bdeb4..43f3866 100644 --- a/playerbots/testsuite/tests/playerbots_orders.rs +++ b/playerbots/testsuite/tests/playerbots_orders.rs @@ -317,10 +317,10 @@ fn finish_refused_command(fixture: &OrdersFixture, payload: &str, token_base: u6 let token = (token_base + intent.parse::().unwrap()).to_string(); fixture .node - .assert_call("playerbots_fixture_command_apply", &[&intent, &token]); + .assert_call("party_command_fixture_apply", &[&intent, &token]); fixture .node - .assert_call("playerbots_fixture_command_finish", &[&intent, &token]); + .assert_call("party_command_fixture_finish", &[&intent, &token]); intent } @@ -570,7 +570,7 @@ fn playerbots_each_issuer_fence_survives_intervening_leadership() { let newer_token = (16_000 + newer.parse::().unwrap()).to_string(); node.assert_call("claim_party_command_intent", &[&older, &older_token]); node.assert_call("defer_party_command_intent", &[&older, &older_token]); - node.assert_call("playerbots_fixture_command_drive", &[&newer, &newer_token]); + node.assert_call("party_command_fixture_drive", &[&newer, &newer_token]); let applied_newer = order(node, &fixture.warrior); let sequences = node.query_rows(&format!( "SELECT id, issuer_sequence FROM game_party_command_intent WHERE id = {older} OR id = {newer}" @@ -598,7 +598,7 @@ fn playerbots_each_issuer_fence_survives_intervening_leadership() { node.assert_call("claim_party_command_intent", &[&older, &older_token]); node.assert_call("defer_party_command_intent", &[&older, &older_token]); node.assert_call( - "playerbots_fixture_command_drive", + "party_command_fixture_drive", &[&intervening, &intervening_token], ); let applied_intervening = order(node, &fixture.warrior); @@ -607,8 +607,8 @@ fn playerbots_each_issuer_fence_survives_intervening_leadership() { pass(node, &fixture.warrior); let before_delayed = order(node, &fixture.warrior); evidence(&fixture, "intervening-order-inactive-before-delayed-intent"); - node.assert_call("playerbots_fixture_command_apply", &[&older, &older_token]); - node.assert_call("playerbots_fixture_command_finish", &[&older, &older_token]); + node.assert_call("party_command_fixture_apply", &[&older, &older_token]); + node.assert_call("party_command_fixture_finish", &[&older, &older_token]); let after_delayed = order(node, &fixture.warrior); let receipt = node.query_rows(&format!( "SELECT outcome FROM game_party_command_receipt WHERE intent_id = {older}" @@ -1499,11 +1499,11 @@ fn playerbots_order_target_gate_rechecks_body_and_consent_after_authority() { let suppressed = queue(&fixture, &format!("follow|{}", fixture.warrior)); let suppressed_token = 40_000 + suppressed.parse::().unwrap(); node.assert_call( - "playerbots_fixture_command_apply_after_gate_change", + "party_command_fixture_apply_after_gate_change", &[&suppressed, &suppressed_token.to_string(), "2"], ); node.assert_call( - "playerbots_fixture_command_finish", + "party_command_fixture_finish", &[&suppressed, &suppressed_token.to_string()], ); let suppressed_receipt = node.query_rows(&format!( @@ -1523,11 +1523,11 @@ fn playerbots_order_target_gate_rechecks_body_and_consent_after_authority() { let missing = queue(&fixture, &format!("follow|{}", fixture.mage)); let missing_token = 41_000 + missing.parse::().unwrap(); node.assert_call( - "playerbots_fixture_command_apply_after_gate_change", + "party_command_fixture_apply_after_gate_change", &[&missing, &missing_token.to_string(), "1"], ); node.assert_call( - "playerbots_fixture_command_finish", + "party_command_fixture_finish", &[&missing, &missing_token.to_string()], ); let missing_receipt = node.query_rows(&format!( @@ -2047,7 +2047,7 @@ fn playerbots_command_receipts_survive_history_rollover_and_wait_for_capacity() let waiting = queue(&fixture, &payload); let token = (20_000 + waiting.parse::().unwrap()).to_string(); - node.assert_call("playerbots_fixture_command_apply", &[&waiting, &token]); + node.assert_call("party_command_fixture_apply", &[&waiting, &token]); let pending = node.query_rows(&format!( "SELECT pending, state FROM game_party_command_intent WHERE id = {waiting}" )); @@ -2088,12 +2088,9 @@ fn playerbots_command_receipts_survive_history_rollover_and_wait_for_capacity() .to_ascii_lowercase() .contains("applied")); - node.assert_call( - "playerbots_fixture_command_release_receipt", - &[&fixture.warrior], - ); - node.assert_call("playerbots_fixture_command_apply", &[&waiting, &token]); - node.assert_call("playerbots_fixture_command_finish", &[&waiting, &token]); + node.assert_call("party_command_fixture_release_receipt", &[&fixture.warrior]); + node.assert_call("party_command_fixture_apply", &[&waiting, &token]); + node.assert_call("party_command_fixture_finish", &[&waiting, &token]); let finished = node.query_rows(&format!( "SELECT pending, state FROM game_party_command_intent WHERE id = {waiting}" )); @@ -2109,7 +2106,7 @@ fn playerbots_command_receipts_survive_history_rollover_and_wait_for_capacity() .is_empty()); let expired_head = &blocked[1]; - node.assert_call("playerbots_fixture_command_expire", &[expired_head]); + node.assert_call("party_command_fixture_expire", &[expired_head]); let before_rotation = node.query_rows("SELECT head_intent_id FROM game_party_command_dispatch_lane"); node.assert_call("defer_party_command_intent", &[expired_head, "999999"]);