Skip to content

Commit 951f130

Browse files
authored
fix(ci): accept attested legacy Telegram evidence (#117330)
* fix(ci): attest legacy Telegram QA evidence mode * fix(ci): attest Telegram QA evidence contract * refactor(ci): narrow Telegram evidence compatibility
1 parent 3777f00 commit 951f130

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

‎.github/workflows/openclaw-release-telegram-qa.yml‎

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,7 +2551,7 @@ jobs:
25512551
' "$proof_path" >/dev/null
25522552
done
25532553
2554-
- name: Finalize trusted Telegram process-boundary evidence
2554+
- name: Finalize trusted Telegram execution evidence
25552555
id: finalize_boundary
25562556
if: always() && steps.terminate_sut.outputs.quiescent == 'true' && steps.run_lane.outputs.output_dir != ''
25572557
env:
@@ -2574,29 +2574,39 @@ jobs:
25742574
jq -e \
25752575
--arg runId "$GITHUB_RUN_ID" \
25762576
--argjson runAttempt "$GITHUB_RUN_ATTEMPT" \
2577+
--arg targetSha "$TARGET_SHA" \
25772578
'
25782579
.version == 1 and
25792580
.kind == "telegram-sut-boundary" and
25802581
.runId == $runId and
25812582
.runAttempt == $runAttempt and
25822583
(.workflowSha | test("^[a-f0-9]{40}$")) and
2583-
(.targetSha | test("^[a-f0-9]{40}$")) and
2584+
.targetSha == $targetSha and
25842585
(.candidateArtifact.id | test("^[1-9][0-9]*$")) and
25852586
(.candidateArtifact.name | length > 0) and
25862587
(.candidateArtifact.digest | test("^[a-f0-9]{64}$")) and
25872588
.candidateArtifact.runId == $runId and
25882589
.candidateArtifact.runAttempt == $runAttempt and
25892590
(.candidateArtifact.fileName | length > 0) and
25902591
(.candidateArtifact.sha256 | test("^[a-f0-9]{64}$")) and
2591-
(.candidateArtifact.sourceSha | test("^[a-f0-9]{40}$")) and
2592+
.candidateArtifact.sourceSha == $targetSha and
25922593
(.candidateArtifact.version | length > 0)
25932594
' "$context_path" >/dev/null
25942595
2595-
# This frozen extended-stable candidate predates the boundary protocol.
2596-
# Every other target fails closed until it emits the required evidence.
2597-
legacy_process_boundary_target_sha="2dbfe013e511d0c7e0720356f5af5c7bb210db19"
2598-
if [[ "$TARGET_SHA" == "$legacy_process_boundary_target_sha" ]]; then
2599-
jq --arg executionMode "legacy-runner" \
2596+
# The archive and source tree were independently attested before this step.
2597+
# A tracked contract opts legacy candidates into the pre-boundary evidence shape.
2598+
legacy_contract_path="${CANDIDATE_ROOT}/qa/contracts/telegram-execution-evidence.json"
2599+
if [[ -e "$legacy_contract_path" || -L "$legacy_contract_path" ]]; then
2600+
[[ -f "$legacy_contract_path" && ! -L "$legacy_contract_path" ]]
2601+
candidate_version="$(jq -er '.candidateArtifact.version' "$context_path")"
2602+
jq -e --arg candidateVersion "$candidate_version" '
2603+
(keys | sort) == ["candidateVersion", "kind", "mode", "version"] and
2604+
.version == 1 and
2605+
.kind == "openclaw-release-telegram-execution-evidence" and
2606+
.mode == "legacy-direct-runner-v1" and
2607+
.candidateVersion == $candidateVersion
2608+
' "$legacy_contract_path" >/dev/null
2609+
jq --arg executionMode "legacy-direct-runner-v1" \
26002610
'. + {executionMode: $executionMode}' "$context_path" >"$aggregate_path"
26012611
chmod 0600 "$aggregate_path"
26022612
echo "aggregate_path=$aggregate_path" >>"$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)