From 31f073d608227c3894aa262add1df25312ca7c31 Mon Sep 17 00:00:00 2001 From: Zwitschi Date: Sun, 8 Nov 2026 15:01:33 +0100 Subject: [PATCH] qa(diag): gate setup logs behind gigline.SetupLogs cvar (#14) Merged PR #14: gate setup logs behind cvar Co-authored-by: Zwitschi --- Game/GigLine/Config/DefaultEngine.ini | 5 +++ .../Source/GigLine/GigLineCharacter.cpp | 41 +++++++++++++------ MEMORY.md | 12 ++++++ TODO.md | 4 +- 4 files changed, 48 insertions(+), 14 deletions(-) diff --git a/Game/GigLine/Config/DefaultEngine.ini b/Game/GigLine/Config/DefaultEngine.ini index f160c35..cb93941 100644 --- a/Game/GigLine/Config/DefaultEngine.ini +++ b/Game/GigLine/Config/DefaultEngine.ini @@ -15,6 +15,11 @@ TransitionMap=/Game/Hollywood/DemoMap ; static lighting outright — nothing to build, no warning. r.AllowStaticLighting=False +[ConsoleVariables] +; Dev diagnostics (spawn/input setup logs) are off by default in shipped builds. +; Re-enable at runtime: `gigline.SetupLogs 1`. +gigline.SetupLogs=0 + [URL] GameName=GigLine diff --git a/Game/GigLine/Source/GigLine/GigLineCharacter.cpp b/Game/GigLine/Source/GigLine/GigLineCharacter.cpp index 1b0705a..7091592 100644 --- a/Game/GigLine/Source/GigLine/GigLineCharacter.cpp +++ b/Game/GigLine/Source/GigLine/GigLineCharacter.cpp @@ -15,6 +15,14 @@ #include "Misc/CommandLine.h" #include "Misc/Parse.h" +// Development-only diagnostics for the walkable demo. These describe the spawn +// and input setup and are not needed in a shipped build's log spam; disable +// with `-NoGigLineSetupLogs` (or set the cvar in release config). +static TAutoConsoleVariable CVarGigLineSetupLogs( + TEXT("gigline.SetupLogs"), + 1, + TEXT("Log GigLine spawn/input setup diagnostics (0=off, 1=on).")); + AGigLineCharacter::AGigLineCharacter() { PrimaryActorTick.bCanEverTick = false; @@ -102,15 +110,18 @@ void AGigLineCharacter::LoadInputAssets() ULocalPlayer::GetSubsystem(PC->GetLocalPlayer())) { Subsystem->AddMappingContext(MappingContext, 0); - UE_LOG(LogTemp, Log, TEXT("GigLine IN: pushed mapping context %s"), - *MappingContext->GetName()); + if (CVarGigLineSetupLogs.GetValueOnGameThread()) + { + UE_LOG(LogTemp, Log, TEXT("GigLine IN: pushed mapping context %s"), + *MappingContext->GetName()); + } } - else + else if (CVarGigLineSetupLogs.GetValueOnGameThread()) { UE_LOG(LogTemp, Log, TEXT("GigLine IN: no enhanced input subsystem on local player")); } } - else + else if (CVarGigLineSetupLogs.GetValueOnGameThread()) { UE_LOG(LogTemp, Log, TEXT("GigLine IN: no PlayerController at LoadInputAssets")); } @@ -143,8 +154,11 @@ void AGigLineCharacter::BeginPlay() StartLocation = GetActorLocation(); StartRotation = GetActorRotation(); GetWorldTimerManager().ClearTimer(this->SettleHandle); - UE_LOG(LogTemp, Log, TEXT("GigLine: start captured on ground at Z %.0f"), - StartLocation.Z); + if (CVarGigLineSetupLogs.GetValueOnGameThread()) + { + UE_LOG(LogTemp, Log, TEXT("GigLine: start captured on ground at Z %.0f"), + StartLocation.Z); + } } } }, 0.25f, true); @@ -410,12 +424,15 @@ void AGigLineCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCo Input->BindAction(JumpAction, ETriggerEvent::Started, this, &AGigLineCharacter::StartJump); Input->BindAction(JumpAction, ETriggerEvent::Completed, this, &AGigLineCharacter::StopJump); } - UE_LOG(LogTemp, Log, TEXT("GigLine IN: bound %d actions; ctx=%s move=%s look=%s jmp=%s"), - (Input ? 1 : 0), - MappingContext ? TEXT("ok") : TEXT("nil"), - MoveAction ? TEXT("ok") : TEXT("nil"), - LookAction ? TEXT("ok") : TEXT("nil"), - JumpAction ? TEXT("ok") : TEXT("nil")); + if (CVarGigLineSetupLogs.GetValueOnGameThread()) + { + UE_LOG(LogTemp, Log, TEXT("GigLine IN: bound %d actions; ctx=%s move=%s look=%s jmp=%s"), + (Input ? 1 : 0), + MappingContext ? TEXT("ok") : TEXT("nil"), + MoveAction ? TEXT("ok") : TEXT("nil"), + LookAction ? TEXT("ok") : TEXT("nil"), + JumpAction ? TEXT("ok") : TEXT("nil")); + } } namespace diff --git a/MEMORY.md b/MEMORY.md index 5cbea1d..a72ba08 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -319,3 +319,15 @@ Scope: facts and traps that cost time to establish. Planned work lives in [TODO. at t=2s with "ShotActor: done (4 shots)" + RequestExit). - Results on packaged build: walk 761cm/2s, reset 0cm, pause/unpause, transect 0 holes, wall 0/35 -> all PASS. Evidence recorded in Docs/release-checks.md. + +## 2026-11-08 — setup logs gated behind a cvar (diagnostics item) + +- The remaining spawn/input setup logs (settle-timer "start captured", "GigLine + IN:" pushed/bound/errors) are now gated behind `gigline.SetupLogs` + (TAutoConsoleVariable, default **0** via `DefaultEngine.ini [ConsoleVariables]`). + Re-enable at runtime: `gigline.SetupLogs 1`. +- The `-qaselftest` QA logs stay ungated (deliberate release-check feature per + Docs/release-checks.md). Verified packaged build: 0 setup-log lines, QA suite + still all PASS (walk/reset/pause/transect 0 holes/wall 0-35). +- Branch qa-diagnostics-0.1.0. SIM/GROUND probes were removed earlier in the + DefaultKeyMappings fix (PR #8). diff --git a/TODO.md b/TODO.md index 5d7035f..a98a1c8 100644 --- a/TODO.md +++ b/TODO.md @@ -106,12 +106,12 @@ The MPFB character asset is planned as the NPC template (see `ROADMAP.md`). Keep - [x] Commit and review the publication preparation changes before pushing. Initial publication commit: `101db3f`. - [x] Review ODbL obligations for each shipped derivative database or produced work before public release. **Done 2026-11-08** — full review recorded in `Docs/odbl-review.md`: the shipped streets/footprints/sidewalks are a Produced Work of the OpenStreetMap database; obligations held are on-screen attribution (`AGigLineHUD`), the ODbL link, and the committed source extract with provenance; share-alike applies to the data layer only (project code/art stay CC0). THIRD_PARTY_NOTICES and `Docs/licensing.md` updated. -### Release checks - active - 01a1b26b-3c94-707f-9665-2f6b4a79b564 (branch `collision-seams-0.1.0`) +### Release checks - active - 01a1b26b-3c94-707f-9665-2f6b4a79b564 (branch `qa-diagnostics-0.1.0`) - [x] Player can traverse both sides of the demo without falling through geometry. **Verified 2026-11-08:** Blender pre-check plus an in-engine swept transect (`-qaselftest`) over the north sidewalk, carriageway and south sidewalk from X -14900 to -9420 — 84 samples, 0 holes, ground Z 317..395 (sidewalk 395, road 366, south walk 317). The player spawns at Z 456 and stays there for the whole run (`fall=0`, single Z). - [x] Building placement, street scale, and site identity checked against references. **Done 2026-11-08:** rendered current DemoMap content, probed world-space geometry (road 24.3 m vs ref 20.9–25.9 m; sidewalk centreline offsets 12.5/13.2 vs ref 12.6/13.6 m; hero frontage 26.0 m, setback ~13 m vs ref 25.75/14.5 m; frontage + north buildings in verified OSM positions), recorded PASS + deliberate deviations (flat blockout surfaces → `0.1.4`, kerb upstand → `0.1.1`, kerb-flush ramps → `0.1.1`) in `Docs/release-checks.md`, and fixed the mis-aimed north-buildings camera (was 9.5 km west → 85% sky; now frames the buildings). Final human verdict pending on `Screenshots/demo/*`. - [x] No blocking collision or packaging defects. **Done 2026-11-08:** extended `-qaselftest` — transect now 1456 samples / 16 rows including the kerb/road/sidewalk seam Ys (0 holes), plus a ground-referenced 30 m wall probe (0/35 blocking hits; no invisible walls). Walk/reset/pause all PASS on the packaged build; `GigLineShotActor` now skips under `-qaselftest`. Evidence in `Docs/release-checks.md` §`0.1.0` audit note. -- [ ] Remove TEMP QA diagnostics (`GigLine SIM` / `GigLine GROUND` log lines and the settle-timer log) from `GigLineCharacter.cpp` before the release tag, or gate them behind a cvar. +- [x] Remove TEMP QA diagnostics (`GigLine SIM` / `GigLine GROUND` log lines and the settle-timer log) from `GigLineCharacter.cpp` before the release tag, or gate them behind a cvar. **Done 2026-11-08:** SIM/GROUND probes were already removed in the input fix (PR #8); the remaining settle-timer + `GigLine IN:` input-setup logs are now gated behind the `gigline.SetupLogs` cvar (default 0 in `DefaultEngine.ini [ConsoleVariables]`, re-enable at runtime). Verified on the packaged build: 0 setup-log lines, `-qaselftest` still all PASS. - [ ] 60 FPS at 1440p on the dev workstation (Bazzite, Ryzen 7 7700X, 64 GB RAM, RTX 5070 Ti 16 GB) using a documented quality preset; record upscaling state; report performance without frame generation. - [ ] Fresh project checkout builds with the documented external engine installation. - [ ] Package Linux build with documented controls.