From 7586804323d3bb6c77378989119654d6aa3e4838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Fri, 30 Jan 2026 15:16:26 +1100 Subject: [PATCH 1/4] fix(ci): preprocess coverage paths before Codecov upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add step to strip /github/workspace/ prefix from coverage XML files before uploading to Codecov. The Unity test runner generates absolute paths from the Docker container, which Codecov cannot match to repo files. The codecov.yml `fixes` section wasn't being applied reliably, so preprocessing the files directly is more robust. Co-Authored-By: Claude Opus 4.5 Signed-off-by: JasonXuDeveloper - 傑 --- .github/workflows/pr-tests.yml | 9 +++++++++ .github/workflows/release.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 06887c3f..2f2e00a8 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -99,6 +99,15 @@ jobs: echo "Coverage directory structure:" find coverage -type f -name "*.xml" 2>/dev/null || echo "No XML files found" + - name: Fix coverage paths + run: | + # Unity test runner generates paths with /github/workspace/ prefix (Docker container path) + # Strip this prefix so Codecov can match paths to repository files + echo "Fixing coverage paths..." + find coverage -name "*.xml" -exec sed -i 's|/github/workspace/||g' {} \; + echo "Path fix complete. Sample paths after fix:" + grep -h "fullPath=" coverage/**/TestCoverageResults*.xml | head -5 || true + - name: Upload coverage to Codecov (util package) uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bfabc6e1..0d70e596 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -181,6 +181,15 @@ jobs: echo "Coverage directory structure:" find coverage -type f -name "*.xml" 2>/dev/null || echo "No XML files found" + - name: Fix coverage paths + run: | + # Unity test runner generates paths with /github/workspace/ prefix (Docker container path) + # Strip this prefix so Codecov can match paths to repository files + echo "Fixing coverage paths..." + find coverage -name "*.xml" -exec sed -i 's|/github/workspace/||g' {} \; + echo "Path fix complete. Sample paths after fix:" + grep -h "fullPath=" coverage/**/TestCoverageResults*.xml | head -5 || true + - name: Upload coverage to Codecov (util package) uses: codecov/codecov-action@v4 with: From 38f00dca3f089422e1fe0f3843d94c4e3d10afb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Fri, 30 Jan 2026 15:22:57 +1100 Subject: [PATCH 2/4] fix(ci): use find instead of glob for debug output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace bash glob pattern with find command for reliable recursive file matching without needing shopt -s globstar. Co-Authored-By: Claude Opus 4.5 Signed-off-by: JasonXuDeveloper - 傑 --- .github/workflows/pr-tests.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 2f2e00a8..f4f85559 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -106,7 +106,7 @@ jobs: echo "Fixing coverage paths..." find coverage -name "*.xml" -exec sed -i 's|/github/workspace/||g' {} \; echo "Path fix complete. Sample paths after fix:" - grep -h "fullPath=" coverage/**/TestCoverageResults*.xml | head -5 || true + find coverage -name "TestCoverageResults*.xml" -exec grep -h "fullPath=" {} \; | head -5 || true - name: Upload coverage to Codecov (util package) uses: codecov/codecov-action@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d70e596..09781903 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -188,7 +188,7 @@ jobs: echo "Fixing coverage paths..." find coverage -name "*.xml" -exec sed -i 's|/github/workspace/||g' {} \; echo "Path fix complete. Sample paths after fix:" - grep -h "fullPath=" coverage/**/TestCoverageResults*.xml | head -5 || true + find coverage -name "TestCoverageResults*.xml" -exec grep -h "fullPath=" {} \; | head -5 || true - name: Upload coverage to Codecov (util package) uses: codecov/codecov-action@v4 From f2cc1c92cdbf552ae3c49829284abd1ac700e3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Fri, 30 Jan 2026 15:28:00 +1100 Subject: [PATCH 3/4] fix(ci): include JEngine assemblies in coverage collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add assemblyFilters:+JEngine.* to coverageOptions so Unity Code Coverage includes JEngine.Core, JEngine.Util, and JEngine.UI assemblies. Previously only Assembly-CSharp and other default assemblies were being collected. Co-Authored-By: Claude Opus 4.5 Signed-off-by: JasonXuDeveloper - 傑 --- .github/workflows/unity-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unity-tests.yml b/.github/workflows/unity-tests.yml index 292e40ce..08ddeb2e 100644 --- a/.github/workflows/unity-tests.yml +++ b/.github/workflows/unity-tests.yml @@ -71,7 +71,7 @@ jobs: artifactsPath: artifacts/EditMode githubToken: ${{ secrets.GITHUB_TOKEN }} checkName: EditMode Test Results - coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport' + coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+JEngine.*' # Run PlayMode tests - name: Run PlayMode tests @@ -89,7 +89,7 @@ jobs: artifactsPath: artifacts/PlayMode githubToken: ${{ secrets.GITHUB_TOKEN }} checkName: PlayMode Test Results - coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport' + coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+JEngine.*' # Upload test results as artifacts - name: Upload EditMode test results From a400affcef3b91c534b098718d066cd7562f1484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JasonXuDeveloper=20-=20=E5=82=91?= Date: Fri, 30 Jan 2026 15:53:14 +1100 Subject: [PATCH 4/4] docs: add PR code review handling guidelines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document the process for addressing code review comments: fix, commit, reply, and resolve conversations. Co-Authored-By: Claude Opus 4.5 Signed-off-by: JasonXuDeveloper - 傑 --- .claude/rules/commit-conventions.md | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.claude/rules/commit-conventions.md b/.claude/rules/commit-conventions.md index 00e0ea1c..c0c9a290 100644 --- a/.claude/rules/commit-conventions.md +++ b/.claude/rules/commit-conventions.md @@ -99,3 +99,41 @@ git commit -s -m "feat(core): add new feature" ``` This adds a `Signed-off-by` line certifying you have the right to submit the code under the project's license. + +## PR Code Review Handling + +When addressing code review comments on a PR: + +1. **Fix the issue** in code +2. **Commit and push** the fix +3. **Reply** to the review comment explaining the fix +4. **Resolve the conversation** immediately after replying + +To resolve conversations via CLI: + +```bash +# Get thread IDs +gh api graphql -f query=' +{ + repository(owner: "OWNER", name: "REPO") { + pullRequest(number: PR_NUMBER) { + reviewThreads(first: 20) { + nodes { + id + isResolved + } + } + } + } +}' + +# Resolve a thread +gh api graphql -f query=' +mutation { + resolveReviewThread(input: {threadId: "THREAD_ID"}) { + thread { isResolved } + } +}' +``` + +**Important:** Always resolve conversations after fixing and replying - don't leave them open.