Skip to content

chore(release): adopt changesets#426

Merged
benvinegar merged 1 commit into
mainfrom
changesets-adoption
Jun 13, 2026
Merged

chore(release): adopt changesets#426
benvinegar merged 1 commit into
mainfrom
changesets-adoption

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

  • Add a Changesets setup for Hunk release-note fragments and version prep.
  • Document the new workflow for contributors and agents: add .changeset/*.md instead of editing CHANGELOG.md in normal PRs, or use an empty changeset for maintenance-only work.
  • Add a PR CI check that verifies changed code has a pending changeset.
  • Move the currently unreleased changelog notes into changeset fragments so the next bun run release:version can generate the release section without reintroducing the shared CHANGELOG.md conflict point.

Verification

  • bun run changeset:status -- --since=origin/main
  • bun run format:check
  • bun run lint
  • bun run typecheck
  • bun test

This PR description was generated by Pi using OpenAI GPT-5

@benvinegar benvinegar force-pushed the changesets-adoption branch 2 times, most recently from a6c4aae to 35d79cf Compare June 13, 2026 14:57
@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR wires up Changesets as the release-note workflow for Hunk, replacing manual CHANGELOG.md edits. It adds tooling configuration, a CI enforcement gate, and updated contributor and agent documentation.

  • .changeset/config.json declares the workspace, marks session-broker sub-packages as ignored, and targets the public hunkdiff root package for versioning; "." is added to workspaces in package.json so changesets can discover the root package.
  • pr-ci.yml gains fetch-depth: 0 on the pr-validate checkout and a changeset status --since=origin/main step that blocks merge when no changeset fragment is present; the check is gated on code changes being detected.
  • AGENTS.md, CONTRIBUTING.md, .changeset/README.md are updated consistently to document the bun run changeset, bun run changeset -- --empty, and bun run release:version workflow.

Confidence Score: 4/5

Safe to merge; changes are limited to CI tooling, documentation, and configuration with no modifications to source code or tests.

The functional changes (workspace entry, changeset scripts, CI step) are straightforward and well-scoped. The only behavioral delta that could surprise contributors is that a code-changing PR now fails pr-validate immediately if no changeset fragment is present, which is intentional. The dot workspace addition is non-standard but is the correct pattern for changesets to version a root package.

package.json (workspace dot entry) and .github/workflows/pr-ci.yml (changeset step placement and gate logic) are worth a second look.

Important Files Changed

Filename Overview
.changeset/config.json New changesets config declaring the root package as the version target, with session-broker packages ignored; looks correct.
.changeset/chilly-diffs-dance.md Changeset fragment for this PR itself; targets hunkdiff at patch level, content is appropriate.
.changeset/README.md Documentation for the changeset workflow; accurate and consistent with the scripts added in package.json.
.github/workflows/pr-ci.yml Adds fetch-depth: 0 and a changeset status --since=origin/main enforcement step to pr-validate; check only runs on Ubuntu and only when code changes are detected.
package.json Adds "." to workspaces (needed for changesets to discover the root package) and three bunx-based changeset scripts pinned to @changesets/cli@2.31.0.
AGENTS.md Release instructions updated from manual CHANGELOG editing to the changeset workflow; accurate and consistent.
CHANGELOG.md Empty [Unreleased] section removed; the file now starts directly with the last released version, consistent with changesets managing future entries.
CONTRIBUTING.md Adds changeset workflow guidance for contributors; content is accurate and matches other documentation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    PR[Pull Request opened/updated] --> CHANGES[changes job\ndetect-code-changes.sh]
    CHANGES -->|code_changed == false| SKIP[pr-validate skipped\nno changeset check]
    CHANGES -->|code_changed == true| PRVAL[pr-validate job\nUbuntu]
    CHANGES -->|code_changed == true| WIN[windows-compat job\nno changeset check]

    PRVAL --> CHECKOUT[checkout with fetch-depth=0]
    CHECKOUT --> INSTALL[bun install --frozen-lockfile]
    INSTALL --> CS[changeset status\n--since=origin/main]
    CS -->|exit 1 - no changeset| FAIL[❌ CI fails]
    CS -->|exit 0 - changeset found| FMT[format:check → lint → typecheck → tests → build]
    FMT --> PASS[✅ pr-validate passes]
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.github/workflows/pr-ci.yml:113-114
**Changeset check only enforced on Ubuntu runner**

The `windows-compat` job does not include the `Verify release-note changeset` step, so a PR that fails the changeset requirement would still show a green Windows job. This is probably fine since it's a process gate rather than a platform test, but it means CI won't surface a missing changeset on the Windows run path.

### Issue 2 of 2
package.json:26-29
**Root package listed as explicit workspace member**

Adding `"."` to `workspaces` is the correct way to make `hunkdiff` discoverable by changesets when the publishable package lives at the repo root. However, this is a non-standard entry — bun's workspace resolution must handle the root being listed both as the workspace host and as a member. If a future `bun install` or `bun update` run produces unexpected peer-resolution loops or lock-file churn, this is the first place to investigate.

Reviews (1): Last reviewed commit: "chore(release): adopt changesets" | Re-trigger Greptile

Comment thread .github/workflows/pr-ci.yml Outdated
Comment on lines +113 to +114
- name: Verify release-note changeset
run: bun run changeset:status -- --since=origin/main

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 Changeset check only enforced on Ubuntu runner

The windows-compat job does not include the Verify release-note changeset step, so a PR that fails the changeset requirement would still show a green Windows job. This is probably fine since it's a process gate rather than a platform test, but it means CI won't surface a missing changeset on the Windows run path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/pr-ci.yml
Line: 113-114

Comment:
**Changeset check only enforced on Ubuntu runner**

The `windows-compat` job does not include the `Verify release-note changeset` step, so a PR that fails the changeset requirement would still show a green Windows job. This is probably fine since it's a process gate rather than a platform test, but it means CI won't surface a missing changeset on the Windows run path.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved the changeset validation into its own Release-note changeset job with a full checkout, so the process gate is surfaced independently instead of being buried in the Ubuntu smoke job or duplicated in Windows.

This comment was generated by Pi using OpenAI GPT-5

Comment thread package.json
Comment on lines 26 to 29
"workspaces": [
".",
"packages/*"
],

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 Root package listed as explicit workspace member

Adding "." to workspaces is the correct way to make hunkdiff discoverable by changesets when the publishable package lives at the repo root. However, this is a non-standard entry — bun's workspace resolution must handle the root being listed both as the workspace host and as a member. If a future bun install or bun update run produces unexpected peer-resolution loops or lock-file churn, this is the first place to investigate.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 26-29

Comment:
**Root package listed as explicit workspace member**

Adding `"."` to `workspaces` is the correct way to make `hunkdiff` discoverable by changesets when the publishable package lives at the repo root. However, this is a non-standard entry — bun's workspace resolution must handle the root being listed both as the workspace host and as a member. If a future `bun install` or `bun update` run produces unexpected peer-resolution loops or lock-file churn, this is the first place to investigate.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Kept the root workspace entry because Changesets needs it to discover the publishable root hunkdiff package, and added a note in .changeset/README.md documenting that it is intentional.

This comment was generated by Pi using OpenAI GPT-5

@benvinegar benvinegar force-pushed the changesets-adoption branch from 35d79cf to f2edd00 Compare June 13, 2026 15:54
@benvinegar benvinegar force-pushed the changesets-adoption branch from f2edd00 to 4d5e5a5 Compare June 13, 2026 20:50
@benvinegar benvinegar merged commit 48b97ac into main Jun 13, 2026
9 checks passed
@benvinegar benvinegar deleted the changesets-adoption branch June 13, 2026 20:55
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