Skip to content

Commit edc1d74

Browse files
committed
Update
[ghstack-poisoned]
2 parents 3fc3208 + 9cce52c commit edc1d74

File tree

26 files changed

+2577
-19
lines changed

26 files changed

+2577
-19
lines changed

.github/RELEASE_AGENT_PROMPT.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,31 @@ Get commits from the last release:
4242
git log v0.11.0..HEAD --oneline --no-merges
4343
```
4444

45+
### Critical: Don't Miss ghstack Commits
46+
47+
**The biggest pitfall in release notes is only looking at commits with PR numbers.** Many of the most significant features are merged via ghstack and have NO PR number in the commit message. Always analyze both:
48+
49+
1. **PR commits**: `git log v0.10.0..v0.11.0 --oneline | grep "(#"`
50+
2. **ghstack commits**: `git log v0.10.0..v0.11.0 --oneline | grep -v "(#"`
51+
52+
ghstack commits often represent major feature work (e.g., Dreamer overhaul, weight sync schemes, new algorithms like DAPO/CISPO).
53+
54+
### Handling ghstack Commits
55+
56+
Many commits are merged via ghstack and do NOT have PR numbers in the commit message. These often contain major features:
57+
58+
```bash
59+
# Find ghstack commits (no PR number)
60+
git log v0.10.0..v0.11.0 --oneline | grep -v "(#"
61+
62+
# Search for specific features by keyword
63+
git log v0.10.0..v0.11.0 --oneline | grep -i dreamer
64+
git log v0.10.0..v0.11.0 --oneline | grep -i "weight.*sync\|sync.*scheme"
65+
git log v0.10.0..v0.11.0 --oneline | grep -i collector
66+
```
67+
68+
Include these in release notes using their short SHA (e.g., `cc917bae`) instead of a PR number. Group related ghstack commits by feature area.
69+
4570
### Categorize Commits
4671

4772
Review each commit and categorize into:
@@ -119,6 +144,26 @@ Thanks to all contributors:
119144
<!-- List first-time contributors especially -->
120145
```
121146

147+
### Release Notes Format Requirements
148+
149+
- **Author handles**: Every entry must include the lead author's GitHub handle (e.g., `@vmoens`)
150+
- **Explanations**: For PRs/commits with >10 lines changed, add 1-3 lines of explanation
151+
- **Metadata**: Use `gh pr view <PR> --json author,additions,deletions` to get PR details
152+
- **ghstack commits**: Use `git show --stat <sha>` to check lines changed
153+
- **File storage**: Save release notes to `RELEASE_NOTES_v0.X.Y.md` in the repo root to preserve context
154+
155+
### Release Notes Best Practices
156+
157+
1. **Create the file early** - Save to `RELEASE_NOTES_v0.X.Y.md` as you work. This preserves context and allows iterative refinement.
158+
159+
2. **Group by feature, not by commit** - Multiple ghstack commits often belong to the same feature. Group them under a single feature heading (e.g., "Dreamer World Model Improvements").
160+
161+
3. **Prioritize by impact** - Use `git show --stat <sha>` to see lines changed. Features with 100+ lines deserve their own section in highlights.
162+
163+
4. **Check the sota-implementations/** - Major algorithm updates often land here. Check for new or significantly updated implementations.
164+
165+
5. **Verify docs build before updating stable** - The docs workflow must complete and upload the version folder to gh-pages before you can update the stable symlink.
166+
122167
**Important:** Wait for user approval before proceeding.
123168

124169
---
@@ -347,6 +392,15 @@ git push origin :refs/tags/v<VERSION>
347392
git push origin --delete release/<VERSION>
348393
```
349394

395+
### gh-pages Push Rejected
396+
397+
If `git push` to gh-pages is rejected due to remote updates (common when CI updates gh-pages in parallel):
398+
```bash
399+
git fetch origin gh-pages
400+
git rebase origin/gh-pages
401+
git push origin HEAD:gh-pages
402+
```
403+
350404
---
351405

352406
## Environment Setup for PyPI Trusted Publishing
@@ -462,3 +516,63 @@ The release workflow automatically updates gh-pages:
462516
- `versions.html` is updated to mark the new version as "(stable release)"
463517

464518
If the docs for the new version folder don't exist yet, they will be built and deployed by the `docs.yml` workflow when the tag is pushed.
519+
520+
### Manual gh-pages Updates
521+
522+
If you need to manually update gh-pages (e.g., update stable symlink, fix versions.html):
523+
524+
```bash
525+
# Create worktree for gh-pages (avoids switching branches)
526+
git worktree add .worktrees/gh-pages gh-pages
527+
528+
# Make changes in the worktree
529+
cd .worktrees/gh-pages
530+
531+
# Update stable symlink to new version
532+
rm -f stable && ln -sf 0.11 stable
533+
534+
# Update versions.html - remove old stable marker, add new one
535+
sed -i 's/ (stable release)//g' versions.html
536+
sed -i 's|href="0.11/">v0.11|href="0.11/">v0.11 (stable release)|g' versions.html
537+
538+
# Add new version entry if needed (insert after "main (unstable)" line)
539+
# Check versions.html to see the format
540+
541+
# Commit and push
542+
git add -A && git commit -m "Update stable to 0.11"
543+
git push origin HEAD:gh-pages
544+
545+
# Cleanup worktree
546+
cd ../..
547+
git worktree remove .worktrees/gh-pages
548+
```
549+
550+
**Note:** If `rsync` fails with "read-only variable" error when copying docs, use `cp -R` instead.
551+
552+
---
553+
554+
## Common Pitfalls
555+
556+
### Release Notes
557+
558+
1. **Only looking at PR commits** - The biggest mistake. ghstack commits have no PR numbers but often contain the most significant features. Always run both `grep "(#"` and `grep -v "(#"` on the commit log.
559+
560+
2. **Missing related commits** - A feature like "Dreamer improvements" may span 10+ commits. Search by keyword (`grep -i dreamer`) to find all related work.
561+
562+
3. **Not checking lines changed** - A commit titled "[BugFix] Minor fix" might actually be 300 lines of important refactoring. Use `git show --stat` to verify.
563+
564+
4. **Forgetting author attribution** - Every entry needs `@username`. For ghstack commits, check `git log --format='%an %ae' <sha>` to find the author.
565+
566+
### Documentation Updates
567+
568+
1. **Updating stable before docs exist** - The docs workflow must complete first. Check that the version folder exists on gh-pages before updating the stable symlink.
569+
570+
2. **Not adding version to versions.html** - When manually updating gh-pages, remember to add a new `<li>` entry for the version in `versions.html`, not just update the stable symlink.
571+
572+
### General Process
573+
574+
1. **Working directly on gh-pages branch** - Use `git worktree` instead. It's cleaner and avoids accidentally committing to the wrong branch.
575+
576+
2. **Not verifying the release branch exists** - Before tagging, ensure the release branch (e.g., `release/0.11.0`) is pushed and has all necessary commits.
577+
578+
3. **Assuming CI passed** - Always monitor the docs/release workflows. Check the actual logs if something seems off.

0 commit comments

Comments
 (0)