Skip to content

Commit 36d8328

Browse files
authored
Merge pull request #667 from DeusData/qa/bug-repro-suite
QA: reproduce-first bug suite + LSP/grammar extraction fixes (5-platform board green)
2 parents b075f05 + fd412d0 commit 36d8328

125 files changed

Lines changed: 26715 additions & 470 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.

.github/workflows/_build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
# release with no Intel macOS binary (a user-reported gap). macos-15-intel
4646
# is GitHub's supported Intel image through Aug 2027 (the last x86_64 macOS
4747
# runner); revisit the Intel leg before that retirement.
48-
timeout-minutes: 25
48+
timeout-minutes: 240
4949
steps:
5050
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5151

@@ -120,7 +120,7 @@ jobs:
120120

121121
build-windows:
122122
runs-on: windows-latest
123-
timeout-minutes: 25
123+
timeout-minutes: 240
124124
steps:
125125
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
126126

@@ -195,7 +195,7 @@ jobs:
195195
- arch: arm64
196196
runner: ubuntu-24.04-arm
197197
runs-on: ${{ matrix.runner }}
198-
timeout-minutes: 25
198+
timeout-minutes: 240
199199
steps:
200200
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
201201

.github/workflows/_security.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
license-gate:
2626
runs-on: ubuntu-latest
27-
timeout-minutes: 30
27+
timeout-minutes: 240
2828
steps:
2929
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3030
- name: Install ScanCode Toolkit
@@ -40,7 +40,7 @@ jobs:
4040

4141
codeql-gate:
4242
runs-on: ubuntu-latest
43-
timeout-minutes: 50
43+
timeout-minutes: 240
4444
steps:
4545
- name: Wait for CodeQL on current commit (max 45 min)
4646
env:

.github/workflows/_smoke.yml

Lines changed: 73 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,81 @@
22
name: Smoke
33

44
on:
5-
workflow_call: {}
5+
workflow_call:
6+
inputs:
7+
broad_platforms:
8+
description: 'Smoke the shipped binaries on the broad platform matrix (extra OS versions) instead of the core set'
9+
type: boolean
10+
default: false
611

712
permissions:
813
contents: read
914

1015
jobs:
16+
# Emit the platform matrices as JSON. The CORE set is the default (fast,
17+
# unchanged); the BROAD set adds extra free runners (additional OS versions)
18+
# that download the SAME shipped artifact for their goos/goarch and verify it
19+
# runs on a wider range of OS versions. No new artifacts are built — broad
20+
# legs reuse the exact binaries produced by _build.yml.
21+
setup-matrix:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
outputs:
25+
unix: ${{ steps.set.outputs.unix }}
26+
windows: ${{ steps.set.outputs.windows }}
27+
portable: ${{ steps.set.outputs.portable }}
28+
steps:
29+
- name: Compute matrices
30+
id: set
31+
env:
32+
BROAD: ${{ inputs.broad_platforms }}
33+
run: |
34+
CORE_UNIX='[
35+
{"os":"ubuntu-latest","goos":"linux","goarch":"amd64"},
36+
{"os":"ubuntu-24.04-arm","goos":"linux","goarch":"arm64"},
37+
{"os":"macos-14","goos":"darwin","goarch":"arm64"},
38+
{"os":"macos-15-intel","goos":"darwin","goarch":"amd64"}
39+
]'
40+
# Broad legs reuse existing goos/goarch artifacts on newer/older OS
41+
# versions (e.g. ubuntu-22.04 = older glibc) to widen the run-anywhere
42+
# signal without building new targets.
43+
BROAD_UNIX='[
44+
{"os":"ubuntu-22.04","goos":"linux","goarch":"amd64","optional":true},
45+
{"os":"ubuntu-22.04-arm","goos":"linux","goarch":"arm64","optional":true},
46+
{"os":"macos-15","goos":"darwin","goarch":"arm64","optional":true}
47+
]'
48+
CORE_WIN='[{"os":"windows-latest"}]'
49+
# windows-11-arm runs the shipped x86_64 binary under emulation —
50+
# verifies the Windows artifact still launches on ARM hardware.
51+
BROAD_WIN='[{"os":"windows-2025","optional":true},{"os":"windows-11-arm","optional":true}]'
52+
CORE_PORTABLE='[
53+
{"arch":"amd64","runner":"ubuntu-latest"},
54+
{"arch":"arm64","runner":"ubuntu-24.04-arm"}
55+
]'
56+
BROAD_PORTABLE='[
57+
{"arch":"amd64","runner":"ubuntu-22.04","optional":true},
58+
{"arch":"arm64","runner":"ubuntu-22.04-arm","optional":true}
59+
]'
60+
if [ "$BROAD" = "true" ]; then
61+
UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b')
62+
WIN=$(jq -cn --argjson a "$CORE_WIN" --argjson b "$BROAD_WIN" '$a + $b')
63+
PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" --argjson b "$BROAD_PORTABLE" '$a + $b')
64+
else
65+
UNIX=$(jq -cn --argjson a "$CORE_UNIX" '$a')
66+
WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
67+
PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" '$a')
68+
fi
69+
echo "unix={\"variant\":[\"standard\",\"ui\"],\"include\":$UNIX}" >> "$GITHUB_OUTPUT"
70+
echo "windows={\"variant\":[\"standard\",\"ui\"],\"include\":$WIN}" >> "$GITHUB_OUTPUT"
71+
echo "portable={\"variant\":[\"standard\",\"ui\"],\"include\":$PORTABLE}" >> "$GITHUB_OUTPUT"
72+
1173
smoke-unix:
74+
needs: setup-matrix
1275
strategy:
1376
fail-fast: false
14-
matrix:
15-
include:
16-
- os: ubuntu-latest
17-
goos: linux
18-
goarch: amd64
19-
- os: ubuntu-24.04-arm
20-
goos: linux
21-
goarch: arm64
22-
- os: macos-14
23-
goos: darwin
24-
goarch: arm64
25-
- os: macos-15-intel
26-
goos: darwin
27-
goarch: amd64
28-
variant: [standard, ui]
77+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.unix) }}
2978
runs-on: ${{ matrix.os }}
79+
continue-on-error: ${{ matrix.optional == true }}
3080
timeout-minutes: 15
3181
steps:
3282
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -98,11 +148,12 @@ jobs:
98148
clamscan --no-summary ./codebase-memory-mcp
99149
100150
smoke-windows:
151+
needs: setup-matrix
101152
strategy:
102153
fail-fast: false
103-
matrix:
104-
variant: [standard, ui]
105-
runs-on: windows-latest
154+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.windows) }}
155+
runs-on: ${{ matrix.os }}
156+
continue-on-error: ${{ matrix.optional == true }}
106157
timeout-minutes: 15
107158
steps:
108159
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -164,16 +215,12 @@ jobs:
164215
Write-Host "=== Windows Defender: clean ==="
165216
166217
smoke-linux-portable:
218+
needs: setup-matrix
167219
strategy:
168220
fail-fast: false
169-
matrix:
170-
include:
171-
- arch: amd64
172-
runner: ubuntu-latest
173-
- arch: arm64
174-
runner: ubuntu-24.04-arm
175-
variant: [standard, ui]
221+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.portable) }}
176222
runs-on: ${{ matrix.runner }}
223+
continue-on-error: ${{ matrix.optional == true }}
177224
timeout-minutes: 15
178225
steps:
179226
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

.github/workflows/_soak.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ jobs:
4747
cc: cc
4848
cxx: c++
4949
runs-on: ${{ matrix.os }}
50-
timeout-minutes: 30
50+
# BUG FIX: this was hard-coded to 30, but the caller (nightly-soak.yml)
51+
# passes duration_minutes: 240. GitHub killed the job at 30 min, so the
52+
# "4h nightly soak" was SILENTLY TRUNCATED to 30 min and never once ran
53+
# multi-hour. Budget must always exceed the passed duration; 300 covers
54+
# the 240-min nightly with headroom (build + analysis + idle phases).
55+
timeout-minutes: 300
5156
steps:
5257
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5358
- name: Install deps (Linux)
@@ -67,7 +72,10 @@ jobs:
6772

6873
soak-quick-windows:
6974
runs-on: windows-latest
70-
timeout-minutes: 30
75+
# BUG FIX (same 30→240 mismatch as soak-quick above): the caller passes
76+
# duration_minutes: 240, so a 30-min cap truncated the nightly soak here
77+
# too. 300 covers the 240-min nightly with headroom.
78+
timeout-minutes: 300
7179
steps:
7280
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7381
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
@@ -125,7 +133,12 @@ jobs:
125133
cc: cc
126134
cxx: c++
127135
runs-on: ${{ matrix.os }}
128-
timeout-minutes: 45
136+
# ASan soak runs a FIXED 15-min soak (hard-coded below, NOT driven by
137+
# inputs.duration_minutes), but the ASan-instrumented build is slow and
138+
# leak reporting adds teardown time. 60 keeps the budget comfortably above
139+
# the 15-min run so it is never truncated. (Same class of bug as the
140+
# soak-quick 30→240 mismatch above — keep the timeout above the run length.)
141+
timeout-minutes: 240
129142
steps:
130143
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
131144
- name: Install deps (Linux)
@@ -150,7 +163,10 @@ jobs:
150163
soak-asan-windows:
151164
if: ${{ inputs.run_asan }}
152165
runs-on: windows-latest
153-
timeout-minutes: 45
166+
# FIXED 15-min soak (hard-coded below). MSYS2/Wine + ASan build is the
167+
# slowest path; 60 keeps the budget well above the run length so it is
168+
# never truncated.
169+
timeout-minutes: 240
154170
steps:
155171
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
156172
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2

.github/workflows/_test.yml

Lines changed: 75 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,72 @@ on:
88
description: 'Skip incremental perf tests (phases 2-7)'
99
type: boolean
1010
default: true
11+
broad_platforms:
12+
description: 'Test the broad platform matrix (older glibc + extra OS versions) instead of the core set'
13+
type: boolean
14+
default: false
1115

1216
permissions:
1317
contents: read
1418

1519
jobs:
20+
# Emit the platform matrices as JSON. The CORE set is the default (fast,
21+
# unchanged); the BROAD set adds extra free runners (older glibc /
22+
# additional OS versions) for a wider "does it build everywhere" picture.
23+
setup-matrix:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 5
26+
outputs:
27+
unix: ${{ steps.set.outputs.unix }}
28+
windows: ${{ steps.set.outputs.windows }}
29+
steps:
30+
- name: Compute matrices
31+
id: set
32+
env:
33+
BROAD: ${{ inputs.broad_platforms }}
34+
run: |
35+
CORE_UNIX='[
36+
{"os":"ubuntu-latest","cc":"gcc","cxx":"g++"},
37+
{"os":"ubuntu-24.04-arm","cc":"gcc","cxx":"g++"},
38+
{"os":"macos-14","cc":"cc","cxx":"c++"},
39+
{"os":"macos-15-intel","cc":"cc","cxx":"c++"}
40+
]'
41+
BROAD_UNIX='[
42+
{"os":"ubuntu-22.04","cc":"gcc","cxx":"g++","optional":true},
43+
{"os":"ubuntu-22.04-arm","cc":"gcc","cxx":"g++","optional":true},
44+
{"os":"macos-15","cc":"cc","cxx":"c++","optional":true}
45+
]'
46+
# Each Windows leg pins the msys2 environment + package arch to the
47+
# RUNNER architecture so the build is native, never emulated:
48+
# x86-64 runners -> CLANG64 (mingw-w64-clang-x86_64-*)
49+
# ARM64 runner -> CLANGARM64 (mingw-w64-clang-aarch64-*)
50+
# windows-11-arm previously used the x86-64 CLANG64 toolchain, so its
51+
# binary ran under Windows-on-ARM x86-64 emulation and ASan's function
52+
# interception crashed (interception_win: unhandled instruction). With
53+
# the native ARM64 toolchain ASan instruments native ARM64 code, so it
54+
# is a real (non-optional) gate, not a tolerated emulated-flake.
55+
CORE_WIN='[{"os":"windows-latest","msystem":"CLANG64","pkg":"x86_64"}]'
56+
BROAD_WIN='[{"os":"windows-2025","optional":true,"msystem":"CLANG64","pkg":"x86_64"},{"os":"windows-11-arm","msystem":"CLANGARM64","pkg":"aarch64"}]'
57+
if [ "$BROAD" = "true" ]; then
58+
UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b')
59+
WIN=$(jq -cn --argjson a "$CORE_WIN" --argjson b "$BROAD_WIN" '$a + $b')
60+
else
61+
UNIX=$(jq -cn --argjson a "$CORE_UNIX" '$a')
62+
WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
63+
fi
64+
echo "unix={\"include\":$UNIX}" >> "$GITHUB_OUTPUT"
65+
echo "windows={\"include\":$WIN}" >> "$GITHUB_OUTPUT"
66+
1667
test-unix:
68+
needs: setup-matrix
1769
strategy:
1870
fail-fast: false
19-
matrix:
20-
include:
21-
- os: ubuntu-latest
22-
cc: gcc
23-
cxx: g++
24-
- os: ubuntu-24.04-arm
25-
cc: gcc
26-
cxx: g++
27-
- os: macos-14
28-
cc: cc
29-
cxx: c++
30-
- os: macos-15-intel
31-
cc: cc
32-
cxx: c++
71+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.unix) }}
3372
runs-on: ${{ matrix.os }}
34-
timeout-minutes: 60
73+
# Broad-only legs (extra OS versions) are informational: visible but
74+
# non-blocking, so a flaky/less-common runner can't block a release.
75+
continue-on-error: ${{ matrix.optional == true }}
76+
timeout-minutes: 240
3577
steps:
3678
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3779

@@ -45,24 +87,35 @@ jobs:
4587
CBM_SKIP_PERF: ${{ inputs.skip_perf && '1' || '' }}
4688

4789
test-windows:
48-
runs-on: windows-latest
49-
timeout-minutes: 60
90+
needs: setup-matrix
91+
strategy:
92+
fail-fast: false
93+
matrix: ${{ fromJSON(needs.setup-matrix.outputs.windows) }}
94+
runs-on: ${{ matrix.os }}
95+
continue-on-error: ${{ matrix.optional == true }}
96+
timeout-minutes: 240
5097
steps:
5198
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5299

53100
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
54101
with:
55-
msystem: CLANG64
102+
msystem: ${{ matrix.msystem }}
56103
path-type: inherit
57104
install: >-
58-
mingw-w64-clang-x86_64-clang
59-
mingw-w64-clang-x86_64-compiler-rt
60-
mingw-w64-clang-x86_64-zlib
105+
mingw-w64-clang-${{ matrix.pkg }}-clang
106+
mingw-w64-clang-${{ matrix.pkg }}-compiler-rt
107+
mingw-w64-clang-${{ matrix.pkg }}-zlib
61108
make
62109
git
63110
64111
- name: Test
65112
shell: msys2 {0}
66-
run: scripts/test.sh CC=clang CXX=clang++
113+
# AddressSanitizer is unavailable on native ARM64 Windows (LLVM ships no
114+
# libclang_rt.asan for aarch64-w64-windows-gnu) and cannot intercept the
115+
# system DLLs under x86-64 emulation either, so windows-11-arm runs the
116+
# native ARM64 build with SANITIZE= (no sanitizer) — still a real
117+
# functional gate. ASan/UBSan coverage comes from the other 9 legs,
118+
# including native-ARM Linux/macOS. x86-64 Windows keeps full sanitizers.
119+
run: scripts/test.sh CC=clang CXX=clang++ ${{ matrix.os == 'windows-11-arm' && 'SANITIZE=' || '' }}
67120
env:
68121
CBM_SKIP_PERF: ${{ inputs.skip_perf && '1' || '' }}

0 commit comments

Comments
 (0)