Repository navigation
feat: automate upstream release sync with fork-patch gate - #2
Merged
Merged
Conversation
…#4404) The bash and sh script handler templates did not quote the {0} placeholder, causing word splitting when the resolved script path contains spaces (e.g. /Volumes/My Shared Files/hook.sh). This affected job hooks and run steps executed from directories with spaces in their path. Quote {0} in bash and sh default arguments, matching the approach already used by pwsh, powershell, and cmd handlers.
Add a daily fork-sync pipeline: - .github/workflows/fork-sync.yml runs scripts/fork-sync.sh once a day. It resolves the latest upstream *release* (never a raw main commit), merges it into sync/upstream-<ver>, bumps the fork version (upstream 2.337.0 -> fork 2.10337.0) and opens a PR. Merging stays manual. On merge conflicts it aborts and opens a tracking issue instead of guessing a resolution. - .github/workflows/fork-patches.yml runs scripts/verify-fork-patches.sh on every push/PR. It fails when any patch listed in scripts/fork-patches.txt is missing from the inspected ref, so a sync that drops a fork patch cannot be merged. - scripts/fork-patches.txt is the manifest of the fork's patches; version-churn commits are excluded by design. Patches are carried by git merge and verified by the gate, they are never replayed by hand. This prevents the silent patch loss that hit us during the 2.335.0 sync (the actions#4404 quoting fix).
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.
What
Two things in one PR — the incident fix and the automation that prevents its recurrence:
1. Restore the lost actions#4404 fix (cherry-pick of
1074c0c5)The
bash/shscript-handler templates did not quote the{0}placeholder, so hook scripts living in paths with spaces (/Volumes/My Shared Files/...) were word-split on execution — actions#4404. This was fixed in May and silently lost during the 2.335.0 upstream sync (rebuilt main + manual commit replay); this restores both the fix and its 147-line L0 test.2. Automated upstream sync + fork-patch gate
scripts/fork-sync.sh(daily cron viafork-sync.yml):maincommit)sync/upstream-<ver>— patches are carried by git, never replayed by handreleaseVersion/src/runnerversionto the fork version (upstream2.337.0→ fork2.10337.0); any other conflict aborts and opens a tracking issuescripts/verify-fork-patches.sh(runs on every push/PR viafork-patches.yml, plus inside the sync flow): fails when any patch listed inscripts/fork-patches.txtis missing from the inspected ref. Version-churn commits are excluded by design. New unlisted fork commits are reported as notes.Verification
verify-fork-patches.sh HEADpasses on this branch; run against pre-branchorigin/mainit fails and names exactly the two missing patches (the Bash script handler doesn't quote the script path, breaking hooks/scripts in directories with spaces actions/runner#4404 fix and this automation)v2.337.0release built on real current upstream main: clean merge of all upstream commits since 2.336.0, version files auto-resolved to2.10337.0, patch gate green, Bash script handler doesn't quote the script path, breaking hooks/scripts in directories with spaces actions/runner#4404 quoting / Windows-containers fix / L0 tests all verified intact after the mergeFollow-ups (manual, outside this PR)
git cherryin the sync PR notes absorbed patches)