fix: reject non-finite Smart Swarm offsets in runtime assignment #32
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: PR Validation | |
| on: | |
| pull_request: | |
| branches: [main, main-candidate] | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| quality-gates: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| cache: pip | |
| cache-dependency-path: requirements.txt | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| python -m pip install pytest pytest-asyncio pytest-cov pytest-mock pytest-timeout hypothesis | |
| - name: Validate generated contracts | |
| run: | | |
| python3 tools/generate_mds_env_reference.py --check | |
| python3 tools/generate_simurgh_tool_candidates.py --check | |
| python3 tools/generate_simurgh_docs_index.py --check | |
| python3 tools/audit_mds_env_registry.py | |
| - name: Run Simurgh and validation safety tests | |
| run: | | |
| pytest \ | |
| tests/test_agent_action_intent.py \ | |
| tests/test_agent_assistant_evals.py \ | |
| tests/test_agent_assistant_runtime.py \ | |
| tests/test_agent_action_planner.py \ | |
| tests/test_agent_provider_smoke.py \ | |
| tests/test_agent_query_understanding.py \ | |
| tests/test_agent_registry_planner_coverage.py \ | |
| tests/test_agent_turn_intent.py \ | |
| tests/test_api_route_inventory.py \ | |
| tests/test_env_registry.py \ | |
| tests/test_gcs_simurgh_assistant.py \ | |
| tests/test_gcs_simurgh_mcp.py \ | |
| tests/test_gcs_simurgh_routes.py \ | |
| tests/test_gcs_sitl_control_routes.py \ | |
| tests/test_mds_auth.py \ | |
| tests/test_mds_logging/test_log_proxy.py \ | |
| tests/test_node_boot_status_routes.py \ | |
| tests/test_run_sitl_validation_suite.py \ | |
| tests/test_runtime_validation_support.py \ | |
| tests/test_simurgh_dashboard_prompt_evals.py \ | |
| tests/test_simurgh_action_runs.py \ | |
| tests/test_simurgh_mcp_smoke_client.py \ | |
| tests/test_simurgh_retrieval_quality.py \ | |
| tests/test_simurgh_tool_candidate_generator.py \ | |
| tests/test_sitl_control_service.py \ | |
| tests/test_sitl_control_client.py | |
| python3 tools/run_simurgh_dashboard_prompt_evals.py | |
| python3 tools/run_simurgh_provider_smoke.py --expected-runtime-mode sitl --json | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| cache-dependency-path: app/dashboard/drone-dashboard/package-lock.json | |
| - name: Validate dashboard | |
| working-directory: app/dashboard/drone-dashboard | |
| run: | | |
| npm ci | |
| CI=true npm test -- --runInBand --watchAll=false --runTestsByPath \ | |
| src/pages/SimurghOperatorPage.test.js \ | |
| src/components/logs/OnboardUlogDialog.test.js \ | |
| src/services/gcsApiService.test.js \ | |
| src/config/routeDocs.test.js \ | |
| src/components/SidebarMenu.test.js \ | |
| src/App.test.js | |
| npm run build | |
| validate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| pip install gitpython | |
| - name: Validate commit messages | |
| id: validate_commits | |
| run: | | |
| python3 tools/validate_commits.py | |
| continue-on-error: true | |
| - name: Predict next version | |
| id: predict_version | |
| run: | | |
| CURRENT_VERSION=$(cat VERSION) | |
| PREDICTED_VERSION=$(python3 tools/bump_version.py --dry-run --type auto) | |
| { | |
| echo "current=$CURRENT_VERSION" | |
| echo "predicted=$PREDICTED_VERSION" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Comment on PR | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const currentVersion = '${{ steps.predict_version.outputs.current }}'; | |
| const predictedVersion = '${{ steps.predict_version.outputs.predicted }}'; | |
| const validateStatus = '${{ steps.validate_commits.outcome }}'; | |
| const statusIcon = validateStatus === 'success' ? '✅' : '⚠️'; | |
| const versionChange = currentVersion !== predictedVersion ? | |
| '**' + currentVersion + '** → **' + predictedVersion + '**' : | |
| '**' + currentVersion + '** (no change)'; | |
| const body = '## ' + statusIcon + ' PR Validation\n\n' + | |
| '### 📦 Version Impact\n' + | |
| '- Current: **' + currentVersion + '**\n' + | |
| '- After merge: ' + versionChange + '\n\n' + | |
| '### 📋 Commit Message Guidelines\n' + | |
| 'Use [Conventional Commits](https://www.conventionalcommits.org/):\n' + | |
| '- `feat:` - New feature (bumps minor version)\n' + | |
| '- `fix:` - Bug fix (bumps minor version)\n' + | |
| '- `docs:` - Documentation only (no version bump)\n' + | |
| '- `chore:` - Maintenance (no version bump)\n' + | |
| '- `BREAKING CHANGE:` - Breaking change (bumps major version)\n\n' + | |
| '**Examples:**\n' + | |
| '```\n' + | |
| 'feat: add new trajectory smoother\n' + | |
| 'fix: resolve modal centering issue\n' + | |
| 'docs: update installation guide\n' + | |
| 'chore: cleanup deprecated files\n' + | |
| '```\n\n' + | |
| '### 🤖 Automation\n' + | |
| 'Merges to `main` run release quality gates. A maintainer explicitly publishes stable or beta releases after those gates pass.\n\n' + | |
| '---\n' + | |
| '*Generated by [Automated Release](https://github.com/${{ github.repository }}/actions/workflows/release.yml)*'; | |
| // Find existing comment | |
| const { data: comments } = await github.rest.issues.listComments({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| }); | |
| const botComment = comments.find(comment => | |
| comment.user.type === 'Bot' && | |
| comment.body.includes('PR Validation') | |
| ); | |
| if (botComment) { | |
| // Update existing comment | |
| await github.rest.issues.updateComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: botComment.id, | |
| body: body | |
| }); | |
| } else { | |
| // Create new comment | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: body | |
| }); | |
| } |