Skip to content

fix(make): harden reset against dirty submodule locks - #2252

Merged
shunkakinoki merged 1 commit into
mainfrom
fix/make-reset-submodule-dirty-lock
Aug 5, 2026
Merged

fix(make): harden reset against dirty submodule locks#2252
shunkakinoki merged 1 commit into
mainfrom
fix/make-reset-submodule-dirty-lock

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • With a dirty dotagents/skills-lock.json, make reset succeeds and leaves a clean tree
  • make git-submodule-sync still updates submodules normally
  • make sync no longer dirties dotagents when all skills are already installed

Made with Cursor


Summary by cubic

Hardened make reset so dirty submodule locks (e.g., dotagents/skills-lock.json) no longer block checkout and the tree ends clean. Also made submodule sync recursive and updated dotagents to stop unnecessary lock rewrites.

  • Bug Fixes

    • make reset now hard-resets repo and submodules, cleans submodules, syncs URLs recursively, then force-updates.
    • git-submodule-sync now uses git submodule sync --recursive.
  • Dependencies

    • Bumped dotagents to include the skills-install fix that avoids rewriting skills-lock.json when unchanged.

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

Review in cubic

make reset failed when skills-lock.json was dirty in dotagents. Hard-reset
submodules before force-updating, and bump to the skills-install fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shunkakinoki
shunkakinoki merged commit aea29b8 into main Aug 5, 2026
@indent-zero

indent-zero Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
PR Summary

Hardens make reset so it succeeds even when a submodule has a dirty working tree (specifically the recurring dotagents/skills-lock.json dirtiness that was blocking resets), and bumps dotagents to pick up the upstream fix that stops make sync from re-dirtying the lockfile.

  • Makefile reset now runs git reset --hard HEAD, git submodule foreach --recursive 'git reset --hard HEAD && git clean -fd', git submodule sync --recursive, and git submodule update --init --recursive --force instead of just git checkout -- . after git-submodule-sync.
  • Makefile git-submodule-sync adds --recursive to git submodule sync for consistency with the recursive update.
  • Bumps dotagents submodule from 082de5df8b3e29 (fix(skills): stop rewriting lock on every install, dotagents#183), which addresses the root cause of the dirty lockfile.

Issues

2 potential issues found:

  • Asymmetric cleanup in make reset: submodules get git clean -fd, but the parent tree does not, so untracked files at the top level survive the reset. Consider adding git clean -fd (or -fdx) at the parent for consistency, or leave as-is if preserving parent untracked files is intentional. → Autofix
  • git clean -fd inside submodules leaves gitignored files (build artifacts, caches, generated lockfiles). If make reset is meant to produce a fully pristine tree, use git clean -fdx; if preserving caches is intentional, leaving as-is is fine. → Autofix

CI Checks

Waiting for CI checks...


⚡ Autofix All Issues

@shunkakinoki
shunkakinoki deleted the fix/make-reset-submodule-dirty-lock branch August 5, 2026 01:12
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@shunkakinoki, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2145f0a3-7e55-4df9-9e39-855ba9537ba6

📥 Commits

Reviewing files that changed from the base of the PR and between ef94b8e and a7dea1f.

📒 Files selected for processing (2)
  • Makefile
  • dotagents

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.

Comment thread Makefile
@echo "🔄 Resetting git status to clean..."
@git checkout -- .
@git reset --hard HEAD
@git submodule foreach --recursive 'git reset --hard HEAD && git clean -fd'

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.

Nit — asymmetric cleanup: The submodule foreach step cleans untracked files inside each submodule with git clean -fd, but there's no equivalent git clean -fd at the parent. git reset --hard HEAD on line 290 only touches tracked/staged files, so someone running make reset expecting a clean tree will still see untracked files at the top level while submodules are pristine. If preserving parent untracked files is intentional (safety net), ignore; otherwise consider adding @git clean -fd here for symmetry.

Comment thread Makefile
@echo "🔄 Resetting git status to clean..."
@git checkout -- .
@git reset --hard HEAD
@git submodule foreach --recursive 'git reset --hard HEAD && git clean -fd'

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.

Nit — ignored files retained: git clean -fd does not remove .gitignored files inside submodules. If the intent of make reset is to produce a fully pristine tree (e.g., wipe generated caches/artifacts), use git clean -fdx. If retaining caches is intentional, this is fine as-is.

@indent-zero indent-zero Bot mentioned this pull request Aug 5, 2026
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