← Back to Pull requests

Fix UE 5.8 compatibility in the Unreal SDK #4779

Closed
unknown closed this pull request without merging on Oct 19, 2026 06:15 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 23:58 UTC
Author

What type of PR is this?

/kind bug

What this PR does / Why we need it:

UE 5.8 defaults FJsonObject::Values keys to UE::FSharedString. The Unreal SDK's implicit conversions to FJsonValueString and const FString& fail to compile with this default. Explicitly construct owning FString values for annotation, label, and counter keys. Older engines pass their FString keys through the same longstanding copy constructor; this needs no version checks or JSON configuration changes.

Add two development Automation tests that deserialize JSON and exercise the metadata and status constructors, checking metadata keys and values, ASCII and Unicode counter keys, counter counts and capacities, and null entry handling.

Which issue(s) this PR fixes:

Closes #4778

Did you use AI tools in preparing this PR?:

Y — This PR was written in part with the assistance of generative AI. The commit message was supplied by the human contributor. The patch received code review and local validation before submission.

Special notes for your reviewer:

Validation on macOS arm64:

  • UE 5.8.2, CL 56702186: the complete source plugin builds in an isolated C++ project's Mac Development editor target. Both Agones.Json.ObjectMetaKeys and Agones.Json.StatusCounterKeys pass (2 successes, no failures). The patched Agones 1.61.0 plugin also builds in AxiometryDemo with the tests included.

  • UE 5.6.1, CL 44394996: a clang syntax-only check against the installed engine's Core, Json, and Automation headers passed. It verifies the JSON key type is FString and compiles all three conversions and the test registration flags. A full UE 5.6.1 build cannot start because this engine's Apple SDK manifest requires Xcode 15.2–16.9; only Xcode 26.6 is installed.

  • UE 4.27.2, CL 18319896: built a default C++ template project with this plugin. UnrealHeaderTool completed, but the C++ build fails in UE4 engine headers under Xcode 26.6 / Apple Clang 21, before plugin compilation: UE4 warnings about deprecated Clang builtins are errors, and ScriptInterface.h has a private FScriptInterface::Serialize access error. A separate syntax-only compilation of the PR's actual ClassesTests.cpp against UE 4.27 headers passed after making those legacy engine diagnostics nonfatal and disabling access control to get past that unrelated engine header error. This only checks source syntax; it is not a successful UE4 project build or Automation run.

  • The UE4 manual build checklist in Agones CONTRIBUTING.md therefore remains unverified with a supported UE4 toolchain. No engine SDK validation was bypassed in the project build.

  • No Go files changed; Go, container, and cluster tests were not run.
  • The fix uses explicit FString construction, which resolves to the existing FString copy constructor on older engine JSON maps and to the shared-string range constructor on UE 5.8.

    Diff: 365 lines (+273 / -92) across 4 files Reviewer: markmandel Review duration: 9016m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 365 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4779"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.5% · Safe to merge
    18.5%