name: feishu-replay-gate on: pull_request: paths: - "backend/app/services/feishu_integration.py" - "backend/app/services/feishu_signal_pipeline.py" - "backend/app/services/llm.py" - "backend/app/services/signal_capture.py" - "backend/app/models/feishu_item.py" - "backend/app/models/feishu_reply_outbox.py" - "backend/app/main.py" - "backend/evals/feishu_replay_eval.py" - "backend/evals/golden_feishu_replay_v1.jsonl" - ".openclaw/pmflow-routing-rules.json" - "backend/.openclaw/pmflow-routing-rules.json" - "scripts/openclaw_routing_lint.py" - ".github/workflows/feishu-replay-gate.yml" push: branches: [ main, master ] paths: - "backend/evals/feishu_replay_eval.py" - "backend/evals/golden_feishu_replay_v1.jsonl" - ".openclaw/pmflow-routing-rules.json" - "backend/.openclaw/pmflow-routing-rules.json" - "scripts/openclaw_routing_lint.py" - ".github/workflows/feishu-replay-gate.yml" jobs: feishu-replay: runs-on: ubuntu-latest services: postgres: image: postgres:16 env: POSTGRES_USER: pmflow POSTGRES_PASSWORD: pmflow_pass POSTGRES_DB: pmflow ports: - 5432:5432 options: >- --health-cmd "pg_isready -U pmflow -d pmflow" --health-interval 5s --health-timeout 5s --health-retries 20 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install deps run: | python -m pip install --upgrade pip python -m pip install -r backend/requirements.txt - name: Lint replay dataset env: PYTHONPATH: backend DATABASE_URL: postgresql+asyncpg://pmflow:pmflow_pass@127.0.0.1:5432/pmflow PMFLOW_EXPECTED_DB_DIALECT: postgresql run: | python backend/evals/feishu_replay_eval.py \ --lint-only \ --input backend/evals/golden_feishu_replay_v1.jsonl - name: Lint OpenClaw routing rules run: | python scripts/openclaw_routing_lint.py --input .openclaw/pmflow-routing-rules.json python scripts/openclaw_routing_lint.py --input backend/.openclaw/pmflow-routing-rules.json - name: Run replay eval env: PYTHONPATH: backend DATABASE_URL: postgresql+asyncpg://pmflow:pmflow_pass@127.0.0.1:5432/pmflow PMFLOW_EXPECTED_DB_DIALECT: postgresql run: | cd backend alembic upgrade head cd .. python backend/evals/feishu_replay_eval.py \ --strict \ --tenant-id 9901 \ --input backend/evals/golden_feishu_replay_v1.jsonl \ --output-dir backend/evals/reports - name: Upload replay report uses: actions/upload-artifact@v4 with: name: feishu-replay-report path: backend/evals/reports/feishu_replay_*.json