chore: package send recording and capability tests

This commit is contained in:
zhaoyilun
2026-07-10 14:36:15 +08:00
parent 8cdaa3c0bc
commit 89d7f65b45
10 changed files with 1000 additions and 14 deletions

View File

@@ -44,6 +44,7 @@ What this package does:
- asks the operator to manually send exactly one sandbox message in the official client;
- runs the same read-only recorder after the manual send;
- zips the returned evidence folder.
- provides RUN-RECORDING-SUITE.bat plus numbered 01/02/03 batch files so the operator can run the whole recording flow from this package.
What this package does not do:
- it does not send messages automatically;
@@ -60,6 +61,7 @@ Required rule:
Return:
- run make-return-zip.ps1 and send back the generated zip.
- preferred one-file flow: run RUN-RECORDING-SUITE.bat and follow the pauses.
'@ | Set-Content -LiteralPath (Join-Path $packageDir "README.txt") -Encoding UTF8
@'
@@ -96,6 +98,10 @@ powershell -NoProfile -ExecutionPolicy Bypass -File .\compute-content-hash.ps1 -
3. Do not send anything yet.
4. Run `run-before-recorder.bat`.
Alternative one-file flow:
Run `RUN-RECORDING-SUITE.bat`. It will run the before recorder, pause for the manual one-send action, run the after recorder, and then call the return-zip script.
## Step 3 - Manual one-send action
1. In the official iSphere client, manually send exactly the `content_text_to_send`.
@@ -122,6 +128,8 @@ powershell -NoProfile -ExecutionPolicy Bypass -File .\make-return-zip.ps1
Send back the generated zip file.
You can also run `03-make-return-zip.bat`.
## Required returned evidence
The returned evidence should contain:
@@ -205,6 +213,21 @@ echo Done. Check return-evidence\after.
pause
'@ | Set-Content -LiteralPath (Join-Path $packageDir "run-after-recorder.bat") -Encoding ASCII
@'
@echo off
setlocal
cd /d "%~dp0"
call run-before-recorder.bat
'@ | Set-Content -LiteralPath (Join-Path $packageDir "01-run-before-recorder.bat") -Encoding ASCII
@'
@echo off
setlocal
cd /d "%~dp0"
echo Manual one-send action must already be complete before this step.
call run-after-recorder.bat
'@ | Set-Content -LiteralPath (Join-Path $packageDir "02-run-after-recorder.bat") -Encoding ASCII
@'
param(
[Parameter(Mandatory=$true)]
@@ -256,6 +279,59 @@ Compress-Archive -Path $items -DestinationPath $zip -Force
} | ConvertTo-Json -Depth 4 -Compress
'@ | Set-Content -LiteralPath (Join-Path $packageDir "make-return-zip.ps1") -Encoding ASCII
@'
@echo off
setlocal
cd /d "%~dp0"
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0make-return-zip.ps1"
echo exit code: %ERRORLEVEL%
pause
exit /b %ERRORLEVEL%
'@ | Set-Content -LiteralPath (Join-Path $packageDir "03-make-return-zip.bat") -Encoding ASCII
@'
@echo off
setlocal
cd /d "%~dp0"
echo R6c online sandbox-send recording suite
echo.
echo Step 1: BEFORE read-only recorder.
call "%~dp0run-before-recorder.bat"
echo.
echo Step 2: manual one-send action.
echo In the official iSphere client, manually send exactly one sandbox message.
echo Fill SANDBOX-SEND-INPUTS.json before continuing.
pause
echo.
echo Step 3: AFTER read-only recorder.
call "%~dp0run-after-recorder.bat"
echo.
echo Step 4: make return zip.
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0make-return-zip.ps1"
echo exit code: %ERRORLEVEL%
pause
exit /b %ERRORLEVEL%
'@ | Set-Content -LiteralPath (Join-Path $packageDir "RUN-RECORDING-SUITE.bat") -Encoding ASCII
@'
{
"package": "send-sandbox-gate",
"LOCAL_LOGIN_UNAVAILABLE": true,
"ONLINE_SANDBOX_REQUIRED": true,
"MANUAL_ONE_SEND_ONLY": true,
"DO_NOT_SEND_SECOND_TIME": true,
"entrypoint": "RUN-RECORDING-SUITE.bat",
"numbered_steps": [
"01-run-before-recorder.bat",
"02-run-after-recorder.bat",
"03-make-return-zip.bat"
],
"recorder": "recorder/ISphereLiveProbeRecorder.exe",
"return_inputs": "SANDBOX-SEND-INPUTS.json",
"production_send_enabled": false
}
'@ | Set-Content -LiteralPath (Join-Path $packageDir "RECORDING-PACKAGE-MANIFEST.json") -Encoding ASCII
if (-not $NoZip) {
Compress-Archive -Path (Join-Path $packageDir "*") -DestinationPath $zipPath -Force
}