Skip to content

fix(ci): authenticate and prune external skill sync - #2203

Closed
shunkakinoki wants to merge 0 commit into
mainfrom
codex/fix-upgrade-skill-sync
Closed

fix(ci): authenticate and prune external skill sync#2203
shunkakinoki wants to merge 0 commit into
mainfrom
codex/fix-upgrade-skill-sync

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Fixes the Upgrade workflow failure from run 30746207049.

  • Bump the dotagents submodule to the lock cleanup.
  • Pass PAT_TOKEN to the upgrade step through a Git URL rewrite so private-skills can clone.
  • Preserve the existing GITHUB_TOKEN for normal GitHub operations.

Focused validation: lock JSON parses, stale entries are absent, authenticated private-skills clone succeeds, and workflow YAML parses.


Summary by cubic

Fixes the Upgrade CI workflow by authenticating private skill clones and pruning stale external-skill locks. This stops sync failures while keeping normal GitHub Actions behavior unchanged.

  • Bug Fixes

    • Add a git URL rewrite that injects PAT_TOKEN for cloning from github.com so private skills can sync.
    • Keep GH_TOKEN for standard GitHub operations; only use PAT_TOKEN for git clone.
  • Dependencies

    • Bump dotagents submodule to the lock cleanup revision to prune stale entries.

Written for commit c7a790d. Summary will update on new commits.

Review in cubic

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@indent-zero

indent-zero Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor
PR Summary

Fixes the scheduled upgrade CI job which was failing while syncing external skills. Authenticates git operations with a PAT so bun x skills add clones don't hit anonymous rate limits, and prunes stale skill entries from the dotagents submodule so the sync stops trying to install repos that no longer exist upstream.

  • .github/workflows/upgrade.yml: Prefixes make upgrade-dev with git config --global url."https://x-access-token:${PAT_TOKEN}@github.com/".insteadOf "https://github.com/" and exposes PAT_TOKEN in the step env so all HTTPS GitHub clones during sync use authenticated access.
  • dotagents submodule bumped 0ef0e708a6c236, which removes stale Graphify-Labs/graphify, vercel-labs/next-browser, and vercel-labs/next-skills entries from SKILLS.txt/skills-lock.json, and renames coreyhaines31/marketingskills:analytics-trackinganalytics.

Issues

1 potential issue found:

  • Fork PRs (or a missing PAT_TOKEN secret) will expand to https://x-access-token:@github.com/, silently breaking every subsequent HTTPS GitHub clone during make upgrade-dev. Since the workflow triggers on pull_request: branches: [main], a fork PR is a plausible trigger; consider guarding with if: env.PAT_TOKEN != '' or failing fast with a preflight check. → Autofix

CI Checks

All CI checks pass, including the upgrade job that exercises this fix. The two Mesa checks (Mesa Review, Mesa Description) report neutral/skipping status and are not failures.


⚡ Autofix All Issues

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Improved the automated upgrade workflow to support authenticated repository access.
    • Updated the bundled agent tooling to a newer revision.

Walkthrough

The upgrade workflow now uses PAT_TOKEN for authenticated GitHub URL rewriting before make upgrade-dev. The dotagents subproject pointer now references a newer commit.

Changes

Upgrade workflow authentication

Layer / File(s) Summary
Configure authenticated upgrade execution
.github/workflows/upgrade.yml
The workflow exposes PAT_TOKEN, configures GitHub URL rewriting, and then runs make upgrade-dev.

dotagents reference update

Layer / File(s) Summary
Advance dotagents reference
dotagents
The subproject pointer changes to commit 8a6c23679ea82430a85d463728032f185654501b.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit checks the upgrade trail,
With tokens ready in the gale.
GitHub paths now find their way,
While dotagents hops ahead today.
New commits nest where old ones lay.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the CI authentication fix and external skill cleanup described by the changeset.
Description check ✅ Passed The description directly explains the workflow authentication change, submodule update, and validation objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-upgrade-skill-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- name: Run Upgrade
run: make upgrade-dev
run: |
git config --global url."https://x-access-token:${PAT_TOKEN}@github.com/".insteadOf "https://github.com/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latent: broken auth URL when PAT_TOKEN is empty. On fork PRs, secrets.PAT_TOKEN is unavailable and expands to an empty string, producing https://x-access-token:@github.com/ as the insteadOf target. Every subsequent HTTPS GitHub clone in make upgrade-dev (skills-install, submodule pulls, etc.) will then fail with an auth error rather than a clean 'missing secret' message. The pull_request trigger allows this path today. Consider either dropping pull_request from the trigger list, gating this step with if: env.PAT_TOKEN != '', or failing fast with a preflight [ -n "$PAT_TOKEN" ] || { echo 'PAT_TOKEN required'; exit 1; } before writing the git config.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/upgrade.yml:
- Around line 37-41: Update the upgrade workflow step containing the git config
command and make upgrade-dev so PAT_TOKEN is written to a temporary Git
configuration file via GIT_CONFIG_GLOBAL rather than persisted with git config
--global. Ensure the temporary file is cleaned up using an EXIT trap, while
preserving the existing authenticated Git URL rewrite and upgrade command.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3394f7de-2ec8-4765-9b4c-d041439db0de

📥 Commits

Reviewing files that changed from the base of the PR and between 0f85607 and fe93f56.

📒 Files selected for processing (2)
  • .github/workflows/upgrade.yml
  • dotagents

Comment on lines +37 to +41
git config --global url."https://x-access-token:${PAT_TOKEN}@github.com/".insteadOf "https://github.com/"
make upgrade-dev
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow file ---'
if [ -f .github/workflows/upgrade.yml ]; then
  nl -ba .github/workflows/upgrade.yml | sed -n '1,120p'
else
  printf 'missing .github/workflows/upgrade.yml\n'
fi

printf '%s\n' '--- related workflow files ---'
git ls-files .github/workflows | sort

printf '%s\n' '--- searches ---'
rg -n "create-pull-request|pat-token|PAT_TOKEN|GH_TOKEN|git config --global|GIT_CONFIG_GLOBAL|upgrade-dev|peter-evans" .github/workflows || true

Repository: shunkakinoki/dotfiles

Length of output: 221


🌐 Web query:

git config --global writes per user gitconfig file git-scm.com/docs/git-config

💡 Result:

When you use the git config --global command, Git writes to a user-specific configuration file [1][2]. Specifically, the command writes to the ~/.gitconfig file by default [1][3]. However, if the $XDG_CONFIG_HOME/git/config file exists and the ~/.gitconfig file does not, Git will write to the $XDG_CONFIG_HOME/git/config file instead [1][4]. If the $XDG_CONFIG_HOME environment variable is not set or is empty, Git defaults to using $HOME/.config/git/config [5]. These files are collectively referred to as global configuration files, and settings applied here affect all of the repositories you work with on your system [2][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow file ---'
if [ -f .github/workflows/upgrade.yml ]; then
  awk '{printf "%6d  %s\n", NR, $0}' .github/workflows/upgrade.yml | sed -n '1,140p'
else
  printf 'missing .github/workflows/upgrade.yml\n'
fi

printf '%s\n' '--- related workflow files ---'
git ls-files .github/workflows | sort

printf '%s\n' '--- searches ---'
rg -n "create-pull-request|pat-token|PAT_TOKEN|GH_TOKEN|git config --global|GIT_CONFIG_GLOBAL|upgrade-dev|peter-evans" .github/workflows || true

Repository: shunkakinoki/dotfiles

Length of output: 3967


🌐 Web query:

peter-evans create-pull-request GitHub Actions git config user.name user.email credential-helper config

💡 Result:

The peter-evans/create-pull-request GitHub Action does not require you to manually configure the git user name and email to perform its primary function [1][2][3]. The action manages the Git configuration required for pushing commits, including handling authentication via a credential helper internally [4][5][6]. Key points regarding Git configuration: 1. Manual Git Config: You are generally not required to run git config commands before this action [1][3]. However, if your workflow performs its own git commit operations before calling this action, you should configure the git user name and email for those specific local commits [1][7]. The action provides explicit examples of this in its documentation [1][2]. 2. Committer and Author Identity: You can customize the committer and author identity of the commits generated by the action using the committer and author inputs [1][8][3]. - Committer defaults to: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> [1][8]. - Author defaults to the user who triggered the workflow run [1][8]. 3. Authentication (Credential Helper): The action handles Git authentication automatically by configuring a credential helper internally [5][9][6]. It manages the necessary Git configuration (typically via http.https://github.com/.extraheader) to allow the action to push to the repository using the provided token [4][5][10]. You do not need to manually run git config for the credential helper [1][2]. 4. Troubleshooting: If you encounter errors such as "Please tell me who you are," it is often because your workflow is attempting to run git commands (like git commit) before the action, which requires a local user identity [11]. In such cases, you should set these values as a step in your workflow [11]. If you see "No such device or address" errors, verify your authentication token has the necessary permissions and is correctly scoped [5][9].

Citations:


🌐 Web query:

GitHub Actions workflow secrets GITHUB_TOKEN permissions workflow trigger pull_request push schedule PAT_TOKEN secret

💡 Result:

GitHub Actions provides two primary methods for authenticating workflows: the built-in GITHUB_TOKEN and Personal Access Tokens (PATs) [1][2]. GITHUB_TOKEN The GITHUB_TOKEN is a temporary GitHub App installation token automatically generated for every workflow run [3]. It is the recommended, secure choice for tasks scoped to the current repository [1][2]. - Permissions: By default, the GITHUB_TOKEN may have varying levels of access depending on your repository settings, but it is best practice to use the permissions key in your workflow file to explicitly define and minimize its access (e.g., setting it to read-only for most jobs) [4][1][2]. - Scope: Access is strictly limited to the repository where the workflow is running [3][5]. - Trigger Behavior: To prevent infinite loops, events triggered by the GITHUB_TOKEN typically do not create new workflow runs [3][6]. Exceptions include workflow_dispatch and repository_dispatch events, which are explicit triggers [7]. Additionally, if a workflow uses the GITHUB_TOKEN to create or update a pull request, resulting pull_request events (opened, synchronize, reopened) create runs in an "approval-required" state [3][8]. PATs (Personal Access Tokens) If a workflow requires permissions or access beyond what the GITHUB_TOKEN can provide—such as accessing multiple repositories or an entire organization—you must use a PAT or a GitHub App installation token [1][5]. - Security: PATs must be stored as encrypted secrets in your repository settings [1]. Classic PATs are considered higher risk as they often carry broader, less granular permissions [9][2]. Fine-grained PATs, which offer scoped access to specific repositories and resources with mandatory expiration, are the recommended alternative to classic PATs [9][2]. - Use Case: Use a PAT when you need to bypass GITHUB_TOKEN limitations, such as triggering workflows without requiring manual approval or interacting with cross-repository resources [1][6][5]. Summary of Trigger Differences - GITHUB_TOKEN: Default; scoped to repository; prevents recursion; generates "approval-required" runs for certain PR events [3][6]. - PAT_TOKEN: Used as a secret; required for cross-repo access or when you need workflows to trigger automatically without manual approval loops [1][6][5].

Citations:


Use a temporary Git config file for PAT_TOKEN.

git config --global persists the credential-bearing rewrite in the runner’s per-user Git config, and this workflow continues with actions that can read Git configuration. Use GIT_CONFIG_GLOBAL=<temp-file> with an EXIT trap instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/upgrade.yml around lines 37 - 41, Update the upgrade
workflow step containing the git config command and make upgrade-dev so
PAT_TOKEN is written to a temporary Git configuration file via GIT_CONFIG_GLOBAL
rather than persisted with git config --global. Ensure the temporary file is
cleaned up using an EXIT trap, while preserving the existing authenticated Git
URL rewrite and upgrade command.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/upgrade.yml">

<violation number="1" location=".github/workflows/upgrade.yml:41">
P2: Fork PRs will fail the Upgrade job because `PAT_TOKEN` is unavailable there, yet all GitHub HTTPS URLs are rewritten to use it before `make upgrade-dev`. Consider skipping this secret-dependent upgrade path for fork PRs, or providing a no-secret alternative.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

make upgrade-dev
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Fork PRs will fail the Upgrade job because PAT_TOKEN is unavailable there, yet all GitHub HTTPS URLs are rewritten to use it before make upgrade-dev. Consider skipping this secret-dependent upgrade path for fork PRs, or providing a no-secret alternative.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/upgrade.yml, line 41:

<comment>Fork PRs will fail the Upgrade job because `PAT_TOKEN` is unavailable there, yet all GitHub HTTPS URLs are rewritten to use it before `make upgrade-dev`. Consider skipping this secret-dependent upgrade path for fork PRs, or providing a no-secret alternative.</comment>

<file context>
@@ -33,9 +33,12 @@ jobs:
+          make upgrade-dev
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
           SKIP_HOME_MANAGER_SWITCH: "true"
       - name: Create Pull Request
</file context>

@shunkakinoki
shunkakinoki enabled auto-merge (squash) August 2, 2026 16:51
auto-merge was automatically disabled August 3, 2026 10:00

Pull request was closed

@shunkakinoki
shunkakinoki force-pushed the codex/fix-upgrade-skill-sync branch from fe93f56 to c7a790d Compare August 3, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant