fix(mcp): label untitled session listings #406
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci-packaging | |
| # Dry-run the PyPI wheel build on PRs that touch packaging paths. Guards | |
| # the scripts introduced by #223 against regressions. See RFC #219 and | |
| # issue #224. | |
| # | |
| # Runs on every PR (so branch protection can list it as a required | |
| # check) but only does the expensive Rust + wheel build when packaging | |
| # paths changed. The filter is evaluated inside the job via | |
| # dorny/paths-filter@v3, mirroring the pattern used by ci-pr-fast.yml. | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| packaging-dryrun: | |
| name: packaging-dryrun | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| DRYRUN_TARGET: x86_64-unknown-linux-gnu | |
| DRYRUN_VERSION: 0.0.0.dev0 | |
| # manylinux_2_28 — AlmaLinux 8 / glibc 2.28 floor. See issue #246 | |
| # for why this is NOT manylinux_2_17 even though the build runner | |
| # itself is Ubuntu 24.04. The cargo step wraps inside the pypa | |
| # manylinux image so the resulting binary honours the tag. | |
| DRYRUN_WHEEL_PLATFORM: manylinux_2_28_x86_64 | |
| DRYRUN_CARGO_CONTAINER: quay.io/pypa/manylinux_2_28_x86_64 | |
| # PEP 427 normalization: `moraine-cli` → `moraine_cli` in wheel + | |
| # sdist filenames. See scripts/build-python-wheels.py. | |
| DRYRUN_DIST_NAME: moraine_cli | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Detect packaging-path changes | |
| id: filter | |
| if: github.event_name == 'pull_request' | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| packaging: | |
| - '.github/workflows/release-moraine.yml' | |
| - '.github/workflows/ci-packaging.yml' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'apps/moraine/**' | |
| - 'apps/moraine-ingest/**' | |
| - 'apps/moraine-mcp/**' | |
| - 'apps/moraine-monitor/**' | |
| - 'crates/moraine-clickhouse/**' | |
| - 'crates/moraine-config/**' | |
| - 'crates/moraine-conversations/**' | |
| - 'crates/moraine-mcp-core/**' | |
| - 'crates/moraine-monitor-core/**' | |
| - 'config/moraine.toml' | |
| - 'web/monitor/**' | |
| - 'bindings/python/moraine-cli/**' | |
| - 'scripts/build-python-wheels.py' | |
| - 'scripts/build-python-sdist.py' | |
| - 'scripts/package-moraine-release.sh' | |
| - 'scripts/ci/assert-release-targets.py' | |
| - 'scripts/install.sh' | |
| - 'scripts/ci/assert-wheel-layout.sh' | |
| - 'scripts/ci/e2e-install-artifact.sh' | |
| - 'scripts/ci/e2e-stack.sh' | |
| - 'scripts/ci/mcp_smoke.py' | |
| - name: Assert release target coverage | |
| run: python3 scripts/ci/assert-release-targets.py | |
| - name: Skip when no packaging changes | |
| if: github.event_name == 'pull_request' && steps.filter.outputs.packaging != 'true' | |
| run: echo "No packaging-path changes detected; skipping dry-run wheel build." | |
| - name: Install Rust toolchain | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ env.DRYRUN_TARGET }} | |
| - name: Install Bun | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Setup Python | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache Rust artifacts | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build host bundle | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| env: | |
| MORAINE_CARGO_CONTAINER: ${{ env.DRYRUN_CARGO_CONTAINER }} | |
| run: scripts/package-moraine-release.sh "$DRYRUN_TARGET" dist | |
| - name: Build Python wheel + stub sdist | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| run: | | |
| mkdir -p dist/wheels | |
| python3 scripts/build-python-wheels.py \ | |
| --target "$DRYRUN_TARGET" \ | |
| --bundle "dist/moraine-bundle-$DRYRUN_TARGET.tar.gz" \ | |
| --out-dir dist/wheels \ | |
| --version "$DRYRUN_VERSION" | |
| python3 scripts/build-python-sdist.py \ | |
| --out-dir dist/wheels \ | |
| --version "$DRYRUN_VERSION" | |
| - name: Assert wheel layout | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| run: bash scripts/ci/assert-wheel-layout.sh "dist/wheels/$DRYRUN_DIST_NAME-$DRYRUN_VERSION-py3-none-$DRYRUN_WHEEL_PLATFORM.whl" | |
| - name: Install wheel + exec moraine --help (console script) | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| run: | | |
| python3 -m venv /tmp/wheel-venv | |
| /tmp/wheel-venv/bin/pip install --quiet "dist/wheels/$DRYRUN_DIST_NAME-$DRYRUN_VERSION-py3-none-$DRYRUN_WHEEL_PLATFORM.whl" | |
| /tmp/wheel-venv/bin/moraine --help | |
| /tmp/wheel-venv/bin/moraine-ingest --help | |
| /tmp/wheel-venv/bin/moraine-monitor --help | |
| /tmp/wheel-venv/bin/moraine-mcp --help | |
| - name: Assert sdist refuses to build | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| run: bash scripts/ci/assert-sdist-refuses.sh "dist/wheels/$DRYRUN_DIST_NAME-$DRYRUN_VERSION.tar.gz" | |
| - name: Verify wheel runs on debian:bookworm (glibc 2.36 regression guard for #246) | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| run: | | |
| # bookworm is where the v0.4.2rc1 glibc regression was caught. | |
| # If a future runner bump leaks symbols past the manylinux_2_28 | |
| # floor, this step fails before we publish. Uses the host's | |
| # pre-built wheel; container only installs uv + runs --help. | |
| wheel_name="$DRYRUN_DIST_NAME-$DRYRUN_VERSION-py3-none-$DRYRUN_WHEEL_PLATFORM.whl" | |
| docker run --rm \ | |
| -v "$PWD/dist/wheels:/wheels:ro" \ | |
| -e WHEEL_NAME="$wheel_name" \ | |
| debian:bookworm-slim bash -c ' | |
| set -euxo pipefail | |
| apt-get update -qq | |
| apt-get install -y --no-install-recommends curl ca-certificates >/dev/null | |
| curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/root/.local/bin sh >/dev/null | |
| export PATH="/root/.local/bin:$PATH" | |
| uv tool install --reinstall --prerelease=allow "/wheels/$WHEEL_NAME" | |
| for bin in moraine moraine-ingest moraine-monitor moraine-mcp; do | |
| "$HOME/.local/bin/$bin" --help >/dev/null | |
| echo " ok: $bin --help" | |
| done | |
| ' | |
| - name: Upload dry-run wheel (artifact) | |
| if: github.event_name != 'pull_request' || steps.filter.outputs.packaging == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: moraine-dryrun-wheel | |
| path: dist/wheels/* | |
| retention-days: 7 |