Skip to content

fix(ci): untrack generated .pre-commit-config.yaml; unstick autopublish - #328

Merged
thedavidmeister merged 1 commit into
mainfrom
stox/untrack-precommit-config
Jul 13, 2026
Merged

fix(ci): untrack generated .pre-commit-config.yaml; unstick autopublish#328
thedavidmeister merged 1 commit into
mainfrom
stox/untrack-precommit-config

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Fixes rain.vats's autopublish, which publishes but then dies at Tag and push, leaving the post-publish version bump unpushed (foundry.toml stuck at the just-published version → the next release fails the next-version invariant).

Root cause

.pre-commit-config.yaml is committed as a tracked symlink into /nix/store/…. The rainix devShell rewrites it on entry, so every nix develop (e.g. forge soldeer push during release) dirties the tree. autopublish's Tag and push then aborts its rebase onto origin/main (cannot rebase: You have unstaged changes) and falls into a Rust-only recovery (cargo generate-lockfile) that fails on this soldeer-only repo (no Cargo.toml, cargo exits 101) — so publishes land but the post-publish version bump never pushes.

The workflow tries to hide the file with echo ".pre-commit-config.yaml" >> .git/info/exclude, but that only ignores untracked files — useless against a tracked symlink. rain.factory does not track this file and publishes cleanly.

Changes

  • Untrack .pre-commit-config.yaml (git rm --cached) + add it to .gitignore — it is generated by the devShell and must not be committed.
  • Bump [package].version 0.1.7 → 0.1.8 — the last release published 0.1.7 but its bump-to-next never landed (that is the bug above), so foundry.toml == the published version. The autopublish soldeer-gate requires the in-dev version to be AHEAD of published, so this restores the invariant.

A companion PR hardens rainix's Tag and push so soldeer-only repos never hit the Rust-only recovery path.

Summary by CodeRabbit

  • Chores
    • Updated the project version to 0.1.8.
    • Refined repository ignore settings and pre-commit configuration for generated development artifacts.

The rainix devShell writes .pre-commit-config.yaml on entry (a nix-store
symlink). It was committed as a tracked symlink, so every devShell entry
rewrites it to a new store path and dirties the tree. autopublish's 'Tag and
push' then aborts its rebase ('cannot rebase: You have unstaged changes') and
falls into a Rust-only recovery (cargo generate-lockfile) that fails on this
soldeer-only repo (no Cargo.toml) — so publishes land but the post-publish
version bump never pushes. (rain.factory does not track this file and publishes
cleanly.)

- Untrack it + .gitignore it (the .git/info/exclude guard in the workflow only
  hides UNTRACKED files, so it never covered this tracked symlink).
- Bump [package].version 0.1.7 -> 0.1.8: the last release published 0.1.7 but
  its bump-to-next never landed, leaving foundry.toml == the published version.
  The autopublish soldeer-gate requires the in-dev version to be AHEAD of what
  is published, so this restores the invariant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2b6df423-1226-4b38-a510-d7bd9b087f5d

📥 Commits

Reviewing files that changed from the base of the PR and between f245a80 and 199e3c5.

📒 Files selected for processing (3)
  • .gitignore
  • .pre-commit-config.yaml
  • foundry.toml
💤 Files with no reviewable changes (1)
  • .pre-commit-config.yaml

Walkthrough

Repository metadata was updated by expanding ignored development-shell artifacts and incrementing the package version from 0.1.7 to 0.1.8.

Changes

Repository hygiene

Layer / File(s) Summary
Generated artifact ignore rules
.gitignore
Documents the rainix devShell symlink and ignores .pre-commit-config.yaml.

Package version

Layer / File(s) Summary
Package version increment
foundry.toml
Updates the package version from 0.1.7 to 0.1.8.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main fix: untracking the generated .pre-commit-config.yaml to unblock autopublish.
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 stox/untrack-precommit-config

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.

@thedavidmeister

Copy link
Copy Markdown
Collaborator Author

Reviewed 199e3c5: untrack the generated .pre-commit-config.yaml nix-store symlink (+ .gitignore it) — the root cause of autopublish's Tag-and-push failure, since the workflow's .git/info/exclude guard only covers untracked files. Bumps foundry.toml 0.1.7→0.1.8 to restore the next-version invariant the failed bump left stuck. Config-only, no source change. All CI green (static, test, legal, CodeRabbit). Merging.

@thedavidmeister
thedavidmeister merged commit 8a892b8 into main Jul 13, 2026
4 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