Advance RX handoff to hardware preflight

This commit is contained in:
LittleSam129
2026-09-18 13:30:04 +03:00
parent 06fadf6957
commit fdd58508da

View File

@@ -7,13 +7,13 @@ stop and report the conflict.
# Current RX task
TASK =
FINALIZE RX NODE SOFTWARE PREFLIGHT
RX-ONLY HACKRF HARDWARE PREFLIGHT
1. GIT. In the laptop project at `C:\Users\Professional\Documents\Codex\SDR_Rover_Video`, confirm `video-development` and record the starting HEAD and `git status --short --untracked-files=no`. If tracked files are modified, stop and report the conflict. Run `git pull origin video-development`. Verify that `git branch --show-current` is `video-development`, `git rev-parse HEAD` equals `git rev-parse origin/video-development`, and the tracked checkout is clean (`git status --short --untracked-files=no` has no output). Local RF-001 results outside Git are not a conflict. If the pull or any of these checks fails, stop and report it.
1. GIT. In the laptop project named in RX_NODE_STATE.md, record the starting branch, HEAD, and `git status --short --untracked-files=no`. Stop if tracked files are modified or the branch is not `video-development`. Run `git pull origin video-development`. Require `git branch --show-current` = `video-development`, `git rev-parse HEAD` = `git rev-parse origin/video-development`, and a clean tracked checkout. Local ignored or untracked RF-001 results outside Git are not a conflict.
2. VIDEO FIXTURE. Inspect `data/raw/video001/udacity_project_video.mp4`. Required size: `25268015` bytes. Required SHA256 from `Get-FileHash -Algorithm SHA256`: `651949922042c223375d40bf8929def97dbb62c6ade651d1f5b08eea47127d5f`. The earlier laptop file had SHA256 `bff9b28d0e1f5442cfdf9f2bd51251d66506ca518ad7dfe6074670859731a8fb` and is not the fixture. If the file is absent, the size differs, or SHA256 differs, mark VIDEO FIXTURE = FAIL and do not run `video_gate.py`. Do not download or substitute a file, change the expected SHA256, or weaken the check. The user will transfer the correct file manually from the main PC.
2. VIDEO FIXTURE. Check whether `data/raw/video001/udacity_project_video.mp4` exists, then record its size and `Get-FileHash -Algorithm SHA256`. The required file has 25268015 bytes and SHA256 `651949922042c223375d40bf8929def97dbb62c6ade651d1f5b08eea47127d5f`. A same-size file with SHA256 `bff9b28d0e1f5442cfdf9f2bd51251d66506ca518ad7dfe6074670859731a8fb` is not valid. If absent or mismatched, report VIDEO FIXTURE = NOT_READY and VIDEO GATE = NOT_RUN. This is NON-BLOCKING FOR RX-ONLY RF-001 HARDWARE PREFLIGHT. Do not download or substitute a file, change the expected SHA256, or weaken the VIDEO-001 check. If size and SHA256 both match, run the complete `python -B -X utf8 tools/video_gate.py` and report its result separately. VIDEO fixture and VIDEO GATE do not determine readiness at this RX-only stage.
3. After both the fixture size and SHA256 match, run the complete `python -B -X utf8 tools/video_gate.py`. Then run targeted VIDEO/RF tests, targeted Ruff, Pyright, and `git diff --check` separately. On PowerShell, the targeted tests are:
3. MANDATORY SOFTWARE CHECKS. Run targeted VIDEO/RF pytest, targeted Ruff, Pyright, and `git diff --check` even if VIDEO FIXTURE = NOT_READY. The VIDEO-001 unit tests do not require the MP4 fixture. On PowerShell:
```powershell
$videoTests = @(Get-ChildItem -LiteralPath tests -Filter 'test_video*.py' -File | Select-Object -ExpandProperty FullName)
@@ -23,42 +23,48 @@ python -B -m pyright --project pyrightconfig.json
git diff --check
```
The Ruff paths are the same targeted paths used by `video_gate.py`. Record the result of each check separately.
Repeat the software-only offline RF-001 round trip from `docs/rf/RF_001.md` in new local output paths: 100 generated packets → IQ file → independent receiver. Require 100/100 CRC-valid and 100/100 exact packets; preserve stdout and the JSON report. Run `hackrf_info` and record its full output. Stop before hardware streaming if any mandatory software check, offline packet count, Git check, or `hackrf_info` fails.
4. Repeat the software-only offline RF-001 round trip: 100 packets → IQ file → receiver. Use the `qpsk_rf_tx.py` dry run and `qpsk_rf_rx.py` file receiver commands in `docs/rf/RF_001.md`, with new local output paths so older results are preserved. Require 100/100 CRC-valid and 100/100 exact packets. Preserve stdout and the JSON report. Run `hackrf_info` and record its full output; it is identification only. No RF TX or hardware capture is authorized.
4. HISTORICAL LAB064. The missing `data/raw/lab064/tx_metadata.json` is not a blocker for this RF-001 RX-only stage. Do not create or simulate it. A full `python -B -m pytest tests/ -q` is optional; if run, classify only the verified failure caused by that missing file as HISTORICAL LAB064 FIXTURE MISSING. Any other new failure blocks readiness.
5. FULL PYTEST is optional: `python -B -m pytest tests/ -q`. If its only failure is caused by the missing historical `data/raw/lab064/tx_metadata.json`, report FULL PYTEST = FAIL and LAB064 HISTORICAL FAILURE = HISTORICAL LAB064 FIXTURE MISSING; NON-BLOCKING FOR RF-001 RX NODE. Verify that there are no other failures before applying this exception. Do not create or simulate that fixture. Any other new test failure blocks readiness. If the full suite is not run, report FULL PYTEST = NOT_RUN and LAB064 HISTORICAL FAILURE = NOT_RUN.
5. RX-ONLY HARDWARE PREFLIGHT. After step 3 passes, open the HackRF only as a receiver. Make one bounded raw IQ capture at 8,000,000 samples/s, center frequency 1,400,000,000 Hz, for about 5 seconds. Record the exact receive-only command and settings. A 5-second `cs8` capture contains 40,000,000 complex samples and 80,000,000 bytes if complete. Save the raw interleaved signed I/Q bytes in a new local file outside Git; do not overwrite prior captures. Preserve stdout/stderr, start and end times, the file size and SHA256, actual sample count and duration, elapsed wall time, and measured file write rate. Record every available RX overrun observation during the run and the final value, USB errors, and file write errors. Never convert an absent or incomplete counter into zero: report NOT_REPORTED and mark the stream test FAIL if capture integrity cannot be verified. Any nonzero overrun, USB error, file write error, truncated file, or capture failure is FAIL. Use a capture tool in receive-only mode; `hackrf_transfer` is permitted for this bounded RX capture only, never with a transmit option. No transmitter is used, and RF-001 packet decoding is not part of this test.
6. RX NODE READY FOR RX-ONLY HARDWARE TEST = YES only when the fixture size and SHA256 match, video gate passes, targeted VIDEO/RF tests pass, targeted Ruff passes, Pyright passes, `git diff --check` passes, offline RF-001 yields 100/100 CRC-valid and 100/100 exact packets, `hackrf_info` passes, and the Git checks in step 1 pass. The sole verified historical Lab064 fixture failure in the optional full suite does not change readiness to NO. Any other failure does.
6. CLASSIFICATION. Set RX-ONLY IQ STREAM TEST = PASS only for a complete capture with clean, sufficiently observed counters. Set RX NODE READY FOR RF-001 OTA = YES only if the Git checks, targeted VIDEO/RF pytest, targeted Ruff, Pyright, `git diff --check`, offline RF-001 100/100, `hackrf_info`, and RX-only IQ stream test all pass. VIDEO fixture, VIDEO GATE, and the sole verified historical Lab064 fixture failure are separate findings and do not block this stage. Readiness does not authorize RF TX; that requires a separate explicit task.
7. Do not perform RF TX, continuous RX, `hackrf_transfer`, firmware or CPLD updates, `hackrf_spiflash`, Zadig, USB driver changes, commit, or push on the RX laptop.
7. Do not perform RF TX, firmware or CPLD updates, `hackrf_spiflash`, Zadig, USB driver changes, commit, or push on the RX laptop. Do not add raw IQ or video files to Git.
8. Finish with this report. For checks not run, write NOT_RUN; for failures, state the concrete cause.
8. Finish with the following report. Use PASS, FAIL, NOT_RUN, NOT_READY, or NOT_REPORTED as appropriate; state the cause of each failure.
TASK =
FINALIZE RX NODE SOFTWARE PREFLIGHT
RX-ONLY HACKRF HARDWARE PREFLIGHT
BRANCH =
HEAD =
VIDEO FIXTURE =
VIDEO FIXTURE SIZE =
VIDEO FIXTURE SHA256 =
VIDEO GATE =
TARGETED PYTEST =
FULL PYTEST =
LAB064 HISTORICAL FAILURE =
RUFF =
PYRIGHT =
GIT DIFF CHECK =
OFFLINE RF-001 =
HACKRF INFO =
RX NODE READY FOR RX-ONLY HARDWARE TEST =
RX-ONLY IQ STREAM TEST =
PASS / FAIL
SAMPLE RATE =
CAPTURE DURATION =
CAPTURE SIZE =
RX OVERRUNS =
USB ERRORS =
FILE WRITE ERRORS =
RAW IQ SHA256 =
RX NODE READY FOR RF-001 OTA =
YES / NO
RF TX =