refactor: drive verify script from patch contract / 讓 verify script 讀 patch contract
This commit is contained in:
@@ -9,6 +9,11 @@ fi
|
||||
STATE_DIR="$1"
|
||||
DIST_DIR="$2"
|
||||
MANIFEST_PATH="$(dirname "$0")/../reports/live-openclawtest-manifest.json"
|
||||
VERIFY_TARGETS_PATH="$(dirname "$0")/../generated/openclaw-verify-targets.json"
|
||||
|
||||
mkdir -p "$(dirname "${VERIFY_TARGETS_PATH}")"
|
||||
npx -p tsx@4.20.6 -p typescript@5.9.3 tsx "$(dirname "$0")/render-openclaw-patch-contract.mjs" > "$(dirname "$0")/../generated/openclaw-telegram-patch-contract.json"
|
||||
npx -p tsx@4.20.6 -p typescript@5.9.3 tsx "$(dirname "$0")/render-openclaw-verify-targets.mjs" > "${VERIFY_TARGETS_PATH}"
|
||||
|
||||
echo "== reply-end-controls PoC verify =="
|
||||
echo "state_dir=${STATE_DIR}"
|
||||
@@ -29,23 +34,15 @@ done
|
||||
|
||||
echo
|
||||
echo "== patch markers =="
|
||||
sudo python3 - <<'PY' "$DIST_DIR"
|
||||
sudo python3 - <<'PY' "$DIST_DIR" "$VERIFY_TARGETS_PATH"
|
||||
from pathlib import Path
|
||||
import json, sys
|
||||
|
||||
live_dist = Path(sys.argv[1])
|
||||
targets = json.loads(Path(sys.argv[2]).read_text(encoding='utf-8'))
|
||||
checks = {
|
||||
'send-sxDwUGaO.js': {
|
||||
'defaultButtonsInjected': 'buildInlineKeyboard(opts.buttons ??',
|
||||
'continueCallback': 'rec:continue',
|
||||
'stopCallback': 'rec:stop',
|
||||
},
|
||||
'bot-Ce301bOE.js': {
|
||||
'stateFilePath': 'reply-end-controls.json',
|
||||
'continueAck': 'reply-end-controls: continue received',
|
||||
'stopAck': 'reply-end-controls: stop received',
|
||||
'stopPolicy': 'Treat the previous thread as closed',
|
||||
},
|
||||
'send-sxDwUGaO.js': targets['send'],
|
||||
'bot-Ce301bOE.js': targets['bot'],
|
||||
}
|
||||
for name, markers in checks.items():
|
||||
path = live_dist / name
|
||||
|
||||
Reference in New Issue
Block a user