Observability Suite

Live GAS Event Causality Timeline

When automating complex Gameplay Ability System (GAS) gameplay in Unreal Engine, failures often manifest as subtle attribute desyncs or mystery double-damage calculations. Specter captures and reconstructs a high-resolution chronological timeline directly in your test console and Playwright reports whenever a GAS assertion fails.

How It Works

Whenever any GAS assertion fails or times out—including toHaveAttributeValue, toHaveAttributeChange, toHaveAppliedGameplayEffect, or toHaveActivatedAbility—Specter queries the in-engine Ability System Components and automatically prints the execution chain leading up to the failure.

Error: expect(getByTag('Spawned_b5706d1f')).toHaveAttributeValue('HealthSet', 'Health', 2400)

Expected: 2400
Received: 2300
History: [2500, 2300]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📜 GAS EVENT CAUSALITY TIMELINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   • 🎯 [Server] [1.02s] Ability Activated: Ability.Slot.BasicAttack.SingleShot | Instigator: Howitzer
   • ⚡ [Server] [1.45s] Effect Applied: GE_Howitzer_BasicAttack -> Target: [Steel] | Instigator: Howitzer | Ability: Ability.Slot.BasicAttack.SingleShot
   • 📊 [Server] [1.45s] Attribute 'Health' on [Steel]: 2500 -> 2400 (Delta: -100.0) | Effect: GE_Howitzer_BasicAttack | Instigator: Howitzer
   • ⚡ [Server] [1.46s] Effect Applied: GE_Howitzer_BasicAttack -> Target: [Steel] | Instigator: Howitzer | Ability: Ability.Slot.BasicAttack.SingleShot
   • ⚠️ [Server] [1.46s] [DIAGNOSTIC WARNING] Rapid duplicate effect application: 'GE_Howitzer_BasicAttack' applied twice within 10.0ms
   • 📊 [Server] [1.46s] Attribute 'Health' on [Steel]: 2400 -> 2300 (Delta: -100.0) | Effect: GE_Howitzer_BasicAttack | Instigator: Howitzer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 SPECTER AI DIAGNOSTICS REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Actor Identity Mapping:
  • Target: [Steel] -> BP_Hero_Steel_C_1 (Tag: Spawned_b5706d1f)
  • Instigator: [Howitzer] -> BP_Hero_Howitzer_C_0 (Tag: Spawned_a129f8c3)

Failure Analysis:
  • Assertion expected Health = 2400 on [Steel], but received 2300 (Delta: -200 vs expected -100).
  • 'GE_Howitzer_BasicAttack' was applied TWICE within 10.0ms at [1.45s] and [1.46s].
  • Both applications were triggered by Ability Spec 'Ability.Slot.BasicAttack.SingleShot'.

Recommended Fix:
  1. Inspect BP_Howitzer_Projectile: ensure overlap/hit event has a 'DoOnce' node.
  2. Check ability montage notify events: ensure damage is not triggered by both anim notify and hit trace.
  3. Verify RPC replication: ensure ServerApplyDamage is not called from both client prediction and server trigger.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Anatomy of a Causality Timeline

Each entry in the timeline is classified and structured to provide maximum diagnostic clarity at a single glance:

🎯Ability Activated

Logs when an Ability Spec receives activation approval on an ASC, recording ability tag and instigator.

⚡Gameplay Effect Applied

Captures active, duration, and instant effect applications with target, instigator, and spawning ability.

📊Attribute Changed

Shows exact previous value, new value, and calculated delta (e.g. 2500 -> 2400 (Delta: -100.0)).

⚠️Diagnostic Watchdog Warning

Automated warnings triggered by engine watchdogs (e.g. rapid-fire duplicate effects within 25ms).

Timing & Network Roles

  • Relative Elapsed Timestamps ([1.45s]): Normalized to the millisecond relative to test launch, revealing race conditions and latent delays.
  • Network Roles ([Server], [Client_1], [Standalone]): Immediately tells you whether an event fired authoritatively or on a predicting client.

Accelerating Real-World Debugging

🐛 The "Double Damage" Bug

In the failure output above, Howitzer's basic attack was expected to deal 100 damage (Steel health: 2400), but Steel ended up at 2300.

[1.45s] Effect Applied: GE_Howitzer_BasicAttack
[1.46s] Effect Applied: GE_Howitzer_BasicAttack (within 10.0ms!)

Instant Root Cause: The timeline pinpointed a rapid-fire duplicate application just 10 milliseconds after the first! A missing DoOnce node in the projectile overlap event or duplicate RPC was identified in seconds without attaching a debugger.

🛡️ The "Missing Effect / Immuntiy" Bug

When a stun or slow fails to apply, the timeline demonstrates whether the ability failed to activate (blocked by tags), the effect was blocked by target immunities, or the calculation modifier returned 0.

Automated Playwright Report Attachments

When running in CI/CD (GitHub Actions, Jenkins, AWS GameLift), Specter automatically bundles and attaches three diagnostic artifacts directly to the failed test step in the Playwright HTML report:

1. Specter Causality Timeline

text/markdown

Full markdown-rendered chronological timeline showing all ability triggers, GE applications, attribute modifications, and watchdog flags.

2. Specter AI Diagnostics (Summary)

text/markdown

A high-level diagnostic brief designed for rapid human triage or LLM review, containing:

  • Actor Identity Mappings: Spawned GUIDs resolved to friendly Blueprint classes and ASC owners.
  • Target & Instigator State: Full attribute set values and active Gameplay Tag snapshots.
  • Spatial Context: Distance in Unreal units, relative facing vector, and forward dot product.
  • Recent Flight Recorder Events: In-memory C++ ring buffer history of the last 50 events.

3. Specter AI Diagnostics (JSON)

application/json

Complete unformatted telemetry JSON object for automated test failure clustering, regression databases, and custom dashboard ingestion.

🧠 Automated Specter AI Diagnostics Report

In addition to the raw timeline, Specter synthesizes an actionable AI Diagnostics Report printed directly beneath failed GAS assertions. This report translates cryptic GUIDs and gameplay state into immediate root causes and code fixes:

1. Actor Identity Mapping

Resolves ephemeral actor tags and net GUIDs (e.g. Spawned_b5706d1f) to their human-friendly Blueprint classes, instigators, and possessed ASC components.

2. Failure Analysis

Calculates exact delta discrepancies, flags rapid-fire duplicate effect applications (e.g. within 10ms), and correlates which Ability Spec triggered the anomalous event.

3. Actionable Recommended Fixes

Provides targeted remediation steps tailored to Unreal Engine development—such as adding a DoOnce node to projectile overlap events, checking montage anim notify duplication, or inspecting RPC replication boundaries.

Writing Resilient GAS Assertions

Combine toHaveAppliedGameplayEffect with count enforcement and attribute assertions to create bulletproof GAS test suites:

import { test, expect } from '@specter-automation/test';

test('Damage effect applies correctly without double dipping', async ({ world }) => {
  const steel = world.actor('BP_Hero_Steel');
  const howitzer = world.actor('BP_Hero_Howitzer');

  // Trigger basic attack
  await howitzer.pressKey('LeftMouseButton');

  // Assert effect was applied exactly once by Howitzer
  await expect(steel).toHaveAppliedGameplayEffect('GE_Howitzer_BasicAttack', {
    count: 1,
    instigator: howitzer,
  });

  // Assert exact expected attribute value
  await expect(steel).toHaveAttributeValue('HealthSet', 'Health', 2400);
});