feat(replay-vision): API validation + lens_result row column #53756
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: Agent Skills | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'products/*/skills/**' | |
| - 'products/posthog_ai/scripts/**' | |
| - '.github/workflows/ci-agent-skills.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| name: Determine need to run skill checks | |
| outputs: | |
| skills: ${{ steps.filter.outputs.skills || 'true' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | |
| id: app-token | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| with: | |
| client-id: ${{ secrets.GH_APP_POSTHOG_PATHS_FILTER_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_POSTHOG_PATHS_FILTER_PRIVATE_KEY }} | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: filter | |
| if: github.event_name != 'push' | |
| with: | |
| token: ${{ steps.app-token.outputs.token || github.token }} | |
| filters: | | |
| skills: | |
| - 'products/*/skills/**' | |
| - 'products/*/backend/max_tools.py' | |
| - 'products/posthog_ai/**' | |
| - '.github/workflows/ci-agent-skills.yml' | |
| check-skills: | |
| name: Check agent skills | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: changes | |
| if: needs.changes.outputs.skills == 'true' | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Start Docker services | |
| env: | |
| COMPOSE_FILE: docker-compose.dev.yml:docker-compose.profiles.yml | |
| run: | | |
| bin/ci-wait-for-docker launch --down | |
| - name: Set up Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version-file: 'pyproject.toml' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 | |
| with: | |
| version: '0.10.2' # pinned: unpinned setup-uv calls GH API on every job, exhausts rate limit | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| save-cache: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Install python dependencies | |
| run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e | |
| with: | |
| toolchain: stable | |
| components: cargo | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| shared-key: 'v2-rust-skills' | |
| workspaces: rust | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Install sqlx-cli | |
| run: cargo install sqlx-cli --version 0.8.0 --features postgres --no-default-features --locked | |
| - name: Lint skills | |
| run: ./bin/hogli lint:skills | |
| - name: Wait for Docker services | |
| env: | |
| COMPOSE_FILE: docker-compose.dev.yml:docker-compose.profiles.yml | |
| run: bin/ci-wait-for-docker wait | |
| - name: Run migrations and create test data | |
| env: | |
| SECRET_KEY: '6b01eee4f945ca25045b5aab440b953461faf08693a9abbf1166dc7c6b9772da' | |
| DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/posthog' | |
| REDIS_URL: 'redis://localhost' | |
| OBJECT_STORAGE_ENABLED: 'False' | |
| TEST: 1 | |
| DEBUG: 1 | |
| run: | | |
| DATABASE_URL="postgres://posthog:posthog@localhost:5432/posthog_persons" \ | |
| sqlx database create | |
| DATABASE_URL="postgres://posthog:posthog@localhost:5432/posthog_persons" \ | |
| sqlx migrate run --source rust/persons_migrations/ | |
| python manage.py migrate --noinput | |
| python manage.py setup_dev --no-data | |
| - name: Build skills | |
| env: | |
| SECRET_KEY: '6b01eee4f945ca25045b5aab440b953461faf08693a9abbf1166dc7c6b9772da' | |
| DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/posthog' | |
| REDIS_URL: 'redis://localhost' | |
| OBJECT_STORAGE_ENABLED: 'False' | |
| TEST: 1 | |
| DEBUG: 1 | |
| run: ./bin/hogli build:skills | |
| release-skills: | |
| name: Release agent skills | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: check-skills | |
| if: github.ref == 'refs/heads/master' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Start Docker services | |
| env: | |
| COMPOSE_FILE: docker-compose.dev.yml:docker-compose.profiles.yml | |
| run: | | |
| bin/ci-wait-for-docker launch --down | |
| - name: Set up Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version-file: 'pyproject.toml' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 | |
| with: | |
| version: '0.10.2' # pinned: unpinned setup-uv calls GH API on every job, exhausts rate limit | |
| enable-cache: true | |
| cache-dependency-glob: uv.lock | |
| save-cache: false | |
| - name: Install python dependencies | |
| run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e | |
| with: | |
| toolchain: stable | |
| components: cargo | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| shared-key: 'v2-rust-skills' | |
| workspaces: rust | |
| save-if: false | |
| - name: Install sqlx-cli | |
| run: cargo install sqlx-cli --version 0.8.0 --features postgres --no-default-features --locked | |
| - name: Wait for Docker services | |
| env: | |
| COMPOSE_FILE: docker-compose.dev.yml:docker-compose.profiles.yml | |
| run: bin/ci-wait-for-docker wait | |
| - name: Run migrations and create test data | |
| env: | |
| SECRET_KEY: '6b01eee4f945ca25045b5aab440b953461faf08693a9abbf1166dc7c6b9772da' | |
| DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/posthog' | |
| REDIS_URL: 'redis://localhost' | |
| OBJECT_STORAGE_ENABLED: 'False' | |
| TEST: 1 | |
| DEBUG: 1 | |
| run: | | |
| DATABASE_URL="postgres://posthog:posthog@localhost:5432/posthog_persons" \ | |
| sqlx database create | |
| DATABASE_URL="postgres://posthog:posthog@localhost:5432/posthog_persons" \ | |
| sqlx migrate run --source rust/persons_migrations/ | |
| python manage.py migrate --noinput | |
| python manage.py setup_dev --no-data | |
| - name: Build skills ZIP | |
| env: | |
| SECRET_KEY: '6b01eee4f945ca25045b5aab440b953461faf08693a9abbf1166dc7c6b9772da' | |
| DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/posthog' | |
| REDIS_URL: 'redis://localhost' | |
| OBJECT_STORAGE_ENABLED: 'False' | |
| TEST: 1 | |
| DEBUG: 1 | |
| run: ./bin/hogli build:skills | |
| - name: Determine next version | |
| id: version | |
| run: | | |
| git fetch --tags --force | |
| LATEST_TAG=$(git tag -l 'agent-skills-v*' | grep -E '^agent-skills-v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1) | |
| if [ -z "$LATEST_TAG" ]; then LATEST_TAG="agent-skills-v0.0.0"; fi | |
| MINOR=$(echo "${LATEST_TAG#agent-skills-v}" | cut -d. -f2) | |
| echo "tag=agent-skills-v0.$((MINOR + 1)).0" >> "$GITHUB_OUTPUT" | |
| - name: Create versioned release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| RELEASE_TAG: ${{ steps.version.outputs.tag }} | |
| run: | | |
| gh release create "$RELEASE_TAG" \ | |
| products/posthog_ai/dist/skills.zip \ | |
| --title "Agent skills $RELEASE_TAG" \ | |
| --notes "Build from ${{ github.sha }}" \ | |
| --target "${{ github.sha }}" \ | |
| --latest=false | |
| - name: Update latest release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| RELEASE_TAG: ${{ steps.version.outputs.tag }} | |
| run: | | |
| if gh release view agent-skills-latest &>/dev/null; then | |
| gh release upload agent-skills-latest \ | |
| products/posthog_ai/dist/skills.zip --clobber | |
| gh release edit agent-skills-latest \ | |
| --notes "Latest build — same as $RELEASE_TAG" | |
| else | |
| gh release create agent-skills-latest \ | |
| products/posthog_ai/dist/skills.zip \ | |
| --title "Agent skills (Latest)" \ | |
| --notes "Latest build — same as $RELEASE_TAG" \ | |
| --target "${{ github.sha }}" \ | |
| --latest=false | |
| fi |