Fix bidirectional RF-001A coordination
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
TASK_ID = RF001A_OTA_CAPTURE_002
|
||||
TASK_ID = RF001A_OTA_CAPTURE_003
|
||||
TASK_TITLE = Start coordinated RF-001A common-clock OTA capture
|
||||
SOURCE_BRANCH = video-development
|
||||
EXPECTED_HEAD = 34f5ace54540f947311ada7e81a463c08abfd2d3
|
||||
EXPECTED_HEAD = bc55d0516dc1ee36cefa1ff096e7d86f60645303
|
||||
REQUIRES_APPROVAL = YES
|
||||
HARDWARE_ACCESS = YES
|
||||
RF_RX = YES
|
||||
@@ -11,7 +11,7 @@ ALLOW_PUSH = RX_RESULT_ONLY
|
||||
RISK_LEVEL = YELLOW
|
||||
|
||||
This file is the authoritative current task for the RX laptop.
|
||||
The RX assistant must read RX_NODE_STATE.md first, then execute this file.
|
||||
The RX assistant must read RX_NODE_STATE.md and RF_HANDOFF_CHANNEL_TEST.md first, then execute this file.
|
||||
If chat history conflicts with these files, the shared RF-001A spec or current Git HEAD, stop and report the conflict.
|
||||
|
||||
# Current RX task
|
||||
@@ -19,13 +19,25 @@ If chat history conflicts with these files, the shared RF-001A spec or current G
|
||||
TASK =
|
||||
START COORDINATED RF-001A COMMON-CLOCK OTA CAPTURE
|
||||
|
||||
This is a new YELLOW task. Do not reuse approval or completion state from RF001A_OTA_CAPTURE_001 or any earlier task.
|
||||
This is a new YELLOW task. Do not reuse approval or completion state from RF001A_OTA_CAPTURE_001, RF001A_OTA_CAPTURE_002 or any earlier task.
|
||||
|
||||
One approval for this task covers its read-only checks, bounded RF RX capture, and publication of the two small allowlisted result files to the existing rx-node branch. It never authorizes RF TX.
|
||||
One approval for this task covers the model-free channel test, read-only checks, one bounded RF RX capture and publication of the two small allowlisted result files to the existing rx-node branch. It never authorizes RF TX.
|
||||
|
||||
## 1. Preconditions
|
||||
The preceding RF001A_OTA_CAPTURE_002 produced a real 120.1413067 s, 1920000000-byte capture with CLKIN detected before and after, zero reported overruns and SHA256 99a3e7cb51d3ad4e3b914b63da0695ed6658aa169110c32659aba995b542fa0c. Its READY publication failed, its exact child exit code was not recorded and no synchronized truth metadata was available. Treat that as historical evidence only.
|
||||
|
||||
After the user chooses [A] Approve for this exact TASK_ID:
|
||||
## 1. Model-free handoff channel gate
|
||||
|
||||
After the user chooses [A] Approve for this exact TASK_ID, run before any hardware access:
|
||||
|
||||
python -B tools/rf_handoff_smoke.py --hold-seconds 7
|
||||
|
||||
This subtask uses TASK_ID RF_HANDOFF_CHANNEL_TEST_001. It accesses no SDR and keeps RF TX = 0. It publishes fake READY and COMPLETE results through the real origin of the main RX checkout. Require the MAIN watcher to observe both states, require confirmed remote commit hashes, and require COMPLETE to remain as the final origin/rx-node state. Require the MAIN watcher state to contain both channel_test_ready_digest and channel_test_complete_digest for this run.
|
||||
|
||||
If any channel check or publication fails, do not access HackRF, do not start capture and STOP with RF TX = 0.
|
||||
|
||||
## 2. Preconditions
|
||||
|
||||
After the same [A] approval for this exact TASK_ID and after the channel gate passes:
|
||||
|
||||
1. Run git pull --ff-only origin video-development.
|
||||
2. Require branch video-development.
|
||||
@@ -33,7 +45,7 @@ After the user chooses [A] Approve for this exact TASK_ID:
|
||||
4. Require local HEAD to equal origin/video-development and EXPECTED_HEAD to be its ancestor.
|
||||
5. Run hackrf_info and preserve complete stdout.
|
||||
6. Require RX serial 000000000000000097c063dc2e5327d3.
|
||||
7. Confirm that configs/rf/rf001a_common_clock.json exists and matches the fixed RF-001A frequency, sample rate, modulation and common-clock plan.
|
||||
7. Confirm that configs/rf/rf001a_common_clock.json and configs/rf/rf001a_truth_metadata.json exist. Require the tracked truth metadata test ID, seed, 100 packet hashes, sequence numbers, waveform SHA256 and PHY settings to agree with the shared RF-001A spec.
|
||||
8. With MASTER CLKOUT physically connected to SLAVE CLKIN, run:
|
||||
|
||||
hackrf_clock.exe -d 000000000000000097c063dc2e5327d3 -i
|
||||
@@ -42,13 +54,13 @@ After the user chooses [A] Approve for this exact TASK_ID:
|
||||
|
||||
CLKIN status: clock signal detected
|
||||
|
||||
10. Require the remote branch origin/rx-node to exist. Do not create it in this task.
|
||||
10. Require the remote branch origin/rx-node to exist through both git fetch origin rx-node and git ls-remote --heads origin rx-node. Do not create it in this task.
|
||||
11. Create a unique capture directory outside Git. Refuse an existing directory and never overwrite an earlier capture.
|
||||
12. Require at least 2500000000 free bytes on the target volume. Record the measured free-byte count.
|
||||
|
||||
If any condition fails, do not start capture. Report the failed condition, keep RF TX = 0, and STOP.
|
||||
|
||||
## 2. Authorized bounded RX capture
|
||||
## 3. Authorized bounded RX capture
|
||||
|
||||
Only this finite receive operation is authorized:
|
||||
|
||||
@@ -80,16 +92,16 @@ The hackrf_transfer.exe arguments are fixed:
|
||||
|
||||
Do not add repeat mode. Do not change gain, clock, frequency or sample rate.
|
||||
|
||||
## 3. Background runner and durable evidence
|
||||
## 4. Background runner and durable evidence
|
||||
|
||||
Use a local runner outside Git. The runner must:
|
||||
Use the tracked tools/capture_process_runner.ps1. Write the exact hackrf_transfer argument array to a unique local JSON file outside Git. Start the runner itself as a controlled background PowerShell process and pass unique paths for the capture, complete stdout, complete stderr, capture_started.json and capture_result.json. The runner must:
|
||||
|
||||
- start exactly one hackrf_transfer child;
|
||||
- record its PID and start time immediately;
|
||||
- record the expected end time as start time plus 120 seconds;
|
||||
- redirect complete stdout and stderr to unique local files;
|
||||
- wait for that exact child;
|
||||
- record its exact exit code, finish time, duration and output size;
|
||||
- wait for that exact child, refresh its process object and read ExitCode only after WaitForExit;
|
||||
- record its exact integer exit code, finish time, duration and output size;
|
||||
- calculate SHA256 after the file is closed;
|
||||
- write started and final JSON atomically;
|
||||
- never start a second capture automatically.
|
||||
@@ -103,13 +115,13 @@ Start the runner as a controlled background process. Within five seconds, requir
|
||||
|
||||
If any fact is false, publish no READY state. Preserve local evidence, report RX CAPTURE STARTED = NO, keep RF TX = 0, and STOP.
|
||||
|
||||
## 4. Publish READY immediately
|
||||
## 5. Publish READY immediately
|
||||
|
||||
As soon as the child is alive and the file is growing, build a local JSON file outside Git with every field below:
|
||||
|
||||
{
|
||||
"schema_version": 1,
|
||||
"task_id": "RF001A_OTA_CAPTURE_002",
|
||||
"task_id": "RF001A_OTA_CAPTURE_003",
|
||||
"state": "RX_READY_FOR_TX",
|
||||
"rx_ready_for_tx": true,
|
||||
"process_alive": true,
|
||||
@@ -142,14 +154,16 @@ The publisher may change only:
|
||||
docs/handoff/results/RX_RESULT.json
|
||||
docs/handoff/results/RX_RESULT.md
|
||||
|
||||
It uses a temporary checkout of the existing rx-node branch. It must not switch the source checkout, push video-development, or add raw IQ, video, waveform or large logs.
|
||||
The publisher checks origin/rx-node through the real origin of the main checkout. It creates a temporary Git worktree from that repository, stages exactly the two allowlisted result paths, pushes HEAD:rx-node, confirms the new remote HEAD with git ls-remote and removes the worktree. It must not switch the source checkout, push video-development, or add raw IQ, video, waveform or large logs.
|
||||
|
||||
If publication fails, show the complete error. Do not claim RX READY FOR TX and do not trigger TX automatically. The finite capture may finish normally, but RF TX remains 0.
|
||||
Use this order without exception: verify CLKIN, start capture, verify the child is alive, verify the file is growing, publish READY, verify RX RESULT REMOTE HEAD equals the published commit, and only then report RX READY FOR TX = YES.
|
||||
|
||||
If publication or remote confirmation fails, show the complete error and report RX READY FOR TX = NO. The finite capture may finish normally, but TX coordination does not start and RF TX remains 0.
|
||||
|
||||
After successful publication, immediately return control to the user without waiting for capture completion:
|
||||
|
||||
TASK_ID =
|
||||
RF001A_OTA_CAPTURE_002
|
||||
RF001A_OTA_CAPTURE_003
|
||||
|
||||
RX CAPTURE STARTED =
|
||||
YES
|
||||
@@ -168,14 +182,16 @@ After successful publication, immediately return control to the user without wai
|
||||
RX RESULT PUBLISH =
|
||||
PASS
|
||||
|
||||
RX RESULT REMOTE HEAD =
|
||||
|
||||
RF TX =
|
||||
0
|
||||
|
||||
The READY state describes a live receiver only. It does not authorize RF TX on either computer.
|
||||
|
||||
## 5. Capture completion
|
||||
## 6. Capture completion
|
||||
|
||||
After the child exits, read the durable final status. Preserve all local logs and inspect every line for RX overruns, USB errors and file write errors. Do not infer zero when a tool did not report a counter; use JSON null and report NOT_REPORTED.
|
||||
After the child exits, read capture_result.json and require an integer exit_code recorded by the runner. Preserve all local logs and inspect every line for RX overruns, USB errors and file write errors. Do not infer zero when a tool did not report a counter; use JSON null and report NOT_REPORTED.
|
||||
|
||||
Run the read-only clock check again:
|
||||
|
||||
@@ -193,7 +209,7 @@ Require CLKIN to remain detected. The expected complete capture has:
|
||||
|
||||
A shorter file is incomplete. Any reported nonzero error remains evidence. Do not retry automatically.
|
||||
|
||||
## 6. Publish final result
|
||||
## 7. Publish final result
|
||||
|
||||
Build a second local JSON document with the same identity and timing fields. Set:
|
||||
|
||||
@@ -219,17 +235,17 @@ Publish with:
|
||||
|
||||
python -B tools/rx_agent_watcher.py --publish-result <final-json-path> --result-branch rx-node
|
||||
|
||||
If the push fails, preserve the local JSON and logs, report the error, and do not claim publication success.
|
||||
Require RX RESULT REMOTE HEAD to equal the final result commit. If the push or confirmation fails, preserve the local JSON and logs, report the error, and do not claim publication success.
|
||||
|
||||
## 7. Offline decode
|
||||
## 8. Offline decode
|
||||
|
||||
Do not start automatic decode unless synchronized truth metadata for this exact transmitted waveform is available and consistent. If it is absent, preserve the IQ file and report:
|
||||
Use the tracked synchronized truth artifact without copying TX files manually:
|
||||
|
||||
OFFLINE DECODE = BLOCKED_BY_TRUTH_METADATA
|
||||
python -B -X utf8 tools/qpsk_rf_rx.py --iq-file <capture-path> --iq-format cs8 --truth-metadata configs/rf/rf001a_truth_metadata.json --report <unique-path-outside-git>\rf001a_ota_decode.json
|
||||
|
||||
Do not modify the receiver or invent results.
|
||||
Report exact packets, missing packets, duplicates, BER and post-FEC errors from the generated report. Preserve a decoder failure as evidence; do not modify the receiver or invent results.
|
||||
|
||||
## 8. Prohibited actions
|
||||
## 9. Prohibited actions
|
||||
|
||||
On the RX laptop, do not perform:
|
||||
|
||||
@@ -244,10 +260,12 @@ On the RX laptop, do not perform:
|
||||
- creation of rx-node;
|
||||
- publication of raw IQ, video, waveform or large logs.
|
||||
|
||||
## 9. Final RX report
|
||||
## 10. Final RX report
|
||||
|
||||
TASK_ID =
|
||||
RF001A_OTA_CAPTURE_002
|
||||
RF001A_OTA_CAPTURE_003
|
||||
|
||||
CHANNEL TEST =
|
||||
|
||||
RX CAPTURE COMPLETE =
|
||||
|
||||
@@ -271,8 +289,20 @@ On the RX laptop, do not perform:
|
||||
|
||||
FINAL RX RESULT PUBLISH =
|
||||
|
||||
FINAL RX RESULT REMOTE HEAD =
|
||||
|
||||
OFFLINE DECODE =
|
||||
|
||||
EXACT PACKETS =
|
||||
|
||||
MISSING =
|
||||
|
||||
DUPLICATES =
|
||||
|
||||
BER =
|
||||
|
||||
POST-FEC ERRORS =
|
||||
|
||||
RF TX =
|
||||
0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user