Skip to content

Commit c119f71

Browse files
committed
fix(ci): align Telegram extended-stable successors
1 parent 173ff0a commit c119f71

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

‎scripts/release-telegram-provenance.sh‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ if [[ "$normalized_context_ref" =~ ^release/([0-9]{4}\.[0-9]+\.[0-9]+)$ ]]; then
6363
echo "Telegram candidate version ${candidate_version} does not belong to release ${release_version}." >&2
6464
exit 1
6565
fi
66-
elif [[ "$normalized_context_ref" =~ ^extended-stable/([0-9]{4}\.[0-9]+\.33)$ ]]; then
66+
elif [[ "$normalized_context_ref" =~ ^extended-stable/([0-9]{4}\.([1-9]|1[0-2])\.33)$ ]]; then
6767
context_version="${BASH_REMATCH[1]}"
68+
context_line="${context_version%.33}"
6869
candidate_version="$(jq -er '.version' "${candidate_root}/package.json")"
69-
if [[ "$candidate_version" != "$context_version" ]]; then
70-
echo "Telegram candidate version ${candidate_version} does not match context ${normalized_context_ref}." >&2
70+
if [[ ! "$candidate_version" =~ ^([0-9]{4}\.([1-9]|1[0-2]))\.([1-9][0-9]*)$ ]] ||
71+
[[ "${BASH_REMATCH[1]}" != "$context_line" ]] ||
72+
(( 10#${BASH_REMATCH[3]} < 33 )); then
73+
echo "Telegram candidate version ${candidate_version} does not belong to context ${normalized_context_ref}; expected a final ${context_line}.PATCH version with PATCH >= 33." >&2
7174
exit 1
7275
fi
7376
context_release_branch="$normalized_context_ref"

‎test/scripts/openclaw-release-telegram-qa-workflow.test.ts‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,25 @@ describe("release Telegram QA workflow", () => {
526526
]);
527527
});
528528

529+
it("accepts only same-line extended-stable successors in both provenance blocks", () => {
530+
for (const provenanceBlock of PROVENANCE_BLOCKS) {
531+
const accepted = runCandidateProvenance(provenanceBlock, {
532+
candidateVersion: "2026.7.35",
533+
targetContextRef: "extended-stable/2026.7.33",
534+
});
535+
expect(accepted.status, `${provenanceBlock.stepName}: ${accepted.stderr}`).toBe(0);
536+
537+
for (const candidateVersion of ["2026.7.32", "2026.8.35", "2026.7.35-beta.1"]) {
538+
const rejected = runCandidateProvenance(provenanceBlock, {
539+
candidateVersion,
540+
targetContextRef: "extended-stable/2026.7.33",
541+
});
542+
expect(rejected.status, `${provenanceBlock.stepName}: ${candidateVersion}`).toBe(1);
543+
expect(rejected.stderr).toContain("PATCH >= 33");
544+
}
545+
}
546+
});
547+
529548
it("accepts only strict signed frozen beta branch heads in both provenance blocks", () => {
530549
for (const provenanceBlock of PROVENANCE_BLOCKS) {
531550
const frozen = runCandidateProvenance(provenanceBlock, {

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5919,11 +5919,13 @@ describe("package artifact reuse", () => {
59195919
expect(telegramDispatch.env).toMatchObject({
59205920
PARENT_WORKFLOW_REF: "${{ github.ref_name }}",
59215921
PARENT_WORKFLOW_SHA: "${{ github.sha }}",
5922+
TARGET_CONTEXT_REF: "${{ inputs.target_context_ref }}",
59225923
});
59235924
expect(telegramDispatch.run).toContain('--ref "$PARENT_WORKFLOW_REF"');
59245925
expect(telegramDispatch.run).toContain(
59255926
'-f expected_trusted_workflow_sha="$PARENT_WORKFLOW_SHA"',
59265927
);
5928+
expect(telegramDispatch.run).toContain('-f target_context_ref="$TARGET_CONTEXT_REF"');
59275929
expect(telegramDispatch.run).toContain('[[ "$child_head_sha" != "$PARENT_WORKFLOW_SHA" ]]');
59285930
expect(telegramDispatch.run).not.toContain("commits/main");
59295931
expect(telegramDispatch.run).not.toContain("dispatch_attempt");

0 commit comments

Comments
 (0)