game-gate: bound capture parsing and require reliable verdict evidence #3424

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u  "port/game-gate-stream-capture:EdenBendheim-port/game-gate-stream-capture"
git switch "EdenBendheim-port/game-gate-stream-capture"
Open
leonida/mandy
EdenBendheim wants to merge 1 commit from EdenBendheim/mandy:port/game-gate-stream-capture into main

This pull request has changes conflicting with the target branch.

Merge manually to resolve the conflicts.

Conversation
Reviewers 0 approvals
  • No reviewers
Details

This pull request has changes conflicting with the target branch.

Merge manually to resolve the conflicts.

  • docs/game_gate.md
  • tests/test_game_gate.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'port/game-gate-stream-capture:EdenBendheim-port/game-gate-stream-capture'
git switch 'EdenBendheim-port/game-gate-stream-capture'
First-time contributor

What and why

Large captures should not exhaust the analyzer or turn incomplete process evidence into a passing (or incorrectly failing) measurement. Stream text input, limit oversized lines, metadata, retained events and measurements, fail closed on malformed captures, and write the summary atomically. Require stop/exit evidence and measured FPS for a completed gate. Polling errors take the existing orderly stop path; ABBA stops on any failed gate instead of comparing an invalid arm.

Claim: GAME-GATE-STREAM-CAPTURE in #3312. Depends on: none. Related: #3419 also changes the gate; this patch is focused on capture/parsing reliability and verdict integrity. A read-only merge-tree simulation against #3419 head be09cbb8 reports conflicts in scripts/game-gate.ps1 and tools/game_gate.py; reconcile if it lands first.

Verification

Base 4d9e4d05d; candidate 0ca7c0b4424699f82031a3e9e8f0477628185790.

  • Synthetic gate tests: 53 passed; ABBA tests: 23 passed; docs: 59 passed; line endings: 3 passed; launch path: 1 passed; start quoting: 2 passed. 141 tests passed total.
  • Red/green: five new test methods gave six failed assertions on the migrated base, green on the initial candidate. Five review-regression methods gave seven failed assertions, zero errors on the pre-review candidate, green on final candidate.
  • Windows Job Object synthetic test: 135,476,715-byte text log, 67,108,864-byte process-commit limit. Baseline hit the cap and failed; final candidate exit 0, peak commit 16,764,928 bytes, with byte-identical summary to the small control capture. This is measured-corpus evidence, not a universal memory bound.
  • Full tracked-file header scan exit 0, diff check clean, independent read-only review approved after two correction rounds.

GPU/host: NVIDIA RTX 3090 24 GiB, driver 610.88, Windows 11, Ryzen 9 5900X, 32 GiB RAM. No GPU or live gameplay test performed: these are synthetic Python/PowerShell harness changes only. No Rust build or runtime changes. CI unavailable on Forgejo.

AI-assisted: GPT-6.2 Sol (high), implementation and three independent read-only GPT-6.2 Sol reviews.

## What and why Large captures should not exhaust the analyzer or turn incomplete process evidence into a passing (or incorrectly failing) measurement. Stream text input, limit oversized lines, metadata, retained events and measurements, fail closed on malformed captures, and write the summary atomically. Require stop/exit evidence and measured FPS for a completed gate. Polling errors take the existing orderly stop path; ABBA stops on any failed gate instead of comparing an invalid arm. Claim: `GAME-GATE-STREAM-CAPTURE` in #3312. Depends on: none. Related: #3419 also changes the gate; this patch is focused on capture/parsing reliability and verdict integrity. A read-only merge-tree simulation against #3419 head `be09cbb8` reports conflicts in `scripts/game-gate.ps1` and `tools/game_gate.py`; reconcile if it lands first. ## Verification Base `4d9e4d05d`; candidate `0ca7c0b4424699f82031a3e9e8f0477628185790`. - Synthetic gate tests: 53 passed; ABBA tests: 23 passed; docs: 59 passed; line endings: 3 passed; launch path: 1 passed; start quoting: 2 passed. 141 tests passed total. - Red/green: five new test methods gave six failed assertions on the migrated base, green on the initial candidate. Five review-regression methods gave seven failed assertions, zero errors on the pre-review candidate, green on final candidate. - Windows Job Object synthetic test: 135,476,715-byte text log, 67,108,864-byte process-commit limit. Baseline hit the cap and failed; final candidate exit 0, peak commit 16,764,928 bytes, with byte-identical summary to the small control capture. This is measured-corpus evidence, not a universal memory bound. - Full tracked-file header scan exit 0, diff check clean, independent read-only review approved after two correction rounds. GPU/host: NVIDIA RTX 3090 24 GiB, driver 610.88, Windows 11, Ryzen 9 5900X, 32 GiB RAM. **No GPU or live gameplay test performed**: these are synthetic Python/PowerShell harness changes only. No Rust build or runtime changes. CI unavailable on Forgejo. AI-assisted: GPT-6.2 Sol (high), implementation and three independent read-only GPT-6.2 Sol reviews.
GAME-GATE-STREAM-CAPTURE. Stream log input, cap retained measurements, distinguish incomplete evidence from runtime failures, and reject malformed polling output. Add synthetic regressions.
First-time contributor

Independent local verification of this change (I changed no code).

  • Head 0ca7c0b4, merge base 4d9e4d05. All 16 added test names are absent on the base (git grep -F <test> 4d9e4d05 -- tests/test_game_gate.py tests/test_game_abba.py -> exit 1 for each).
  • On the PR head, each test was run with its module-qualified name and --exact: 13 executed green. Three were skipped by their own PowerShell 7 / Windows gates (no PowerShell 7 here, needs Windows and pwsh); I do not count those three as evidence. Both full modules together: python -m unittest tests.test_game_gate tests.test_game_abba -> 76 tests OK (22 skipped).
  • git diff --check 4d9e4d05 0ca7c0b4 -> clean. python -I scripts/check_no_game_data.py tools/game_gate.py tests/test_game_gate.py tests/test_game_abba.py scripts/game-gate.ps1 scripts/game-abba.ps1 -> clean.

GPUs tested: none (synthetic log/iterator inputs, no device-gated test counted). Driver: n/a. No game data, assets or extracted shaders were used or attached.

AI-assisted: yes, Hy4 flash (verification only). No approval implied; this is a local test report.

Independent local verification of this change (I changed no code). - Head `0ca7c0b4`, merge base `4d9e4d05`. All 16 added test names are absent on the base (`git grep -F <test> 4d9e4d05 -- tests/test_game_gate.py tests/test_game_abba.py` -> exit 1 for each). - On the PR head, each test was run with its module-qualified name and `--exact`: 13 executed green. Three were skipped by their own PowerShell 7 / Windows gates (`no PowerShell 7 here`, `needs Windows and pwsh`); I do not count those three as evidence. Both full modules together: `python -m unittest tests.test_game_gate tests.test_game_abba` -> 76 tests OK (22 skipped). - `git diff --check 4d9e4d05 0ca7c0b4` -> clean. `python -I scripts/check_no_game_data.py tools/game_gate.py tests/test_game_gate.py tests/test_game_abba.py scripts/game-gate.ps1 scripts/game-abba.ps1` -> clean. GPUs tested: none (synthetic log/iterator inputs, no device-gated test counted). Driver: n/a. No game data, assets or extracted shaders were used or attached. AI-assisted: yes, Hy4 flash (verification only). No approval implied; this is a local test report.
Contributor

Independent Windows verification of head 0ca7c0b4 with PowerShell 7.

  • tests/test_game_gate.py — 53 passed, including the PowerShell test for invalid state output and failed state commands.
  • tests/test_game_abba.py — 23 passed, including aborting on failed measured captures, failed warm-up or discarded runs, and failed comparison.

The runs used generated captures and stub processes. This adds Windows and PowerShell coverage to the earlier verification. PR #3424

Independent Windows verification of head `0ca7c0b4` with PowerShell 7. - `tests/test_game_gate.py` — 53 passed, including the PowerShell test for invalid state output and failed state commands. - `tests/test_game_abba.py` — 23 passed, including aborting on failed measured captures, failed warm-up or discarded runs, and failed comparison. The runs used generated captures and stub processes. This adds Windows and PowerShell coverage to the earlier verification. [PR #3424](https://git.leonida.now/leonida/mandy/pulls/3424)
Contributor

The Windows synthetic A/B harness verifies that each arm reached the measurement window, records the observed child exit, and checks that the two arms differ only in declared inputs. It tracks the starting PSO library, shader cache, and the two decoded caches independently.

Generated case Verified outcome
Declared change to the prepared BCn cache Match
Same cache change without a declaration Different
Child exit 0 with shutdown and the target window confirmed Eligible
Child exit 75 with a device-loss marker Incomplete, exit 75 preserved
Forced termination Incomplete, forced-stop flag preserved
Child exits before the target window Incomplete, window flag preserved

For a public report, a compact receipt can carry input-equality flags, the declared change, and the completion status. The raw input identities can stay with the local capture. This is a follow-up to gate reliability and device-loss classification. Gate #3424 · Device loss #3450

The Windows synthetic A/B harness verifies that each arm reached the measurement window, records the observed child exit, and checks that the two arms differ only in declared inputs. It tracks the starting PSO library, shader cache, and the two decoded caches independently. | Generated case | Verified outcome | |---|---| | Declared change to the prepared BCn cache | `Match` | | Same cache change without a declaration | `Different` | | Child exit 0 with shutdown and the target window confirmed | Eligible | | Child exit 75 with a device-loss marker | `Incomplete`, exit 75 preserved | | Forced termination | `Incomplete`, forced-stop flag preserved | | Child exits before the target window | `Incomplete`, window flag preserved | For a public report, a compact receipt can carry input-equality flags, the declared change, and the completion status. The raw input identities can stay with the local capture. This is a follow-up to gate reliability and device-loss classification. [Gate #3424](https://git.leonida.now/leonida/mandy/pulls/3424) · [Device loss #3450](https://git.leonida.now/leonida/mandy/pulls/3450)
Sign in to join this conversation.
No description provided.