* build: standardize the Debug build dir on build/debug `docs/BUILD.md` and `AGENTS.md` document `./setup.sh Debug` producing `build/debug`, but `setup.sh`/`setup.ps1` created `builddir` and `.clangd` pointed there too, so the documented layout and the actual tree disagreed. Align the Debug mapping with the documented layout: - setup.sh / setup.ps1: Debug -> `build/debug` - CMakeLists.txt: Debug `_meson_build_dir` -> `build/debug` - .clangd: CompilationDatabase -> `build/debug` - plugin test fallbacks, S3 smoke default, quality-gate candidate list, and doc examples -> `build/debug` Legacy `builddir` trees stay readable: the quality gate and local-ci scripts still probe `builddir` as a fallback, and `plugin_trust` already treats `/build/` paths as build artifacts. * build: migrate remaining Debug consumers off builddir Follow-up to the Debug build-dir standardization: tracked consumers still hardcoded `builddir` and would break or silently skip against a fresh `build/debug` tree. Migrate them, keeping tolerant fallbacks where a legacy tree may still exist. - CI: `.github/workflows/tests.yml` runs `./setup.sh Debug` and then compiled `-C builddir`; switch BUILD_DIR/COMPILE_DB_DIR/compile paths to `build/debug`. Same for windows-test-diagnose.yml. - IDE: `.vscode/tasks.json` build/test/bench tasks target `build/debug`. - Runtime: `object_storage_plugin_loader` also probes `build/debug/plugins` (and the flat `build/debug`), retaining the `builddir` fallbacks. - Tests/docs: ONNX tuning integration plugin dir, benchmarks, and plugin READMEs/examples use `build/debug`. `./build/*` is already excluded from the quality-gate find and `.dockerignore`, so no exclusion lists change.
277 lines
No EOL
12 KiB
JSON
277 lines
No EOL
12 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "setup (Debug)",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": ".\\setup.ps1 Debug"
|
|
},
|
|
"linux": {
|
|
"command": "./setup.sh Debug"
|
|
},
|
|
"osx": {
|
|
"command": "./setup.sh Debug"
|
|
},
|
|
"problemMatcher": [],
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
},
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true
|
|
}
|
|
},
|
|
{
|
|
"label": "setup (Release)",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": ".\\setup.ps1 Release"
|
|
},
|
|
"linux": {
|
|
"command": "./setup.sh Release"
|
|
},
|
|
"osx": {
|
|
"command": "./setup.sh Release"
|
|
},
|
|
"problemMatcher": [],
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
}
|
|
},
|
|
{
|
|
"label": "build (Debug)",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": "build/debug\\build-debug\\conan\\conanbuild.ps1; meson compile -j 4 -C build/debug"
|
|
},
|
|
"linux": {
|
|
"command": "meson compile -j 4 -C build/debug"
|
|
},
|
|
"osx": {
|
|
"command": "meson compile -j 4 -C build/debug"
|
|
},
|
|
"problemMatcher": [
|
|
"$msCompile"
|
|
],
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true
|
|
},
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
}
|
|
},
|
|
{
|
|
"label": "meson-build-debug",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": "if (Test-Path build/debug\\build-debug\\conan\\conanbuild.ps1) { build/debug\\build-debug\\conan\\conanbuild.ps1 }; meson compile -C build/debug"
|
|
},
|
|
"linux": {
|
|
"command": "meson compile -j 4 -C build/debug"
|
|
},
|
|
"osx": {
|
|
"command": "meson compile -j 4 -C build/debug"
|
|
},
|
|
"problemMatcher": [
|
|
"$msCompile"
|
|
],
|
|
"group": "build",
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
}
|
|
},
|
|
{
|
|
"label": "build (Release)",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": "build\\release\\build-release\\conan\\conanbuild.ps1; meson compile -j 4 -C build/release"
|
|
},
|
|
"linux": {
|
|
"command": "meson compile -j 4 -C build/release"
|
|
},
|
|
"osx": {
|
|
"command": "meson compile -j 4 -C build/release"
|
|
},
|
|
"problemMatcher": [
|
|
"$msCompile"
|
|
],
|
|
"group": "build",
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
}
|
|
},
|
|
{
|
|
"label": "meson-build-release",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": "if (Test-Path build\\release\\build-release\\conan\\conanbuild.ps1) { build\\release\\build-release\\conan\\conanbuild.ps1 }; meson compile -C build/release"
|
|
},
|
|
"linux": {
|
|
"command": "meson compile -j 4 -C build/release"
|
|
},
|
|
"osx": {
|
|
"command": "meson compile -j 4 -C build/release"
|
|
},
|
|
"problemMatcher": [
|
|
"$msCompile"
|
|
],
|
|
"group": "build",
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
}
|
|
},
|
|
{
|
|
"label": "test (Debug)",
|
|
"type": "shell",
|
|
"dependsOn": [
|
|
"build (Debug)"
|
|
],
|
|
"command": "meson test -j 4 -C build/debug --print-errorlogs",
|
|
"problemMatcher": [
|
|
"$gcc"
|
|
],
|
|
"group": {
|
|
"kind": "test",
|
|
"isDefault": true
|
|
},
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "shared"
|
|
}
|
|
},
|
|
{
|
|
"label": "clean",
|
|
"type": "shell",
|
|
"windows": {
|
|
"command": "Remove-Item -Recurse -Force build/debug,build -ErrorAction SilentlyContinue"
|
|
},
|
|
"linux": {
|
|
"command": "rm -rf build/debug build"
|
|
},
|
|
"osx": {
|
|
"command": "rm -rf build/debug build"
|
|
},
|
|
"problemMatcher": [],
|
|
"group": "none"
|
|
},
|
|
{
|
|
"label": "local-ci: build image (ubuntu-24.04)",
|
|
"type": "shell",
|
|
"command": "docker build -t yams/local-ci:ubuntu-24.04 -f docker/local-ci/ubuntu.Dockerfile .",
|
|
"problemMatcher": [],
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": false
|
|
}
|
|
},
|
|
{
|
|
"label": "local-ci: run meson unit tests (docker)",
|
|
"type": "shell",
|
|
"dependsOn": [
|
|
"local-ci: build image (ubuntu-24.04)"
|
|
],
|
|
"command": "docker run --rm -v ${workspaceFolder}:/work -w /work yams/local-ci:ubuntu-24.04 bash -lc 'scripts/local-ci/run_meson_tests.sh'",
|
|
"problemMatcher": [
|
|
"$gcc"
|
|
],
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "local-ci: run daemon-only tests (docker)",
|
|
"type": "shell",
|
|
"dependsOn": [
|
|
"local-ci: build image (ubuntu-24.04)"
|
|
],
|
|
"command": "docker run --rm -v ${workspaceFolder}:/work -w /work yams/local-ci:ubuntu-24.04 bash -lc 'XDG_RUNTIME_DIR=/run/user/$(id -u) mkdir -p \"$XDG_RUNTIME_DIR\" && BUILD_DIR=build/yams-debug conan install . -of \"$BUILD_DIR\" -s build_type=Debug -o \"yams/*:build_tests=True\" --build=missing && meson setup \"$BUILD_DIR\" -Dbuildtype=debug -Dbuild-tests=true -Denable-onnx=disabled && meson compile -j 4 -C \"$BUILD_DIR\" && meson test -j 4 -C \"$BUILD_DIR\" --print-errorlogs --no-rebuild --suite unit+isolated --test-args=\"--gtest_filter=DaemonTest.*\"'",
|
|
"problemMatcher": [
|
|
"$gcc"
|
|
],
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "local-ci: clean build cache (docker)",
|
|
"type": "shell",
|
|
"command": "docker run --rm -v ${workspaceFolder}:/work -w /work yams/local-ci:ubuntu-24.04 bash -lc 'rm -rf build || true'",
|
|
"problemMatcher": [],
|
|
"group": "none"
|
|
},
|
|
{
|
|
"label": "triage: client timeout cases",
|
|
"type": "shell",
|
|
"command": "for c in \"Client timeout recovery: Immediate EOF detection and retry\" \"Client timeout recovery: Honors YAMS_IPC_TIMEOUT_MS for idle reap\" \"Client timeout recovery: Streaming request connection handling\" \"Client timeout recovery: Connection pool management\" \"Client timeout recovery: Rapid request cycle\" \"Client timeout recovery: Daemon restart handling\" \"Client timeout recovery: Error message quality\" \"Client timeout recovery: Connection refused when daemon down\" \"Client timeout recovery: Shutdown cancels in-flight request\" \"Client timeout recovery: Tag filtering matrix for list and search\"; do echo \"=== $c\"; ./build/debug/tests/integration/daemon/yams_client_timeout_recovery_tests_catch2 \"$c\" >/tmp/ctr_case.log 2>&1; code=$?; echo \"exit=$code\"; if [ $code -ne 0 ]; then tail -n 120 /tmp/ctr_case.log; break; fi; done"
|
|
},
|
|
{
|
|
"label": "triage: tsan signatures",
|
|
"type": "shell",
|
|
"command": "rg -n \"SUMMARY: ThreadSanitizer|WARNING: ThreadSanitizer|data race|mutex|signal\" /tmp/ctr_case.log | head -n 120"
|
|
},
|
|
{
|
|
"label": "triage: client-timeout verbose",
|
|
"type": "shell",
|
|
"command": "meson test -C build/debug \"yams:client_timeout_recovery\" --print-errorlogs --test-args=\"-s\""
|
|
},
|
|
{
|
|
"label": "triage: find failed assertion",
|
|
"type": "shell",
|
|
"command": "python3 - <<'PY'\nfrom pathlib import Path\ntext=Path('build/debug/meson-logs/testlog.txt').read_text(errors='replace')\nfor pat in ['FAILED:', 'failed:', 'REQUIRE(', 'CHECK(', 'Assertion', 'test cases:']:\n print('\\n--',pat)\n for i,line in enumerate(text.splitlines(),1):\n if pat in line:\n print(i,line)\n if pat!='test cases:':\n pass\n \nPY"
|
|
},
|
|
{
|
|
"label": "triage: failed-line-context",
|
|
"type": "shell",
|
|
"command": "python3 - <<'PY'\nfrom pathlib import Path\nlines=Path('build/debug/meson-logs/testlog.txt').read_text(errors='replace').splitlines()\nfor i,l in enumerate(lines):\n if 'FAILED:' in l:\n s=max(0,i-6); e=min(len(lines),i+12)\n print('\\n'.join(f'{j+1}: {lines[j]}' for j in range(s,e)))\n print('---')\nPY"
|
|
},
|
|
{
|
|
"label": "triage: daemon-shutdown failed line",
|
|
"type": "shell",
|
|
"command": "python3 - <<'PY'\nfrom pathlib import Path\nlines=Path('build/debug/meson-logs/testlog.txt').read_text(errors='replace').splitlines()\nfor i,l in enumerate(lines):\n if 'FAILED:' in l:\n s=max(0,i-8); e=min(len(lines),i+12)\n print('\\n'.join(f'{j+1}: {lines[j]}' for j in range(s,e)))\n print('---')\nPY"
|
|
},
|
|
{
|
|
"label": "triage: daemon-shutdown verbose",
|
|
"type": "shell",
|
|
"command": "meson test -C build/debug \"yams:daemon_shutdown_inflight_ops\" --print-errorlogs --test-args=\"-s\" && python3 - <<'PY'\nfrom pathlib import Path\nlines=Path('build/debug/meson-logs/testlog.txt').read_text(errors='replace').splitlines()\nfor i,l in enumerate(lines):\n if 'FAILED:' in l:\n s=max(0,i-6); e=min(len(lines),i+12)\n print('\\n'.join(f'{j+1}: {lines[j]}' for j in range(s,e)))\n print('---')\nPY"
|
|
},
|
|
{
|
|
"label": "stability: daemon-shutdown repeats",
|
|
"type": "shell",
|
|
"command": "for i in 1 2 3; do echo \"RUN $i\"; meson test -C build/debug \"yams:daemon_shutdown_inflight_ops\" --print-errorlogs || exit 1; done"
|
|
},
|
|
{
|
|
"label": "bench: search baseline (adaptive off)",
|
|
"type": "shell",
|
|
"command": "mkdir -p bench_results && YAMS_ENABLE_ENV_OVERRIDES=1 YAMS_BENCH_ENABLE_EMBEDDINGS=1 YAMS_BENCH_DOC_COUNT=500 YAMS_SEARCH_ENABLE_ADAPTIVE_FALLBACK=0 ./build/debug/tests/benchmarks/yams_retrieval_service_benchmarks --benchmark_filter='BM_RetrievalService_Search_(Keyword|Hybrid)' --benchmark_repetitions=5 --benchmark_report_aggregates_only=true --benchmark_out=bench_results/search_latency_baseline.json --benchmark_out_format=json",
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "bench: search adaptive fallback",
|
|
"type": "shell",
|
|
"command": "mkdir -p bench_results && YAMS_ENABLE_ENV_OVERRIDES=1 YAMS_BENCH_ENABLE_EMBEDDINGS=1 YAMS_BENCH_DOC_COUNT=500 YAMS_SEARCH_ENABLE_ADAPTIVE_FALLBACK=1 YAMS_SEARCH_ADAPTIVE_MIN_TIER1_HITS=0 ./build/debug/tests/benchmarks/yams_retrieval_service_benchmarks --benchmark_filter='BM_RetrievalService_Search_(Keyword|Hybrid)' --benchmark_repetitions=5 --benchmark_report_aggregates_only=true --benchmark_out=bench_results/search_latency_adaptive.json --benchmark_out_format=json",
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "bench: compare baseline vs adaptive",
|
|
"type": "shell",
|
|
"command": "python3 - <<'PY'\nimport json\nfrom pathlib import Path\n\ndef load(path):\n p = Path(path)\n if not p.exists():\n raise SystemExit(f'missing file: {p}')\n data = json.loads(p.read_text())\n out = {}\n for b in data.get('benchmarks', []):\n name = b.get('name', '')\n if name.startswith('BM_RetrievalService_Search_') and b.get('run_type') == 'aggregate':\n agg = b.get('aggregate_name')\n if agg in ('mean', 'median'):\n out[(name, agg)] = b.get('real_time', 0.0)\n return out\n\nb = load('bench_results/search_latency_baseline.json')\na = load('bench_results/search_latency_adaptive.json')\nprint('Search latency comparison (microseconds, lower is better):')\nfor key in sorted(set(b) | set(a)):\n bv = b.get(key)\n av = a.get(key)\n if bv is None or av is None:\n print(f'{key}: baseline={bv} adaptive={av}')\n continue\n delta = av - bv\n pct = (delta / bv * 100.0) if bv else 0.0\n print(f'{key[0]} [{key[1]}]: baseline={bv:.1f} adaptive={av:.1f} delta={delta:.1f} ({pct:+.2f}%)')\nPY",
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "bench: search graph rerank",
|
|
"type": "shell",
|
|
"command": "mkdir -p bench_results && YAMS_ENABLE_ENV_OVERRIDES=1 YAMS_BENCH_ENABLE_EMBEDDINGS=1 YAMS_BENCH_DOC_COUNT=500 YAMS_SEARCH_ENABLE_ADAPTIVE_FALLBACK=0 YAMS_SEARCH_ENABLE_GRAPH_RERANK=1 YAMS_SEARCH_GRAPH_RERANK_TOPN=25 YAMS_SEARCH_GRAPH_RERANK_WEIGHT=0.15 YAMS_SEARCH_GRAPH_RERANK_MAX_BOOST=0.20 YAMS_SEARCH_GRAPH_BUDGET_MS=10 ./build/debug/tests/benchmarks/yams_retrieval_service_benchmarks --benchmark_filter='BM_RetrievalService_Search_(Keyword|Hybrid)' --benchmark_repetitions=5 --benchmark_report_aggregates_only=true --benchmark_out=bench_results/search_latency_graph_rerank.json --benchmark_out_format=json",
|
|
"group": "test"
|
|
},
|
|
{
|
|
"label": "bench: compare baseline vs graph rerank",
|
|
"type": "shell",
|
|
"command": "python3 - <<'PY'\nimport json\nfrom pathlib import Path\n\ndef load(path):\n p = Path(path)\n if not p.exists():\n raise SystemExit(f'missing file: {p}')\n data = json.loads(p.read_text())\n out = {}\n for b in data.get('benchmarks', []):\n name = b.get('name', '')\n if name.startswith('BM_RetrievalService_Search_') and b.get('run_type') == 'aggregate':\n agg = b.get('aggregate_name')\n if agg in ('mean', 'median'):\n out[(name, agg)] = b.get('real_time', 0.0)\n return out\n\nb = load('bench_results/search_latency_baseline.json')\ng = load('bench_results/search_latency_graph_rerank.json')\nprint('Search latency comparison (microseconds, lower is better):')\nfor key in sorted(set(b) | set(g)):\n bv = b.get(key)\n gv = g.get(key)\n if bv is None or gv is None:\n print(f'{key}: baseline={bv} graph_rerank={gv}')\n continue\n delta = gv - bv\n pct = (delta / bv * 100.0) if bv else 0.0\n print(f'{key[0]} [{key[1]}]: baseline={bv:.1f} graph_rerank={gv:.1f} delta={delta:.1f} ({pct:+.2f}%)')\nPY",
|
|
"group": "test"
|
|
}
|
|
]
|
|
} |