Skip to content

Commit 08102f2

Browse files
authored
test(matrix): use future approval expiry fixtures for reaction targets
1 parent f1d30e1 commit 08102f2

121 files changed

Lines changed: 8163 additions & 1191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/openclaw-changelog-update/scripts/verify-release-notes.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const nonEditorialTypes = new Set([
1919
const nonEditorialTitlePattern =
2020
/(?:^|[\s:([{\-])(docs?|documentation|tests?|testing|qa|quality assurance|refactor(?:ing)?|ci|continuous integration|build|chore|style|lint|format)(?:$|[\s:)\]}\-])/i;
2121
const editorialTitlePattern =
22-
/^\s*(?:\[[^\]]+\]\s*)?(?:#\d+:\s*)?(?:add|allow|block|enable|expose|fail|fix|harden|honor|improve|keep|migrate|move|persist|preserve|prevent|propagate|rate[- ]?limit|restore|revert|ship|support|treat|validate)\b|^\s*#\d+:/i;
22+
/^\s*(?:\[[^\]]+\]\s*)?(?:#\d+:\s*)?(?:add|allow|block|enable|expose|fail|fix|harden|honor|improve|keep|migrate|move|persist|polish|preserve|prevent|propagate|rate[- ]?limit|restore|revert|ship|support|treat|validate)\b|^\s*#\d+:/i;
2323
const genericDirectCommitTerms = new Set([
2424
"add",
2525
"allow",
@@ -656,9 +656,12 @@ function resolveAssociatedPullRequests(commitHashes, targetTimestamp) {
656656
const pullRequests = pullRequestsByCommit.get(commitHash) ?? [];
657657
const seen = new Set(pullRequests);
658658
for (const pullRequest of connection?.nodes ?? []) {
659+
// GitHub's mergedAt can trail the merge commit timestamp by a second.
660+
// Keep an exact merge-commit association so a release ending there does not drop its PR.
661+
const isExactMergeCommit = pullRequest.mergeCommit?.oid === commitHash;
659662
if (
660663
pullRequest.mergedAt &&
661-
mergedByTarget(pullRequest.mergedAt, targetTimestamp) &&
664+
(isExactMergeCommit || mergedByTarget(pullRequest.mergedAt, targetTimestamp)) &&
662665
!seen.has(pullRequest.number)
663666
) {
664667
pullRequests.push(pullRequest.number);
@@ -682,6 +685,7 @@ function resolveAssociatedPullRequests(commitHashes, targetTimestamp) {
682685
nodes {
683686
number
684687
mergedAt
688+
mergeCommit { oid }
685689
}
686690
pageInfo { hasNextPage endCursor }
687691
}
@@ -707,6 +711,7 @@ function resolveAssociatedPullRequests(commitHashes, targetTimestamp) {
707711
nodes {
708712
number
709713
mergedAt
714+
mergeCommit { oid }
710715
}
711716
pageInfo { hasNextPage endCursor }
712717
}
@@ -1191,7 +1196,7 @@ function ledgerFor(
11911196
(entry) =>
11921197
entry.type === "PullRequest" &&
11931198
entry.mergedAt &&
1194-
mergedByTarget(entry.mergedAt, targetTimestamp) &&
1199+
(sourcePullRequests.has(entry.number) || mergedByTarget(entry.mergedAt, targetTimestamp)) &&
11951200
recordedPullRequests.has(entry.number) &&
11961201
!revertedReferences.has(entry.number),
11971202
);
@@ -1514,7 +1519,7 @@ function main() {
15141519
return (
15151520
node?.__typename !== "PullRequest" ||
15161521
!node.mergedAt ||
1517-
!mergedByTarget(node.mergedAt, source.targetTimestamp)
1522+
(!source.pullRequests.has(number) && !mergedByTarget(node.mergedAt, source.targetTimestamp))
15181523
);
15191524
});
15201525
if (!options.writeLedger && invalidRecordedPullRequests.length > 0) {

.github/codeql/openclaw-boundary/queries/raw-socket-callsite-classification.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ predicate allowedRawSocketClientCall(Expr call) {
6464
or
6565
allowedOwnerScope(call, "src/infra/gateway-lock.ts", "checkPortFree")
6666
or
67-
allowedOwnerScope(call, "src/infra/jsonl-socket.ts", "requestJsonlSocket")
67+
allowedOwnerScope(call, "src/infra/jsonl-socket.ts", "requestJsonlSocketWithMaxLineBytes")
6868
or
6969
allowedOwnerScope(call, "src/infra/net/http-connect-tunnel.ts", "connectToProxy")
7070
or

.github/workflows/control-ui-locale-refresh.yml

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,31 +200,86 @@ jobs:
200200
201201
run_openai_refresh
202202
203-
- name: Commit and push locale updates
203+
- name: Prepare locale artifact
204204
env:
205205
LOCALE: ${{ matrix.locale }}
206+
run: |
207+
set -euo pipefail
208+
artifact_dir="${RUNNER_TEMP}/control-ui-locale-${LOCALE}"
209+
mkdir -p "${artifact_dir}"
210+
git add -A ui/src/i18n
211+
git diff --cached --binary --full-index -- ui/src/i18n > "${artifact_dir}/${LOCALE}.patch"
212+
213+
- name: Upload locale artifact
214+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
215+
with:
216+
name: control-ui-locale-${{ matrix.locale }}
217+
path: ${{ runner.temp }}/control-ui-locale-${{ matrix.locale }}/${{ matrix.locale }}.patch
218+
if-no-files-found: error
219+
retention-days: 1
220+
221+
finalize:
222+
name: Commit control UI locale refresh
223+
needs: refresh
224+
if: needs.refresh.result == 'success'
225+
runs-on: ubuntu-latest
226+
steps:
227+
- name: Checkout
228+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
229+
with:
230+
fetch-depth: 0
231+
persist-credentials: true
232+
submodules: false
233+
234+
- name: Download locale artifacts
235+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
236+
with:
237+
pattern: control-ui-locale-*
238+
path: ${{ runner.temp }}/control-ui-locale-artifacts
239+
merge-multiple: true
240+
241+
- name: Apply locale artifacts
242+
run: |
243+
set -euo pipefail
244+
while IFS= read -r patch; do
245+
if [ -s "${patch}" ]; then
246+
git apply "${patch}"
247+
fi
248+
done < <(find "${RUNNER_TEMP}/control-ui-locale-artifacts" -type f -name '*.patch' | sort)
249+
250+
- name: Setup Node environment
251+
uses: ./.github/actions/setup-node-env
252+
with:
253+
install-bun: "false"
254+
255+
- name: Validate control UI locale refresh
256+
run: node --import tsx scripts/control-ui-i18n.ts check
257+
258+
- name: Commit and push aggregate locale refresh
259+
env:
206260
TARGET_BRANCH: ${{ github.event.repository.default_branch }}
207261
run: |
208262
set -euo pipefail
209-
if git diff --quiet -- ui/src/i18n; then
210-
echo "No control UI locale changes for ${LOCALE}."
263+
if ! git status --porcelain -- ui/src/i18n | grep -q .; then
264+
echo "No control UI locale changes."
211265
exit 0
212266
fi
213267
214268
git config user.name "github-actions[bot]"
215269
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
216270
git add -A ui/src/i18n
217-
git commit --no-verify -m "chore(ui): refresh ${LOCALE} control ui locale"
271+
git commit --no-verify -m "chore(ui): refresh control ui locales"
218272
219273
for attempt in 1 2 3 4 5; do
220274
git fetch origin "${TARGET_BRANCH}"
221-
git rebase --autostash "origin/${TARGET_BRANCH}"
275+
git rebase "origin/${TARGET_BRANCH}"
222276
if git push origin HEAD:"${TARGET_BRANCH}"; then
223277
exit 0
224278
fi
225-
echo "Push attempt ${attempt} for ${LOCALE} failed; retrying."
279+
git rebase --abort >/dev/null 2>&1 || true
280+
echo "Aggregate push attempt ${attempt} failed; retrying."
226281
sleep $((attempt * 2))
227282
done
228283
229-
echo "Failed to push ${LOCALE} locale update after retries."
284+
echo "Failed to push aggregate control UI locale update after retries."
230285
exit 1

.github/workflows/native-app-locale-refresh.yml

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,31 +147,91 @@ jobs:
147147
148148
run_openai_refresh
149149
150-
- name: Commit and push locale artifact
150+
- name: Prepare locale artifact
151151
env:
152152
LOCALE: ${{ matrix.locale }}
153+
run: |
154+
set -euo pipefail
155+
artifact_dir="${RUNNER_TEMP}/native-locale-${LOCALE}"
156+
mkdir -p "${artifact_dir}"
157+
git add -A apps/.i18n/native
158+
git diff --cached --binary --full-index -- apps/.i18n/native > "${artifact_dir}/${LOCALE}.patch"
159+
160+
- name: Upload locale artifact
161+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
162+
with:
163+
name: native-locale-${{ matrix.locale }}
164+
path: ${{ runner.temp }}/native-locale-${{ matrix.locale }}/${{ matrix.locale }}.patch
165+
if-no-files-found: error
166+
retention-days: 1
167+
168+
finalize:
169+
name: Commit native locale refresh
170+
needs: refresh
171+
if: needs.refresh.result == 'success'
172+
runs-on: ubuntu-latest
173+
steps:
174+
- name: Checkout
175+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
176+
with:
177+
fetch-depth: 0
178+
persist-credentials: true
179+
submodules: false
180+
181+
- name: Download locale artifacts
182+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
183+
with:
184+
pattern: native-locale-*
185+
path: ${{ runner.temp }}/native-locale-artifacts
186+
merge-multiple: true
187+
188+
- name: Apply locale artifacts
189+
run: |
190+
set -euo pipefail
191+
while IFS= read -r patch; do
192+
if [ -s "${patch}" ]; then
193+
git apply "${patch}"
194+
fi
195+
done < <(find "${RUNNER_TEMP}/native-locale-artifacts" -type f -name '*.patch' | sort)
196+
197+
- name: Setup Node environment
198+
uses: ./.github/actions/setup-node-env
199+
with:
200+
install-bun: "false"
201+
202+
# Every worker observes the same source inventory. Generate it once here
203+
# so locale patches remain independent and can be applied sequentially.
204+
- name: Refresh shared native inventory
205+
run: node --import tsx scripts/native-app-i18n.ts sync --write
206+
207+
- name: Validate native locale refresh
208+
run: node --import tsx scripts/native-app-i18n.ts check
209+
210+
- name: Commit and push aggregate locale refresh
211+
env:
153212
TARGET_BRANCH: ${{ github.event.repository.default_branch }}
154213
run: |
155214
set -euo pipefail
156215
if ! git status --porcelain -- apps/.i18n/native apps/.i18n/native-source.json | grep -q .; then
157-
echo "No native locale changes for ${LOCALE}."
216+
echo "No native locale changes."
158217
exit 0
159218
fi
160219
161220
git config user.name "github-actions[bot]"
162221
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
163222
git add -A apps/.i18n/native apps/.i18n/native-source.json
164-
git commit --no-verify -m "chore(i18n): refresh native ${LOCALE} locale"
223+
git commit --no-verify -m "chore(i18n): refresh native locales"
165224
166225
for attempt in 1 2 3 4 5; do
167226
git fetch origin "${TARGET_BRANCH}"
168-
git rebase --autostash "origin/${TARGET_BRANCH}"
227+
git rebase "origin/${TARGET_BRANCH}"
169228
if git push origin HEAD:"${TARGET_BRANCH}"; then
170229
exit 0
171230
fi
172-
echo "Push attempt ${attempt} for ${LOCALE} failed; retrying."
231+
git rebase --abort >/dev/null 2>&1 || true
232+
echo "Aggregate push attempt ${attempt} failed; retrying."
173233
sleep $((attempt * 2))
174234
done
175235
176-
echo "Failed to push ${LOCALE} native locale update after retries."
236+
echo "Failed to push aggregate native locale update after retries."
177237
exit 1

0 commit comments

Comments
 (0)