Files
QFT/TEST_REPORT.md
T
2026-08-10 15:45:04 +08:00

183 lines
5.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# QFT v0.3.0-rc3 test report
Date: 2026-08-10
This report deliberately separates **tests actually executed in the current build environment** from **hardware acceptance that cannot be truthfully simulated here**.
## Executed and passed
### Optical protocol recovery
Command:
`python scripts/protocol_selftest.py`
Result:
- 2,500,123-byte random file
- 900-byte chunks
- 4 QR/page
- target 60 pages/s model
- synthetic 24% whole-page loss + 14% per-lane QR loss
- reconstructed exact original file in 9 rounds
- final SHA-256 identical
- representative frame: QR v25, ~3 rendered pixels/module at native 960px page
- theoretical raw file payload: ~210.9 KiB/s
**PASS**
### Synthetic visual QR decode
Command:
`python scripts/optical_image_decode_selftest.py`
Result in this environment:
- 4/4 high-density QFT optical QR symbols decoded from one 960×960 synthetic page using libzbar/pyzbar
- QFTPAIR2 QR-M decoded after synthetic 7° rotation plus light Gaussian blur
**PASS**
This proves generated QR geometry/data is decodable under a synthetic image path; it does **not** prove a particular monitor/camera can decode 60 physical refreshes per second.
### QFTPAIR2 size / QR density
Command:
`python scripts/pairing_selftest.py`
Result:
- QFTPAIR2: 207 characters with one Direct-AP endpoint hint
- older QFTPAIR1 comparison: 368 characters
- v2 size: 56.2% of v1
- medium-error-correction QR: version 10
- encode/decode round-trip exact
**PASS**
### Parallel local-file chunk reconstruction
Command:
`python scripts/parallel_upload_selftest.py`
Result:
- ~64 MiB random file
- 8 MiB test chunks
- 8 worker threads
- 1 MiB worker I/O buffers
- out-of-order positioned writes
- final SHA-256 identical
**PASS**
### End-to-end local protocol integration
Command:
`python scripts/local_transfer_integration_selftest.py`
Result:
- QFTDISC2 UDP request/response
- session-token authenticated `/qft/ping`
- Parallel-v2 init
- out-of-order chunk POSTs using 8 workers
- finish
- exact reconstructed file and SHA-256 match
**PASS**
### Standalone UDP discovery
Command:
`python scripts/udp_discovery_selftest.py`
QFTDISC2 / QFTHERE2 token and port round-trip.
**PASS**
### Memory-budget model
Command:
`python scripts/memory_budget_selftest.py`
Result:
- 4QR 960px pre-render page ≈ 3.5156 MiB as Color32
- maximum cache page cap 192 → ≈ 675 MiB
- conservative extra transient test allowance remains below the 1100 MiB design ceiling
- whole source file is no longer memory-mapped
**PASS (design-budget test)**
This is not an OS-level hard RSS limiter. GPU drivers, allocator fragmentation and platform runtime memory vary; the implementation intentionally leaves several hundred MiB headroom instead of allocating a full 1 GiB cache.
### Android compatibility/static guards
Command:
`python scripts/android_compat_selftest.py`
Checked:
- minSdk 24
- API 29 modern/legacy Wi-Fi split
- Android 7~9 storage path
- Android <=12 location permission
- Android 13+ nearby-WiFi permission
- network security config for local HTTP
- gateway/directed-broadcast/subnet discovery fallbacks
- 8-worker upload
- 640×480 pairing scan + 1280×720 optical analysis
- KEEP_ONLY_LATEST
- no full-frame rotate in scanner hot path
- no `java.util.Base64` dependency in main Android source
**PASS**
### Kotlin source checks executed
Using `kotlinc-jvm 1.9.0` plus small Android/JSON stubs where necessary:
- `Base64Url.kt + Protocol.kt` runtime parser test: **PASS**
- `PairingProtocol.kt` syntax/type test: **PASS**
- `UploadClient.kt + PairingProtocol.kt` syntax/type test: **PASS**
- `GrayFrame.kt + QrAnalyzer.kt` syntax/type test: **PASS**
- `WifiConnector.kt` syntax/type test across the modern/legacy branches: **PASS**
These tests caught and fixed an earlier `ExecutorCompletionService.submit<String?>` source error before packaging rc3.
## Not executable in the current Linux build sandbox
The following are hardware/OS-specific and therefore are **not claimed as passed** here:
1. Windows `cargo check/build` against the Windows MSVC/WinRT target.
2. Actual `WiFiDirectAdvertisementPublisher` start on a Windows Wi-Fi adapter.
3. Windows Defender Firewall private-network approval behavior.
4. Android Gradle APK build against a local Android SDK in this sandbox.
5. Android 7/8/9/10/11/12/13/14/15/16+ install/runtime matrix.
6. Real monitor → real camera optical performance at 30/60Hz, different brightness, rolling shutter and autofocus conditions.
7. Real Wi-Fi Direct throughput across different NIC/phone vendors.
For those reasons **v0.3.0-rc3 remains an RC, not a final stable release**.
## Required physical acceptance before marking stable
Run `VERIFY_WINDOWS_HOST.ps1`, then at minimum:
- Windows 10/11 + Android 7/9/10/13/latest available devices.
- Optical files: 10 KiB, 1 MiB, 10 MiB at 30 FPS and 60 FPS.
- Verify Android UI actual camera FPS / QR/s and final SHA-256.
- Android→Windows QFT Direct: first-time pairing, repeat pairing, reconnect after Wi-Fi loss.
- Test with Windows Firewall prompt accepted and with “current LAN” fallback.
- Upload 10 MiB, 500 MiB, and >2 GiB files; verify final SHA-256 and memory usage.
- Observe Windows working set during optical 60 FPS; if host-specific RSS exceeds 1.1 GiB, reduce the pre-encode cache slider (default 384 MiB) and record the device/driver combination.
Only after this matrix is passed should the RC label be removed.