mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(telegram): preserve visible draft recovery (#120626)
* fix(telegram): preserve visible draft recovery * fix(telegram): await visible draft send * test(telegram): use const in draft recovery test * test(telegram): add live partial failure proof * test(telegram): register live recovery coverage * ci(qa): support mock Telegram proof scenarios * test(telegram): isolate live recovery fallback * test(telegram): assert live recovery behavior * fix(agents): join partial reply delivery * test(telegram): keep settlement proof at core boundary
This commit is contained in:
committed by
GitHub
parent
917fd92686
commit
0df1a89e3a
@@ -19,6 +19,14 @@ on:
|
||||
required: false
|
||||
default: telegram-status-command
|
||||
type: string
|
||||
provider_mode:
|
||||
description: QA provider mode
|
||||
required: false
|
||||
default: live-frontier
|
||||
type: choice
|
||||
options:
|
||||
- live-frontier
|
||||
- mock-openai
|
||||
crabbox_provider:
|
||||
description: Crabbox provider for the desktop transcript capture
|
||||
required: false
|
||||
@@ -98,6 +106,7 @@ jobs:
|
||||
crabbox_provider: ${{ steps.resolve.outputs.crabbox_provider }}
|
||||
lease_id: ${{ steps.resolve.outputs.lease_id }}
|
||||
pr_number: ${{ steps.resolve.outputs.pr_number }}
|
||||
provider_mode: ${{ steps.resolve.outputs.provider_mode }}
|
||||
reaction_id: ${{ steps.add_reaction.outputs.reaction_id }}
|
||||
request_source: ${{ steps.resolve.outputs.request_source }}
|
||||
scenario: ${{ steps.resolve.outputs.scenario }}
|
||||
@@ -117,10 +126,16 @@ jobs:
|
||||
|
||||
if (eventName === "workflow_dispatch") {
|
||||
const inputs = context.payload.inputs ?? {};
|
||||
const providerMode = inputs.provider_mode || "live-frontier";
|
||||
if (!["live-frontier", "mock-openai"].includes(providerMode)) {
|
||||
core.setFailed(`Unsupported provider mode for Mantis Telegram: ${providerMode}`);
|
||||
return;
|
||||
}
|
||||
setOutput("should_run", "true");
|
||||
setOutput("candidate_ref", inputs.candidate_ref || "main");
|
||||
setOutput("pr_number", inputs.pr_number || "");
|
||||
setOutput("scenario", inputs.scenario || "telegram-status-command");
|
||||
setOutput("provider_mode", providerMode);
|
||||
setOutput("crabbox_provider", inputs.crabbox_provider || "aws");
|
||||
setOutput("lease_id", inputs.crabbox_lease_id || "");
|
||||
setOutput("request_source", "workflow_dispatch");
|
||||
@@ -158,6 +173,7 @@ jobs:
|
||||
setOutput("candidate_ref", "");
|
||||
setOutput("pr_number", "");
|
||||
setOutput("scenario", "");
|
||||
setOutput("provider_mode", "");
|
||||
setOutput("crabbox_provider", "");
|
||||
setOutput("lease_id", "");
|
||||
setOutput("request_source", "unsupported_issue_comment");
|
||||
@@ -172,6 +188,7 @@ jobs:
|
||||
});
|
||||
const candidateMatch = body.match(/(?:candidate|head)[\s:=]+([^\s`]+)/i);
|
||||
const scenarioMatch = body.match(/(?:scenario|scenarios)[\s:=]+([^\s`]+)/i);
|
||||
const providerModeMatch = body.match(/(?:provider_mode|provider-mode)[\s:=]+([^\s`]+)/i);
|
||||
const providerMatch = body.match(/(?:provider|crabbox_provider)[\s:=]+([^\s`]+)/i);
|
||||
const leaseMatch = body.match(/(?:lease|lease_id|crabbox_lease_id)[\s:=]+([^\s`]+)/i);
|
||||
const rawCandidate = candidateMatch?.[1];
|
||||
@@ -184,11 +201,17 @@ jobs:
|
||||
core.setFailed(`Unsupported Crabbox provider for Mantis Telegram: ${provider}`);
|
||||
return;
|
||||
}
|
||||
const providerMode = providerModeMatch?.[1] || "live-frontier";
|
||||
if (!["live-frontier", "mock-openai"].includes(providerMode)) {
|
||||
core.setFailed(`Unsupported provider mode for Mantis Telegram: ${providerMode}`);
|
||||
return;
|
||||
}
|
||||
|
||||
setOutput("should_run", "true");
|
||||
setOutput("candidate_ref", candidate);
|
||||
setOutput("pr_number", String(issue.number));
|
||||
setOutput("scenario", scenarioMatch?.[1] || "telegram-status-command");
|
||||
setOutput("provider_mode", providerMode);
|
||||
setOutput("crabbox_provider", provider);
|
||||
setOutput("lease_id", leaseMatch?.[1] || "");
|
||||
setOutput("request_source", "issue_comment");
|
||||
@@ -412,6 +435,7 @@ jobs:
|
||||
CRABBOX_CAPACITY_REGIONS: ${{ env.CRABBOX_CAPACITY_REGIONS }}
|
||||
CRABBOX_LEASE_ID: ${{ needs.resolve_request.outputs.lease_id }}
|
||||
CRABBOX_PROVIDER: ${{ needs.resolve_request.outputs.crabbox_provider }}
|
||||
PROVIDER_MODE: ${{ needs.resolve_request.outputs.provider_mode }}
|
||||
SCENARIO_INPUT: ${{ needs.resolve_request.outputs.scenario }}
|
||||
CANDIDATE_SHA: ${{ needs.validate_ref.outputs.candidate_revision }}
|
||||
shell: bash
|
||||
@@ -430,7 +454,6 @@ jobs:
|
||||
CRABBOX_COORDINATOR_TOKEN="${CRABBOX_COORDINATOR_TOKEN:-${OPENCLAW_QA_MANTIS_CRABBOX_COORDINATOR_TOKEN:-}}"
|
||||
export CRABBOX_COORDINATOR CRABBOX_COORDINATOR_TOKEN
|
||||
|
||||
require_var OPENAI_API_KEY
|
||||
require_var OPENCLAW_QA_CONVEX_SITE_URL
|
||||
require_var OPENCLAW_QA_CONVEX_SECRET_CI
|
||||
require_var CRABBOX_COORDINATOR_TOKEN
|
||||
@@ -439,7 +462,29 @@ jobs:
|
||||
output_rel=".artifacts/qa-e2e/mantis/telegram-live"
|
||||
root="$candidate_repo/$output_rel"
|
||||
echo "output_dir=${root}" >> "$GITHUB_OUTPUT"
|
||||
model="${OPENCLAW_CI_OPENAI_MODEL:-openai/gpt-5.6-luna}"
|
||||
|
||||
qa_args=(
|
||||
--repo-root "$candidate_repo"
|
||||
--output-dir "$output_rel"
|
||||
--provider-mode "$PROVIDER_MODE"
|
||||
)
|
||||
case "$PROVIDER_MODE" in
|
||||
live-frontier)
|
||||
require_var OPENAI_API_KEY
|
||||
model="${OPENCLAW_CI_OPENAI_MODEL:-openai/gpt-5.6-luna}"
|
||||
qa_args+=(--model "$model" --alt-model "$model" --fast)
|
||||
;;
|
||||
mock-openai) ;;
|
||||
*)
|
||||
echo "Unsupported provider mode for Mantis Telegram: ${PROVIDER_MODE}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
qa_args+=(
|
||||
--credential-source convex
|
||||
--credential-role ci
|
||||
--allow-failures
|
||||
)
|
||||
|
||||
scenario_args=()
|
||||
if [[ -n "${SCENARIO_INPUT// }" ]]; then
|
||||
@@ -453,17 +498,7 @@ jobs:
|
||||
fi
|
||||
|
||||
set +e
|
||||
pnpm --dir "$candidate_repo" openclaw qa telegram \
|
||||
--repo-root "$candidate_repo" \
|
||||
--output-dir "$output_rel" \
|
||||
--provider-mode live-frontier \
|
||||
--model "$model" \
|
||||
--alt-model "$model" \
|
||||
--fast \
|
||||
--credential-source convex \
|
||||
--credential-role ci \
|
||||
--allow-failures \
|
||||
"${scenario_args[@]}"
|
||||
pnpm --dir "$candidate_repo" openclaw qa telegram "${qa_args[@]}" "${scenario_args[@]}"
|
||||
telegram_exit=$?
|
||||
set -e
|
||||
|
||||
|
||||
Reference in New Issue
Block a user