Skip to content

[Comgr] Document API versioning rule in AGENT_CONVENTIONS.md#3135

Merged
lamb-j merged 1 commit into
amd-stagingfrom
comgr/conventions-api-versioning
Jun 30, 2026
Merged

[Comgr] Document API versioning rule in AGENT_CONVENTIONS.md#3135
lamb-j merged 1 commit into
amd-stagingfrom
comgr/conventions-api-versioning

Conversation

@lamb-j

@lamb-j lamb-j commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an explicit API-versioning rule to amd/comgr/AGENT_CONVENTIONS.md (section 4, PR workflow): every commit that adds a public AMD_COMGR_API function must bump the minor version in VERSION.txt and tag the new prototype with a fresh AMD_COMGR_VERSION_X_Y macro.

This codifies the policy that surfaced when #3008 added amd_comgr_hotswap_rewrite_with_options under the already-used 3.3 version without bumping (fixed in its follow-up #3134).

The rule captures:

  • One bump per commit, not per function.
  • Never reuse the current version's macro for a new API in a later commit.
  • Don't wait for an official release to bump — we don't know which commit lands in each release, so the version advances when the API is introduced.
  • Add the symbol to exportmap.in under a version node matching the new tag.
  • check_api_consistency.py only enforces VERSION.txt >= the highest macro, so it cannot catch version reuse — verify the bump by hand.

Changes

  • AGENT_CONVENTIONS.md: add the "Bump the version when adding a public API" subsection.

Add an explicit rule to the PR-workflow section: every commit that adds
a public AMD_COMGR_API function must bump the minor version and tag the
new prototype with a fresh AMD_COMGR_VERSION_X_Y macro.

This codifies the policy that surfaced when #3008 added
amd_comgr_hotswap_rewrite_with_options under the already-used 3.3 version
without bumping. The rule notes the one-bump-per-commit model, that we
don't wait for a release to bump, and that check_api_consistency.py only
enforces a version floor (>=) so it cannot catch version reuse.

Changes:
- AGENT_CONVENTIONS.md: add "Bump the version when adding a public API"
  subsection under section 4 (PR workflow).
@lamb-j lamb-j requested a review from chinmaydd as a code owner June 30, 2026 22:41
@lamb-j lamb-j enabled auto-merge (squash) June 30, 2026 23:58
@lamb-j lamb-j disabled auto-merge June 30, 2026 23:58
@lamb-j lamb-j merged commit 292d25e into amd-staging Jun 30, 2026
26 checks passed
@lamb-j lamb-j deleted the comgr/conventions-api-versioning branch June 30, 2026 23:58
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.

2 participants