Let Claude read the C# source when porting - #394
Merged
Merged
Conversation
port-pr reads the C# code from a sibling clone at ../machine, which the @claude workflow never created. Claude could not check C# behavior on #390. The workflow now clones sillsdev/machine with full history, and Claude can read it and run git show, log and blame there. port-pr reads each file as of the source PR's merge commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #394 +/- ##
=======================================
Coverage 92.07% 92.07%
=======================================
Files 394 394
Lines 24896 24896
=======================================
Hits 22922 22922
Misses 1974 1974 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
A local ../machine clone fetched before the source PR merged cannot resolve the merge commit. port-pr now fetches and retries when git show reports a bad object. The workflow makes a fresh clone, so this only affects local runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
git show <sha>:<path> reports a missing commit as a path error, never as bad object, so the retry in port-pr never triggered. The skill now checks the commit with git cat-file -e and fetches when it is missing. The workflow allows cat-file in the clone so a run that follows the skill is not denied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Public API / wheel / optional deps / C# parity: None verified. Only CI and skill files change. Findings: F1 addressed, F2 addressed. Reviewed at db028b1 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick summary
Claude can now read the C# source when it ports a change or answers a follow-up on a port PR. It reads each file as of the source PR's merge commit. Only
claude.ymland the port-pr skill change.Where to look
port-pr reads the C# code from a sibling clone at
../machine. The @claude workflow never created one. On #390, Claude could not check whether C# shares the defects the review found, because itsgh apiandWebFetchcalls were denied.claude.ymlclonessillsdev/machineto../machinewith full history. The repo is public, so no token is used. It sits outside the workspace, soblack .andflake8 .inlocal_check.shdo not scan it.--add-dir ../machinelets Claude read files there. The new allowed tools aregit -C ../machine show,logandblame, which only read.mergeCommitand reads each C# file withgit -C ../machine show <mergeCommit>:<path>. A port PR can cover more than one C# PR, as Convert USFM versification before updating from rows #390 does, so reading by commit works where a single checkout would not.I did not allow
gh apiorWebFetch. With the workflow's token,gh apicould also write, andWebFetchwould let Claude fetch any URL.The repo is about 31 MB, so the full clone should add only a few seconds. I have not timed it on a runner.
Validation
.github/workflows/claude.ymlwith PyYAML. It parsed.git diff --check-- clean../local_check.sh. This PR only changes a workflow and a skill.🤖 Generated with Claude Code
This change is