[fastcache] Fix parameter pruning for dead-static-branch and swapped-slot forwarding #2113
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: Check line wrapping | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-wrapping: | |
| name: Check line wrapping | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Wait using dead-reckoning for builds to finish, before running, to save AI cost, if someone pushes many commits in a row | |
| run: sleep 1800 | |
| - name: Get diff of changed files | |
| id: changed | |
| run: | | |
| git diff origin/${{ github.base_ref }}...HEAD \ | |
| -- '*.md' '*.py' '*.cpp' '*.h' '*.hpp' '*.c' '*.cc' \ | |
| > /tmp/pr_diff.patch | |
| if [ ! -s /tmp/pr_diff.patch ]; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| echo "No relevant files changed." | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| echo "Diff written ($(wc -l < /tmp/pr_diff.patch) lines)" | |
| fi | |
| - name: Install Cursor CLI | |
| if: steps.changed.outputs.skip != 'true' | |
| run: | | |
| curl https://cursor.com/install -fsS | bash | |
| echo "$HOME/.cursor/bin" >> $GITHUB_PATH | |
| - name: Check wrapping with Cursor agent | |
| if: steps.changed.outputs.skip != 'true' | |
| env: | |
| CURSOR_API_KEY: ${{ secrets.CURSOR_KEY_HUGH }} | |
| run: | | |
| RESULT=$(agent -p "$(cat <<'PROMPT' | |
| The file /tmp/pr_diff.patch contains a unified diff of changes in this PR. Check ONLY the added lines (lines starting with +, excluding the +++ header) for wrapping issues: | |
| - In .md files, lines should not be wrapped at all | |
| - In code comments and docstrings, lines should be wrapped at 120 characters, NOT at 80 | |
| Use the @@ hunk headers and +++ file headers to determine file paths and line numbers. | |
| Do NOT flag pre-existing code. Do NOT modify any files. | |
| Be precise: only flag clear violations, not borderline cases. | |
| Stop after finding 3 violations. | |
| If there are NO violations, your final output must start with the word PASS. | |
| If there ARE violations, your final output must start with the word FAIL, followed by a list of violations (up to 3) in the format: <filepath>:<line_number>: <brief description> | |
| PROMPT | |
| )" --model claude-4.6-opus-high-thinking --mode ask --output-format text --trust) | |
| echo "$RESULT" | |
| if echo "$RESULT" | grep -q "^FAIL"; then | |
| exit 1 | |
| fi |