From 7d2b40591547ca442fa3b245e381855dea8f3dbe Mon Sep 17 00:00:00 2001 From: Aegis AI Assistant Date: Sat, 15 Aug 2026 23:17:15 -0700 Subject: [PATCH] chore: remove duplicate, broken upstream_sync workflow upstream-sync.yml (hyphenated) already syncs daily and has succeeded on every recent run using the default GITHUB_TOKEN. upstream_sync.yml (underscored) duplicated the same job every 4 hours instead, but has failed every run with a 403 at checkout: fatal: unable to access 'https://github.com/SharpAI/mlx-swift/': The requested URL returned error: 403 It overrides the checkout token with SWIFTLM_PR_TOKEN, which is configured as a secret on this repo but rejected by GitHub for this operation. Since the working sibling workflow proves the default token is sufficient for this repo's sync needs, the fix is to drop the redundant, broken duplicate rather than repair a credential that can't be inspected or rotated from here. --- .github/workflows/upstream_sync.yml | 68 ----------------------------- 1 file changed, 68 deletions(-) delete mode 100644 .github/workflows/upstream_sync.yml diff --git a/.github/workflows/upstream_sync.yml b/.github/workflows/upstream_sync.yml deleted file mode 100644 index 4ad9b5f31..000000000 --- a/.github/workflows/upstream_sync.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Upstream Sync - -on: - schedule: - - cron: '0 */4 * * *' # Run every 4 hours - workflow_dispatch: # Allow manual triggering - -jobs: - check-and-create-pr: - name: Check Upstream and Create PR - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Required to fetch all history for commit comparison - token: ${{ secrets.SWIFTLM_PR_TOKEN || secrets.GITHUB_TOKEN }} - - - name: Check for upstream changes and set up branch - id: check_upstream - run: | - # Add the upstream repository - git remote add upstream https://github.com/ml-explore/mlx-swift.git - git fetch upstream main - - # Check how many commits upstream is ahead of our local main - AHEAD=$(git rev-list --count HEAD..upstream/main) - echo "Upstream is $AHEAD commits ahead." - - if [ "$AHEAD" -gt 0 ]; then - echo "has_changes=true" >> $GITHUB_OUTPUT - BRANCH_NAME="sync/upstream-latest" - echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT - - # Checkout upstream main into the static sync branch (force reset if it exists) - git checkout -B $BRANCH_NAME upstream/main - git push --force origin $BRANCH_NAME - else - echo "has_changes=false" >> $GITHUB_OUTPUT - echo "No new commits to sync." - fi - - - name: Create or Update Pull Request - if: steps.check_upstream.outputs.has_changes == 'true' - run: | - # Check if a PR already exists for this branch - PR_EXISTS=$(gh pr list HEAD --head ${{ steps.check_upstream.outputs.branch_name }} --json number --jq 'length') - - if [ "$PR_EXISTS" -eq "0" ]; then - gh pr create \ - --title "🔄 Auto-Sync: Upstream changes from ml-explore/mlx-swift" \ - --body "Automated PR to sync the latest changes from upstream \`ml-explore/mlx-swift\`'s \`main\` branch. - - ### Merge Warnings - * **Do NOT blind merge!** This repo contains custom SharpAI out-of-core SSD features. - * Refer to the \`UPSTREAM_MERGE_PLAN.md\` file locally to check standard SharpAI metal optimization discrepancies. - * Do **not** overwrite the submodule branch pointers under \`Package.swift\` without consultation." \ - --base main \ - --head ${{ steps.check_upstream.outputs.branch_name }} - else - echo "PR already exists. Force pushing to the branch updated the PR automatically." - fi - env: - GH_TOKEN: ${{ secrets.SWIFTLM_PR_TOKEN || secrets.GITHUB_TOKEN }}