Skip to content

feat(validation): add published-history release-plan checks (P-035, P-036)#347

Merged
hdamker merged 1 commit into
camaraproject:mainfrom
hdamker:feat/release-plan-published-history
Jun 19, 2026
Merged

feat(validation): add published-history release-plan checks (P-035, P-036)#347
hdamker merged 1 commit into
camaraproject:mainfrom
hdamker:feat/release-plan-published-history

Conversation

@hdamker

@hdamker hdamker commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

enhancement/feature

What this PR does / why we need it:

Adds two release-plan validation rules that check release-plan.yaml against the
repository's published release history, so version/status/tag mistakes are caught at
PR time and before /create-snapshot instead of during release review.

  • P-035 — repository-level published-history consistency. Flags a missing tag for
    an active release type, a published tag whose API entries were changed without a
    bump, a tag regression, a cycle opened with no previous cycle, and a release that
    declares no new API content. It is silent for a parked target_release_type: none
    plan on a PR that does not touch release-plan.yaml, and reports a pre-existing
    condition on unrelated PRs with a suggestion to fix it in a dedicated release-plan
    PR.
  • P-036 — per-API terminal published version/status. Once an API version is
    published in a public or maintenance release, that version cannot reappear with a
    different status (e.g. an already-public 1.1.0 declared alpha). This is an
    invariant, so it applies regardless of target_release_type.

Which issue(s) this PR fixes:

Part of #232. The issue tracks several rule families; content-drift and
maintenance-release rules remain follow-up work, so this PR does not close it.

Special notes for reviewers:

  • Offline by design: a workflow step resolves published releases into a compact
    release-history JSON (release_history_path / VALIDATION_RELEASE_HISTORY_PATH),
    resolved on both the PR and /create-snapshot paths, so the Python orchestrator makes
    no GitHub calls. It runs whenever release-plan.yaml is present (not only when it
    changed) — which is what lets the rules surface pre-existing conditions on unrelated
    PRs — and partial history runs tag-only checks while skipping metadata-dependent
    conclusions.
  • New rule IDs P-035 and P-036; both carry release_plan_check_only_safe: true so they
    survive release-plan-only dependency-advance PRs.
  • Validated with the full validation test suite and end-to-end against a test repo:
    duplicate / stale / regressing plans fail as expected, a parked none plan passes,
    and /create-snapshot gates before snapshot creation on a P-036 condition.

Changelog input

release-note
Add release-plan published-history validation: P-035 (repository-level history consistency) and P-036 (per-API terminal published version/status lock).

Additional documentation

This section can be blank.

docs

…-036)

Add two release-plan validation rules backed by a workflow-resolved published
release-history snapshot, keeping the Python orchestrator offline (GitHub access
stays in the workflow layer).

- P-035 (repository-level): required tag for active release types, published-tag
  mismatch, tag regression, missing previous cycle, and "no new API content".
  Silent for an untouched target_release_type: none plan; reports a pre-existing
  condition on unrelated PRs with a dedicated-release-plan-PR suggestion.
- P-036 (per-API): a published version's status is terminal, so an already-public
  API version cannot reappear with a non-public status. Fires regardless of
  release type.

A resolver step writes a compact release-history JSON consumed via
VALIDATION_RELEASE_HISTORY_PATH; the PR and pre-snapshot (/create-snapshot) paths
both resolve it. Partial history runs tag-only checks and skips metadata-dependent
conclusions rather than failing.

Part of camaraproject#232.
@hdamker hdamker requested review from Kevsy and rartych as code owners June 18, 2026 13:14

@rartych rartych left a comment

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.

LGTM

@hdamker hdamker merged commit 67ebe0e into camaraproject:main Jun 19, 2026
8 checks passed
@hdamker hdamker deleted the feat/release-plan-published-history branch June 19, 2026 10:32
@hdamker hdamker mentioned this pull request Jun 19, 2026
12 tasks
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