Skip to content

Commit 4cb3014

Browse files
authored
Merge branch 'main' into fix/769-file-qn-keeps-extension
2 parents 84c538f + 807a4a3 commit 4cb3014

126 files changed

Lines changed: 48777 additions & 2731 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/issue-labeler.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Config for github/issue-labeler (.github/workflows/issue-labeler.yml).
2-
# Non-versioned format: one regex per label, matched against title + body.
1+
# Config for the Issue area labeler (.github/workflows/issue-labeler.yml).
2+
# FORMAT (parsed line-wise by the workflow): one rule per line, exactly
3+
# "label": 'regex'
4+
# Patterns are compiled as JavaScript RegExp with the `i` flag applied by
5+
# the workflow — do NOT use PCRE-only syntax like inline `(?i)` groups
6+
# (that broke every run, #764). Matched against issue title + body.
37
# Additive only — these never remove a maintainer's manual label.
48

5-
"windows": '(?i)\b(windows|win\s?1[01]|powershell|\.ps1|mapped drive|smb share|unc path)\b'
9+
"windows": '\b(windows|win\s?1[01]|powershell|\.ps1|mapped drive|smb share|unc path)\b'
610

7-
"stability/performance": '(?i)(out of memory|\boom\b|memory leak|segfault|sigsegv|sigbus|crash(es|ed|ing)?|core dumped|\bhang(s|ing)?\b|deadlock|freezes?|time(s)?\s?out|timeout|never finishes|cgroup)'
11+
"stability/performance": '(out of memory|\boom\b|memory leak|segfault|sigsegv|sigbus|crash(es|ed|ing)?|core dumped|\bhang(s|ing)?\b|deadlock|freezes?|time(s)?\s?out|timeout|never finishes|cgroup)'
812

9-
"parsing/quality": '(?i)(trace_path|query_graph|search_graph|calls? edge|missing (edges|nodes)|false positive|zero edges|0 edges|module node|not indexed|extraction|wrong (node|label))'
13+
"parsing/quality": '(trace_path|query_graph|search_graph|calls? edge|missing (edges|nodes)|false positive|zero edges|0 edges|module node|not indexed|extraction|wrong (node|label))'
1014

11-
"editor/integration": '(?i)(cursor|vscode|vs code|opencode|codex|claude code|gemini cli|antigravity|mcp client|\.mcp\.json|installer)'
15+
"editor/integration": '(cursor|vscode|vs code|opencode|codex|claude code|gemini cli|antigravity|mcp client|\.mcp\.json|installer)'
1216

13-
"ux/behavior": '(?i)(web ui|\bui\b|dashboard|3d graph|visuali[sz]ation|watcher|project name|frontend)'
17+
"ux/behavior": '(web ui|\bui\b|dashboard|3d graph|visuali[sz]ation|watcher|project name|frontend)'
1418

15-
"cypher": '(?i)\bcypher\b'
19+
"cypher": '\bcypher\b'
1620

17-
"language-request": '(?i)(language support|hybrid lsp|new language support|support for \w+ language)'
21+
"language-request": '(language support|hybrid lsp|new language support|support for \w+ language)'

.github/workflows/_smoke.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,20 @@ jobs:
248248
run: |
249249
& "C:\Program Files\Windows Defender\MpCmdRun.exe" -SignatureUpdate 2>$null
250250
$result = & "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "$PWD\codebase-memory-mcp.exe" -DisableRemediation
251+
$code = $LASTEXITCODE
251252
Write-Host $result
252-
if ($LASTEXITCODE -ne 0) { Write-Host "BLOCKED: Windows Defender flagged binary!"; exit 1 }
253-
Write-Host "=== Windows Defender: clean ==="
253+
# MpCmdRun -Scan exit codes: 0 = clean, 2 = threat found. Any OTHER non-zero
254+
# means the scan engine could not run at all (e.g. hr=0x800106ba: the Defender
255+
# antimalware service is unavailable on the runner) — that is NOT a detection.
256+
# Fail soft on an engine failure so a transient runner-side AV outage can't
257+
# false-fail a release; only a real detection (exit 2) hard-blocks.
258+
if ($code -eq 2) {
259+
Write-Host "BLOCKED: Windows Defender flagged binary!"; exit 1
260+
} elseif ($code -ne 0) {
261+
Write-Host "::warning::Windows Defender scan could not run (exit $code) - skipping AV gate on this runner"
262+
} else {
263+
Write-Host "=== Windows Defender: clean ==="
264+
}
254265
255266
smoke-linux-portable:
256267
needs: setup-matrix

.github/workflows/_test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ jobs:
8888
env:
8989
CBM_SKIP_PERF: ${{ inputs.skip_perf && '1' || '' }}
9090

91+
test-tsan:
92+
runs-on: ubuntu-latest
93+
timeout-minutes: 120
94+
steps:
95+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
96+
97+
- name: Install deps (Ubuntu)
98+
run: sudo apt-get update && sudo apt-get install -y clang zlib1g-dev
99+
100+
- name: ThreadSanitizer tests
101+
run: make -f Makefile.cbm test-tsan CC=clang CXX=clang++
102+
91103
test-windows:
92104
needs: setup-matrix
93105
strategy:
Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: Issue area labeler
22

33
# Adds area labels to new/edited issues based on keyword regexes in
4-
# .github/issue-labeler.yml. Additive only (sync-labels off): it never
5-
# removes a label a maintainer set by hand. Base bug/enhancement labels
6-
# already come from the issue forms.
4+
# .github/issue-labeler.yml. Additive only (addLabels never removes): it
5+
# never touches a label a maintainer set by hand. Base bug/enhancement
6+
# labels already come from the issue forms.
7+
#
8+
# Implemented with first-party actions/github-script (not a third-party
9+
# labeler action) so every pattern is compiled as a JavaScript RegExp with
10+
# the `i` flag applied centrally — inline `(?i)` groups are PCRE-only and
11+
# threw `SyntaxError: Invalid group` on every issue (#764). A pattern that
12+
# fails to compile now fails the run loudly instead of silently no-oping.
713

814
on:
915
issues:
@@ -16,13 +22,38 @@ jobs:
1622
triage:
1723
runs-on: ubuntu-latest
1824
permissions:
25+
contents: read
1926
issues: write
2027
steps:
21-
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
28+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
2230
with:
23-
configuration-path: .github/issue-labeler.yml
24-
enable-versioned-regex: 0
25-
include-title: 1
26-
include-body: 1
27-
sync-labels: 0
28-
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
script: |
32+
const fs = require('fs');
33+
const text = [context.payload.issue.title, context.payload.issue.body]
34+
.filter(Boolean).join('\n');
35+
const rules = [];
36+
const bad = [];
37+
// Config format: one rule per line — "label": 'regex' (see the
38+
// header comment in .github/issue-labeler.yml).
39+
for (const line of fs.readFileSync('.github/issue-labeler.yml', 'utf8').split('\n')) {
40+
const m = line.match(/^"([^"]+)":\s*'(.*)'\s*$/);
41+
if (!m) continue;
42+
try { rules.push({ label: m[1], re: new RegExp(m[2], 'i') }); }
43+
catch (e) { bad.push(`${m[1]}: ${e.message}`); }
44+
}
45+
if (rules.length === 0 && bad.length === 0) {
46+
core.setFailed('no labeling rules parsed from .github/issue-labeler.yml');
47+
return;
48+
}
49+
const labels = rules.filter(r => r.re.test(text)).map(r => r.label);
50+
if (labels.length) {
51+
await github.rest.issues.addLabels({
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
issue_number: context.issue.number,
55+
labels,
56+
});
57+
}
58+
core.info(`matched: ${labels.join(', ') || '(none)'}`);
59+
if (bad.length) core.setFailed(`invalid label regex(es): ${bad.join('; ')}`);

.github/workflows/pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ jobs:
5151
PR: ${{ github.event.pull_request.number }}
5252
REPO: ${{ github.repository }}
5353
run: |
54-
FILES=$(gh pr diff "$PR" --repo "$REPO" --name-only)
54+
# The full .diff endpoint rejects large-but-valid PRs at 20k lines.
55+
# The paginated files endpoint remains filename-only for this gate.
56+
FILES=$(gh api --paginate "repos/$REPO/pulls/$PR/files?per_page=100" --jq '.[].filename')
5557
printf '%s\n' "$FILES"
5658
if printf '%s\n' "$FILES" | grep -qE '^(src/|internal/|scripts/build\.sh|scripts/smoke-test\.sh|scripts/env\.sh|Makefile\.cbm)'; then
5759
echo "product=true" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)