aicx 0.9.2

Operator CLI + MCP server: canonical corpus first, optional semantic index second (Claude Code, Codex, Gemini)
Documentation
name: Merge Queue Gate

# Pre-merge gate for the GitHub merge queue.
# Triggered on `merge_group` events: queue puts a temporary ref like
# `refs/heads/gh-readonly-queue/main/pr-<N>-<sha>` and waits for required
# status contexts on this gate to pass before merging the queued PR into
# main.
#
# Per platform (dragon-macos | ops-linux | windows) on our 3 self-hosted
# runners:
#   1. Build the release bundle (real artifacts, single platform per job)
#   2. Dry-run npm publish for the matching platform-package
#
# Heavy GPG signing, Apple notarize, and the final `gh release create`
# stay in release.yml (tag push trigger). The queue gate verifies the
# bundle path + npm metadata stay shippable — fail fast on packaging
# drift before the post-merge tag-driven release pipeline fires.

on:
  merge_group:
    types: [ checks_requested ]

permissions:
  contents: read

concurrency:
  group: merge-queue-gate-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  cargo-check:
    name: cargo check (workspace)
    runs-on: [ self-hosted, ops-linux ]
    steps:
      - uses: actions/checkout@v6
      - name: Cargo check --locked --workspace
        run: cargo check --locked --workspace --all-targets

  bundle-and-dryrun-publish:
    name: Bundle + dry-run publish (${{ matrix.platform }})
    needs: cargo-check
    runs-on: ${{ matrix.runs_on }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - platform: darwin-arm64
            runs_on: [ self-hosted, dragon-macos ]
            npm_package_dir: distribution/npm/aicx/platform-packages/darwin-arm64
          - platform: linux-x64-gnu
            runs_on: [ self-hosted, ops-linux ]
            npm_package_dir: distribution/npm/aicx/platform-packages/linux-x64-gnu
          - platform: win32-x64-gnu
            runs_on: [ self-hosted, windows ]
            npm_package_dir: distribution/npm/aicx/platform-packages/win32-x64-gnu
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0

      - uses: actions/setup-node@v6
        with:
          node-version: 24.11.1
          registry-url: "https://registry.npmjs.org"

      - name: Resolve workspace version
        id: meta
        shell: bash
        run: |
          version=$(grep '^version' Cargo.toml | head -1 | cut -d '"' -f 2)
          echo "version=${version}" >> "${GITHUB_OUTPUT}"

      - name: Release channel version consistency
        shell: bash
        run: bash tools/release-channel-check.sh

      - name: Sync npm package versions
        shell: bash
        run: node distribution/npm/sync-version.mjs "${{ steps.meta.outputs.version }}"

      - name: Build release bundle (real, per platform)
        shell: bash
        env:
          AICX_RELEASE_BUNDLE_ONLY_BINARIES: "1"
          # Merge queue gate runs without access to org secrets/vars. Skip
          # GPG signing here — real signing happens in release.yml on tag push.
          AICX_RELEASE_SKIP_SIGNING: "1"
          LOCTREE_GPG_KEY_ID: ""
        run: bash tools/release_bundle.sh

      - name: npm publish --dry-run (wrapper package metadata)
        if: matrix.platform == 'linux-x64-gnu'
        working-directory: distribution/npm/aicx
        shell: bash
        run: npm publish --dry-run --access public

      - name: npm publish --dry-run (platform package ${{ matrix.platform }})
        working-directory: ${{ matrix.npm_package_dir }}
        shell: bash
        run: npm publish --dry-run --access public

      - name: Summary
        shell: bash
        run: |
          echo "Merge queue gate passed for ${{ matrix.platform }}:"
          echo "  - cargo workspace check ✓ (linux job)"
          echo "  - release channel version sync ✓"
          echo "  - release bundle build ✓"
          echo "  - npm publish --dry-run (platform) ✓"
          echo "  - npm publish --dry-run (wrapper) ✓ (linux job only)"