-
Notifications
You must be signed in to change notification settings - Fork 3
docs(branching): codify trunk-based Option A workflow #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ Requirements: | |
| - **Node 18 or newer** for the npm wrapper smoke (`node --version`). | ||
| - macOS arm64, macOS x64, Linux x64, or Linux arm64. Windows local development is not currently supported (the npm wrapper and binaries are Unix-only). | ||
|
|
||
| The full offline test suite runs in under 30 seconds on a recent machine and should report `3395 pass / 0 fail / 2 skip` against `main`. The two skipped tests are the opt-in live-provider tests described below. | ||
| The full offline test suite runs in under 30 seconds on a recent machine and should report `3750+ pass / 0 fail` against `main` (the pass count grows as suites are added; the 2 skipped tests are the opt-in live-provider tests described below). | ||
|
|
||
| ## Test discipline | ||
|
|
||
|
|
@@ -78,15 +78,21 @@ Common scopes: `readme`, `providers`, `gates`, `cli`, `demo`, `package`, the mil | |
| - **No squash-commit messages with raw model output.** Edit the message before committing. | ||
| - **No secret material** (API keys, tokens, customer data, internal hostnames) anywhere in the diff or message. | ||
|
|
||
| ### Branch naming | ||
| ### Branching and merge workflow | ||
|
|
||
| - `feat/<scope>-<topic>` for new features | ||
| - `fix/<scope>-<topic>` for bug fixes | ||
| - `refactor/<scope>-<topic>` for refactors | ||
| - `docs/<scope>-<topic>` for docs-only changes | ||
| - `test/<scope>-<topic>` for test-only additions | ||
| The repo is **trunk-based** (locked 2026-05-29). `main` is the protected trunk; everything else is a short-lived branch. | ||
|
|
||
| `main` is tag-only. Pushes to `main` happen at release time. | ||
| - Branch from the latest `main`: `git fetch origin && git switch -c feat/<slug> origin/main`. Never branch from another topic branch. | ||
| - Prefixes: `feat/`, `fix/`, `refactor/`, `test/`, `docs/`, `chore/`. After the slash, a short kebab-case slug, optionally issue-scoped: `fix/123-worktree-reset-on-restart`. | ||
| - One branch = one PR = one concern. If a branch grows a second concern, cut a second branch. | ||
| - Open the PR the same session and keep branches short-lived. On merge the branch **auto-deletes** — do not delete it by hand. | ||
| - Never push `worktree-*` scratch branches; git worktrees stay local. | ||
|
|
||
| **Merging.** PRs **squash-merge** into `main` (merge commits and rebase-merge are disabled), so one PR becomes exactly one conventional commit on `main`. The PR title is the squash commit subject, so it must be Conventional-Commit form. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| **`main` is protected.** Required status checks (`bun test on ubuntu-latest`, `bun test on macos-latest`), strict/up-to-date, linear history, no force-push, no deletion, PR-before-merge — enforced for everyone including admins. There are no direct pushes to `main`. | ||
|
|
||
| **Releases.** Annotated SemVer tags (`vX.Y.Z-alpha.N`) on a green `main` commit, cut behind a `chore/release-*` PR (version bump + CHANGELOG) so the bump itself passes CI. One tag per release; tags are never moved. | ||
|
|
||
| ## Pull request expectations | ||
|
|
||
|
|
@@ -121,7 +127,7 @@ When adding a new provider adapter or modifying an existing one: | |
| - A maintainer triages within a few days. Triage adds labels and may ask for clarification. | ||
| - Substantive PRs get a Codex review pass (see above). The review verdict is recorded in the PR conversation. | ||
| - Block-push findings close in a follow-up commit on the PR branch before merge. | ||
| - The merge strategy is squash-merge to `finalize/<release>` branches or rebase to feature branches. `main` only receives release tags. | ||
| - The merge strategy is **squash-merge into `main`**; the head branch auto-deletes on merge. Release tags are cut on `main` behind a `chore/release-*` PR (see "Branching and merge workflow"). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ## Code of conduct | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference to the branching and merge workflow in
CONTRIBUTING.mdis plain text. Consider making it a clickable Markdown link to improve readability and navigation:Full contract: [Branching and merge workflow](CONTRIBUTING.md#branching-and-merge-workflow).