Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/core-tip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/playerbots-capacity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/playerbots-class-behavior.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/playerbots-target-claims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion playerbots/src/orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions playerbots/testsuite/gateway_coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, || {
Expand Down Expand Up @@ -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!(
Expand All @@ -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| {
Expand Down
33 changes: 15 additions & 18 deletions playerbots/testsuite/tests/playerbots_orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ fn finish_refused_command(fixture: &OrdersFixture, payload: &str, token_base: u6
let token = (token_base + intent.parse::<u64>().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
}

Expand Down Expand Up @@ -570,7 +570,7 @@ fn playerbots_each_issuer_fence_survives_intervening_leadership() {
let newer_token = (16_000 + newer.parse::<u64>().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}"
Expand Down Expand Up @@ -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);
Expand All @@ -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}"
Expand Down Expand Up @@ -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::<u64>().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!(
Expand All @@ -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::<u64>().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!(
Expand Down Expand Up @@ -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::<u64>().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}"
));
Expand Down Expand Up @@ -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}"
));
Expand All @@ -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"]);
Expand Down
Loading