This document outlines the standard operating procedure for moving changes from
feature branches to develop, promoting release candidates to main, and
publishing new versions or hotfixes for the pqcrypto package.
Use develop as the integration branch and main as the publishable release
branch.
- Create feature and fix branches from the latest
develop. - Open feature PRs into
develop; do not targetmainfor ordinary work. - Keep each PR small enough to review for cryptographic correctness, tests, claim wording, package hygiene, and web portability.
- Promote
developtomainonly through a release PR after release preparation and full validation pass. - Create release tags only from the exact commit on
mainthat was published to pub.dev.
Repository administrators should protect both develop and main with:
- pull requests required before merging;
- required status checks for CI, web tests, OpenSSL interop, and CodeQL;
- branches required to be up to date before merging, or a merge queue when PR volume justifies it;
- stale review dismissal when a PR changes after approval; and
- direct pushes limited to documented emergency branch alignment or maintainer break-glass operations.
Prepare releases on a release branch from develop.
git fetch origin
git switch develop
git merge --ff-only origin/develop
git switch -c release/vX.Y.ZIf main received a hotfix after the release branch was created, merge or
rebase the hotfix back through develop first, then refresh the release branch.
- Update
pubspec.yaml: Bump theversionfield to the target release version (e.g.,0.4.0or0.3.1) following Semantic Versioning. - Update
CHANGELOG.md:- Fold all items under
## Unreleasedinto a new section named## X.Y.Z(matching the version inpubspec.yaml). - Add a blank
## Unreleasedsection at the top for future development. - Categorize changes into
### Added,### Changed,### Fixed, and### Security.
- Fold all items under
Run the full validation suite before opening the release PR.
# 1. Formatting and static analysis
dart format --output=none --set-exit-if-changed .
dart analyze
# 2. Focused KAT evidence
dart test test/kat_evaluator_test.dart
dart test test/mldsa_kat_test.dart
# 3. Full VM suite
dart test
# 4. Web compiler checks
dart test -p chrome
dart test -p chrome --compiler dart2wasmVerify that the package layout is correct and no extraneous files are included.
dart pub publish --dry-run- Ensure the Total compressed archive size is reasonable.
- Ensure there are 0 warnings.
- Check that development artifacts (e.g.,
.github/,.vscode/, AI configuration files likeAGENTS.md,CLAUDE.md) are properly excluded via.pubignore.
Once validation passes, commit the release hygiene changes on the release branch
and open a PR into develop.
# Commit the version bump and changelog
git add pubspec.yaml CHANGELOG.md
git commit -m "chore: prepare pqcrypto X.Y.Z release"
git push origin release/vX.Y.ZRelease PR requirements:
- target branch is
develop; - CI, web tests, OpenSSL interop, CodeQL, and publish dry run are green;
CHANGELOG.md,pubspec.yaml,README.md, and relevantdoc/files agree on version and evidence wording;- the PR description states the exact validation commands and results; and
- release notes maintain the strict claim boundary.
After the release PR lands in develop, open a promotion PR from develop to
main. The promotion PR should contain only the reviewed release candidate
delta. Do not publish from develop.
Note: Maintain the strict claim boundary in release notes. Do not claim "FIPS 140 Validated" or "CMVP Certified". Use terms like "FIPS 203/204 aligned" and "byte-exact against the checked-in KAT corpus".
After the promotion PR lands, publish from a clean local checkout of main.
git fetch origin
git switch main
git merge --ff-only origin/main
# Confirm the release commit before tagging or publishing.
git rev-parse HEAD
# Re-run the package publication gate from main.
dart pub publish --dry-run
# Publish to pub.dev
dart pub publish
# Create an annotated tag with release notes on the main release commit.
git tag -a vX.Y.Z -m "Release pqcrypto X.Y.Z
- Summary of feature 1
- Summary of feature 2
- Bug fixes"
git push origin vX.Y.ZThe tag and pub.dev package must refer to the same main commit. If the dry
run reports warnings, stop and fix them through the PR flow instead of editing
main directly.
- GitHub Release: Create a GitHub release from the pushed tag. Copy the
relevant section from
CHANGELOG.mdas the release description. - Verify Pub.dev: Check pub.dev/packages/pqcrypto to ensure the new version is live, the score is 130/130, and the README renders correctly.
- Verify branch state: Confirm
maincontains the tagged release commit anddevelopcontains the same release commit. Ifdevelophas moved on, record that expected divergence in the release notes or tracking issue. - Resume development: New work continues from
developafter the release commit is present there.
For critical bugs or security vulnerabilities found in a production release:
- Branch from
mainor the tag: Ifmainhas moved forward, checkout the affected release tag and branch from it:git checkout -b hotfix/vX.Y.Z-patch vX.Y.Z. - Apply the fix: Write the minimal code needed to fix the issue. Add a regression test.
- Bump the patch version: E.g.,
0.3.0->0.3.1. UpdateCHANGELOG.md. - Test and Dry Run: Run
dart format --output=none --set-exit-if-changed .,dart analyze,dart test, focused KAT tests, web tests, anddart pub publish --dry-run. - Hotfixes:
- For the current active release: Open a hotfix PR directly to
main. Once merged intomain, the changes must be immediately forward-ported back intodevelopto ensure environment parity. - For older/legacy releases: Do not PR directly to
main. Instead:- Branch off the relevant release tag (e.g.,
support/v0.3.xorhotfix/v0.3.2). - Apply the fix and publish the release directly from that dedicated support/hotfix branch.
- Cherry-pick or forward-port the fix into
develop(andmainif applicable) to ensure the bug doesn't resurface in newer versions.
- Branch off the relevant release tag (e.g.,
- For the current active release: Open a hotfix PR directly to
- Tag and Publish: Follow the tag and publish process above using the new patch version tag.
- Backport to
develop: Open a PR frommainor a backport branch intodevelopimmediately so the fix is not lost in future releases.