Files
foxhunt/docs
jgrusewski 021bb0ef73 spec(dqn): pivot Phase 0+2 tests to GPU-direct (no CPU mirror)
User correctly identified that CPU mirror function tests don't test
the production GPU code path. A bug shared between mirror and kernel
(translated identically wrong) would slip through. Mirror tests + a
single GPU bridge test were a weak compromise.

GPU-direct testing strategy:
  - All Phase 0 kernel-correctness tests (0.A, 0.B, 0.C, 0.D, 0.F):
    launch tiny test-only kernels with the SAME math the Phase 2
    production kernel will use; assert properties of the output.
  - Test 0.E (synthetic edge discovery): stays CPU. It tests an
    ALGORITHMIC PROPERTY of Thompson exploration (does it discover
    edge if edge exists?), not a kernel correctness property.
  - All Phase 2 unit tests (2.A-2.D): GPU-direct against the
    modified production kernel.
  - Phase 0.F (real checkpoint extraction): unchanged — already GPU.

Local development uses RTX 3050 GPU (per memory user_dev_environment.md).
CI runs --ignored flag to skip GPU tests on CPU-only runners.

Time budget: Phase 0 was 1-2 days (CPU mirror); now 2-3 days
(GPU-direct, includes kernel wrapper setup half-day).

Other delta:
  - Phase 0 deliverable file renamed: distributional_q.rs ->
    distributional_q_tests.rs (no mirror functions, just tests +
    kernel wrappers).
  - Phase 2 unit tests rephrased to launch production kernel rather
    than compare against CPU mirror.
  - L1 verification gate runtime: seconds -> minutes (GPU launch
    overhead per test).

The user's intuition was right: testing production directly is the
honest approach. Mirror was an optimization that traded correctness
for speed; with local GPU available the optimization isn't needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 00:27:46 +02:00
..