Skip to content

fix: push uncommitted changes on every run and ignore .system skills#11

Merged
shanliuling merged 2 commits into
mainfrom
fix/git-sync-on-any-change
Apr 25, 2026
Merged

fix: push uncommitted changes on every run and ignore .system skills#11
shanliuling merged 2 commits into
mainfrom
fix/git-sync-on-any-change

Conversation

@shanliuling
Copy link
Copy Markdown
Owner

@shanliuling shanliuling commented Apr 25, 2026

fix: push uncommitted changes on every run and ignore .system skills

Summary by CodeRabbit

  • Bug Fixes
    • Auto-sync mechanism improved to consistently run whenever Git is configured, ensuring reliable synchronization with remote repositories during status operations
    • Skill scanner filtering enhanced to properly exclude system-level skills from user detection, providing more accurate skill management

- Sync to remote whenever git is configured, not only when new skills are
  imported. This ensures uncommitted changes are always pushed on every run.
- Ignore /.system/ path pattern to filter out OpenAI Codex built-in skills.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

Warning

Rate limit exceeded

@shanliuling has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 3 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 3 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b82d31f9-966b-4a79-8ba8-4febcf2769f3

📥 Commits

Reviewing files that changed from the base of the PR and between ab331b6 and cbbe74c.

📒 Files selected for processing (2)
  • .claude/settings.local.json
  • src/commands/start.ts
📝 Walkthrough

Walkthrough

The PR modifies Git synchronization behavior in the start command to unconditionally sync when Git is configured, and extends skill scanning to exclude system-contained skills by filtering paths containing /.system/.

Changes

Cohort / File(s) Summary
Git Sync Control Flow
src/commands/start.ts
Removes hasChanges flag tracking and shifts from conditional syncing (when new skills count > 0) to unconditional autoSync() invocation whenever Git configuration (config.git.enabled and config.git.remote) is present.
Skill Scanner Filtering
src/core/scanner.ts
Adds /.system/ to ignore path patterns, causing skill directories with normalized paths containing /.system/ to be skipped during skill scanning, preventing system-contained Codex skills from being detected as user skills.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hops with glee at syncing clean,
System skills now out of sight,
Git flows free, no flags between,
Filters keep the codebase bright!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes both main changes: pushing uncommitted changes on every run and ignoring .system skills, matching the file modifications.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/git-sync-on-any-change

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 and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the showStatus function in src/commands/start.ts to ensure that git synchronization occurs whenever a remote is configured, rather than only when new skills are detected. It also adds /.system/ to the IGNORE_PATH_PATTERNS in src/core/scanner.ts. A review comment correctly identifies that the newSkillsCount variable is now unused and should be removed for better code cleanliness.

Comment thread src/commands/start.ts Outdated
@@ -437,11 +435,11 @@ async function showStatus(config: GlobalConfig) {

logger.info(t('start.detectingNew'))
const newSkillsCount = await autoImportNewSkills(config)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The variable newSkillsCount is declared and assigned but never used in the rest of the function. Since the conditional logic that previously used this variable has been removed, you can call autoImportNewSkills(config) directly without capturing its return value.

Suggested change
const newSkillsCount = await autoImportNewSkills(config)
await autoImportNewSkills(config)
References
  1. Unused variables should be removed to maintain code cleanliness and avoid confusion about the variable's purpose.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/commands/start.ts (1)

439-446: Behavior change is correct; consider gating the user-facing log to avoid noise.

The unconditional sync correctly addresses the goal of pushing any uncommitted local changes on every run, and autoSync already handles the "no changes" case silently via the !result.hash early-return (line 556-558).

However, logger.info(t('start.syncingToGithub')) at line 444 is now printed on every invocation, even when there is nothing to commit/push. The user will see "Syncing to GitHub…" with no follow-up success message in the common no-op case, which can be slightly confusing. Consider moving the log inside autoSync after detecting actual changes, or only logging the success line when result.hash is truthy (already the case at line 560), and dropping the pre-log here.

Optional refactor — emit the "syncing" message only when something actually syncs
   if (config.git?.enabled && config.git?.remote) {
-    logger.newline()
-    logger.info(t('start.syncingToGithub'))
     await autoSync(config)
   }

And inside autoSync, log start.syncingToGithub right before the push (or simply rely on the existing start.syncedToGithub success message).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/start.ts` around lines 439 - 446, The pre-sync user-facing log
logger.info(t('start.syncingToGithub')) should not be printed unconditionally;
remove or relocate it so users only see a "syncing" message when work will
actually be pushed. Modify the start command to drop the unconditional
logger.info(t('start.syncingToGithub')) call, and instead emit that message from
inside autoSync (or right after autoSync returns) only when autoSync indicates
changes (i.e., when result.hash is truthy in autoSync's return path), leaving
the existing start.syncedToGithub success log intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/commands/start.ts`:
- Around line 439-446: The pre-sync user-facing log
logger.info(t('start.syncingToGithub')) should not be printed unconditionally;
remove or relocate it so users only see a "syncing" message when work will
actually be pushed. Modify the start command to drop the unconditional
logger.info(t('start.syncingToGithub')) call, and instead emit that message from
inside autoSync (or right after autoSync returns) only when autoSync indicates
changes (i.e., when result.hash is truthy in autoSync's return path), leaving
the existing start.syncedToGithub success log intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 96b0703d-f562-43b1-9df0-723b431b3fc3

📥 Commits

Reviewing files that changed from the base of the PR and between 437d86a and ab331b6.

📒 Files selected for processing (2)
  • src/commands/start.ts
  • src/core/scanner.ts

Captured return value was unused after removing the git-sync
conditional gate. autoImportNewSkills() is called for its side effects.
@shanliuling shanliuling merged commit 8a3003c into main Apr 25, 2026
9 checks passed
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