diff --git a/.claude/hooks/bash-guard.sh b/.claude/hooks/bash-guard.sh index b7f23e502..97f5aa093 100755 --- a/.claude/hooks/bash-guard.sh +++ b/.claude/hooks/bash-guard.sh @@ -24,6 +24,10 @@ case "$FIRST_CMD" in echo "BLOCKED: Use the Read tool instead of \`$FIRST_CMD\`. Read provides line numbers and supports images/PDFs." >&2 exit 2 ;; + awk) + echo "BLOCKED: Use the Grep tool or Read tool instead of \`awk\`." >&2 + exit 2 + ;; sed) if echo "$COMMAND" | grep -qE '(^|[[:space:]])sed[[:space:]]+-i'; then echo "BLOCKED: Use the Edit tool instead of \`sed -i\`. Edit tracks changes properly." >&2 diff --git a/.claude/hooks/post-compact.sh b/.claude/hooks/post-compact.sh index 63093264e..265ebb899 100755 --- a/.claude/hooks/post-compact.sh +++ b/.claude/hooks/post-compact.sh @@ -40,10 +40,8 @@ STATE="${STATE}- libcst for code transforms, ast for read-only analysis\n" [ -z "$STATE" ] && exit 0 -cat </dev/null | [ -z "$FILE_PATH" ] && exit 0 -echo "$FILE_PATH" >> "$CLAUDE_PROJECT_DIR/.claude/.read-tracker" +TRACKER="$CLAUDE_PROJECT_DIR/.claude/.read-tracker" +grep -qxF "$FILE_PATH" "$TRACKER" 2>/dev/null || echo "$FILE_PATH" >> "$TRACKER" exit 0 diff --git a/.claude/settings.json b/.claude/settings.json index 19393f96c..771760ec4 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -42,16 +42,6 @@ "timeout": 5 } ] - }, - { - "matcher": "Edit", - "hooks": [ - { - "type": "command", - "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/require-read.sh", - "timeout": 5 - } - ] } ], "PostToolUse": [ @@ -92,5 +82,8 @@ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/status-line.sh" }, - "enableAllProjectMcpServers": true + "enableAllProjectMcpServers": true, + "env": { + "ENABLE_LSP_TOOL": "1" + } } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c5248145..57b1c220d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,6 +36,7 @@ jobs: env: PR_BODY: ${{ github.event.pull_request.body }} PR_AUTHOR: ${{ github.event.pull_request.user.login }} + AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }} run: | # Skip for bots (dependabot, renovate, github-actions) if [[ "$PR_AUTHOR" == *"[bot]"* || "$PR_AUTHOR" == "dependabot" ]]; then @@ -43,6 +44,12 @@ jobs: exit 0 fi + # Skip for org members + if [[ "$AUTHOR_ASSOCIATION" == "MEMBER" ]]; then + echo "Org member ($PR_AUTHOR) — skipping linked issue check." + exit 0 + fi + if [ -z "$PR_BODY" ]; then echo "::error::PR body is empty. Every PR must link an issue or discussion." echo "Use 'Closes #', 'Fixes #', 'Relates to #', or include a discussion URL." @@ -185,7 +192,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: ${{ matrix.python-version }} enable-cache: true @@ -218,7 +225,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: "3.13" enable-cache: true @@ -234,7 +241,7 @@ jobs: - name: Upload coverage report if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: coverage-report path: coverage.xml @@ -254,7 +261,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true @@ -281,7 +288,7 @@ jobs: with: ref: ${{ github.head_ref }} fetch-depth: 0 - - uses: astral-sh/setup-uv@v8.0.0 + - uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true @@ -315,6 +322,7 @@ jobs: if: >- needs.determine-changes.outputs.e2e == 'true' && github.event_name != 'push' + && github.actor != 'dependabot[bot]' strategy: fail-fast: false matrix: @@ -374,7 +382,7 @@ jobs: pr_state: ${{ github.event.pull_request.state }} - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: 3.11.6 enable-cache: true @@ -418,6 +426,7 @@ jobs: if: >- needs.determine-changes.outputs.e2e_js == 'true' && github.event_name != 'push' + && github.actor != 'dependabot[bot]' strategy: fail-fast: false matrix: @@ -430,10 +439,12 @@ jobs: script: end_to_end_test_js_esm_async.py js_project_dir: code_to_optimize/js/code_to_optimize_js_esm expected_improvement: 10 + allow_failure: true - name: js-ts-class script: end_to_end_test_js_ts_class.py js_project_dir: code_to_optimize/js/code_to_optimize_ts expected_improvement: 30 + continue-on-error: ${{ matrix.allow_failure || false }} environment: ${{ ((github.event_name == 'workflow_dispatch' && github.actor != 'misrasaurabh1' && github.actor != 'KRRT7') || (contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && github.event.pull_request.user.login != 'misrasaurabh1' && github.event.pull_request.user.login != 'KRRT7')) && 'external-trusted-contributors' || '' }} runs-on: ubuntu-latest env: @@ -482,7 +493,7 @@ jobs: npm install - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: 3.11.6 enable-cache: true @@ -499,6 +510,7 @@ jobs: if: >- needs.determine-changes.outputs.e2e_java == 'true' && github.event_name != 'push' + && github.actor != 'dependabot[bot]' strategy: fail-fast: false matrix: @@ -551,7 +563,7 @@ jobs: cache: maven - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: 3.11.6 enable-cache: true @@ -561,7 +573,7 @@ jobs: - name: Cache codeflash-runtime JAR id: runtime-jar-cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.m2/repository/io/codeflash key: codeflash-runtime-${{ hashFiles('codeflash-java-runtime/pom.xml', 'codeflash-java-runtime/src/**') }} diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index c012a94d1..b804f4cd8 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -57,7 +57,7 @@ jobs: ref: ${{ github.event.pull_request.head.ref || github.ref }} - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true @@ -319,7 +319,7 @@ jobs: ref: ${{ steps.pr-ref.outputs.ref }} - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true diff --git a/.github/workflows/codeflash-optimize.yaml b/.github/workflows/codeflash-optimize.yaml index ab08aa1f8..4eb4e4f1c 100644 --- a/.github/workflows/codeflash-optimize.yaml +++ b/.github/workflows/codeflash-optimize.yaml @@ -31,7 +31,7 @@ jobs: fetch-depth: 0 - name: 🐍 Set up Python 3.11 for CLI - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: 3.11.6 enable-cache: true diff --git a/.github/workflows/java-e2e.yaml b/.github/workflows/java-e2e.yaml index 0bfc979b6..1fcf50461 100644 --- a/.github/workflows/java-e2e.yaml +++ b/.github/workflows/java-e2e.yaml @@ -41,7 +41,7 @@ jobs: cache: maven - name: Install uv - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: python-version: 3.11.6 enable-cache: true @@ -51,7 +51,7 @@ jobs: - name: Cache codeflash-runtime JAR id: runtime-jar-cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.m2/repository/io/codeflash key: codeflash-runtime-${{ hashFiles('codeflash-java-runtime/pom.xml', 'codeflash-java-runtime/src/**') }} diff --git a/.github/workflows/label-workflow-changes.yml b/.github/workflows/label-workflow-changes.yml index 3bc8d6c54..72f886318 100644 --- a/.github/workflows/label-workflow-changes.yml +++ b/.github/workflows/label-workflow-changes.yml @@ -13,7 +13,7 @@ jobs: pull-requests: write steps: - name: Label PR with workflow changes - uses: actions/github-script@v7 + uses: actions/github-script@v9 with: script: | const labelName = 'workflow-modified'; diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f2b6a3ccd..5b2c32981 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -110,7 +110,7 @@ jobs: - name: Install uv if: steps.should_run.outputs.run == 'true' && steps.check_tag.outputs.exists == 'false' - uses: astral-sh/setup-uv@v8.0.0 + uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true @@ -124,7 +124,7 @@ jobs: - name: Create GitHub Release if: steps.should_run.outputs.run == 'true' && steps.check_tag.outputs.exists == 'false' - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: tag_name: ${{ steps.extract_version.outputs.tag }} name: ${{ matrix.release_name_prefix }} ${{ steps.extract_version.outputs.tag }}