Skip to content

merge: reconcile upstream through 5171a6aa #76

merge: reconcile upstream through 5171a6aa

merge: reconcile upstream through 5171a6aa #76

name: Daemon installation lifecycle
on:
pull_request:
branches: [fork/consolidated]
paths:
- 'src/mcp/**'
- 'src/runtime-control.ts'
- 'src/index.ts'
- 'src/extraction/**'
- 'src/codegraph.ts'
- 'codegraph-kernel/**'
- '__tests__/daemon-*.test.ts'
- '__tests__/mcp-*.test.ts'
- '__tests__/writer-lock.test.ts'
- '__tests__/runtime-control.test.ts'
- '__tests__/fixtures/runtime-control-daemon.cjs'
- '__tests__/writer-handover-ordering.test.ts'
- '__tests__/fixtures/writer-lock-ordering.cjs'
- '__tests__/query-pool.test.ts'
- '__tests__/status-index-health.test.ts'
- '__tests__/fixtures/older-daemon.cjs'
- '.github/workflows/daemon-lifecycle.yml'
permissions:
contents: read
jobs:
lifecycle:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 25
env:
CARGO_BUILD_JOBS: 2
CARGO_PROFILE_RELEASE_DEBUG: 0
steps:
- name: Check out the tested commit
shell: bash
run: |
git init .
git config core.autocrlf false
git remote add origin "https://github.com/$GITHUB_REPOSITORY.git"
git fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- name: Use the runner's Node 24 installation
shell: pwsh
run: |
$versions = Get-ChildItem "$env:RUNNER_TOOL_CACHE/node" -Directory
$version = $versions | Where-Object Name -like '24.*' | Sort-Object { [version]$_.Name } -Descending | Select-Object -First 1
if (!$version) { throw 'Node 24 is missing from the runner tool cache' }
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
$nodeDir = Join-Path $version.FullName $arch
if (!$IsWindows) { $nodeDir = Join-Path $nodeDir 'bin' }
$nodeExe = if ($IsWindows) { 'node.exe' } else { 'node' }
if (!(Test-Path (Join-Path $nodeDir $nodeExe))) { throw 'Node 24 executable is missing' }
Add-Content $env:GITHUB_PATH $nodeDir
- run: node -e "if (process.versions.node.split('.')[0] !== '24') process.exit(1)"
- run: npm ci --ignore-scripts
- run: npm run build:kernel
- run: npm run build
- run: npx vitest run __tests__/runtime-control.test.ts __tests__/daemon-install-check.test.ts __tests__/daemon-older-version.test.ts __tests__/cli-version.test.ts __tests__/daemon-registry.test.ts __tests__/daemon-pid-reuse.test.ts __tests__/daemon-lock-refresh.test.ts __tests__/mcp-daemon.test.ts __tests__/daemon-client-liveness.test.ts __tests__/daemon-bind-failure.test.ts __tests__/daemon-socket-fallback.test.ts __tests__/daemon-rendezvous-case.test.ts __tests__/writer-lock.test.ts __tests__/writer-handover-ordering.test.ts __tests__/mcp-writer-lock.test.ts __tests__/mcp-projectpath-lifecycle.test.ts __tests__/query-pool.test.ts __tests__/status-index-health.test.ts __tests__/vbnet-project-ties.test.ts __tests__/vbnet-receiver-types.test.ts __tests__/upstream-native-scope-regressions.test.ts --maxWorkers=${{ runner.os == 'Windows' && '1' || '2' }} --minWorkers=1