Skip to content

docs(spec): schedule a minor before its breaking work lands (AST-017 FR46-FR50, DEC-15) - #6888

Merged
cixzhang merged 1 commit into
mainfrom
spec-release-target-gate
Oct 2, 2026
Merged

cixzhang merged 1 commit into
mainfrom
spec-release-target-gate

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Rewritten. An earlier revision of this PR derived the target from the pending Changesets and carried a frozen minor-plan schema with cleanup and lifecycle ids. Both are gone. The rule is now two states and one tiny file. History is preserved in the force-pushed commits.

Exact decision needed

May an incompatible change enter main when the release it ships in is a patch, and what decides that?

Today nothing answers it at merge time. spec:AST-017 FR31 and FR37 require an owner-approved plan before a removal ships, but both are evaluated by the release owner at freeze. When a [breaking] Changeset merged, no check consulted them.

That matters because the publishable packages are a fixed group: one [breaking] Changeset moves all ten packages to a new minor. So a single merge could change the shape of the release, and the owner would find out at cut time. That is exactly what happened before #6887.

Existing authority searched

  • spec:AST-017 (authority: current, this record) — the canonical owner of "compatibility classification, lifecycle state, release-pair delta classes, and the evidence that admits them". An admission gate is that, so this extends the existing owner rather than creating a record, per AGENTS.md.
  • FR7 (0.x tiering), FR28 (replacement-first deprecation), FR31 (one-to-one cleanup), FR37 (minor plan and freeze) — all reconciled, none restated or re-enforced here.
  • spec:AST-042, architecture:cli-surface, spec:AST-030 — own CLI admission and CI lane routing; untouched.
  • scripts/release/active-release.mjs — I checked whether an authoritative release-intent mechanism already existed before proposing one. It keeps .release/active.json and .release/plan.json, but those are written at cut time and exist only on a release/v* branch; .release/ is untracked on main. There is no existing main-resident release-intent mechanism.
  • Open PRs and issues searched for release target, minor target, breaking change, deprecation lifecycle: nothing covers this, and no other open PR edits AST-017.

Decision

FR46–FR50, plus DEC-15. Two states:

state incompatible work
main targets a patch (the default) refused
an owner has scheduled a minor may land
  • FR46 — main targets a patch by default. No file, no ceremony, no per-change approval; it is simply what main is for.
  • FR47 — a minor is scheduled explicitly by an owner, before its breaking work lands, naming the version and the day. Pending Changesets MUST NOT switch the mode — a [breaking] entry waiting to merge is the work the mode governs, never evidence for it. Schedule first, then land.
  • FR48 — under the patch default, [breaking], planned-removal, and incompatible-fix are refused; FR28's replacement-first deprecation is the route. Explicitly scoped: "This gate decides patch-versus-minor admission and nothing else."
  • FR49 — the schedule fails closed: malformed, carrying extra fields, naming a version that is not the minor successor of the published version, a day that has passed, or published versions that disagree. Main stays on its patch default rather than inheriting a mode from an untrustworthy input.
  • FR50 — returning to the patch default is ordinary post-release cleanup needing no approval of its own, and a rejection names the target and both ways forward.

Rejected alternatives

Recorded in DEC-15:

  • Deriving the mode from the pending Changesets. Reads as elegant — the bumps already imply a version — but it is circular: the entry being judged would be its own authorization. (This is what the earlier revision of this PR did.)
  • A per-change authorization record enumerating each approved removal with cleanup and lifecycle ids. It answers a question this gate is not asking, and buys accuracy at the cost of bureaucracy on every breaking change, when a scheduled day is enough to stop the accident. (Also in the earlier revision; removed.)
  • An open-ended schedule. With no date it would outlive its release and quietly hold main in minor mode.

Claim scope and non-goals

Governs only whether main is on a patch or a scheduled minor, and what that admits.

Out of scope and unchanged: the authoring vocabulary (no new Changeset tag; FR7's tiering stands), every lifecycle condition (FR28, FR31, FR32, FR37 apply on their own terms), whether any particular surface should be deprecated, CI job topology, and CLI command admission (spec:AST-042). The gate adds no per-change record, manifest, cleanup id, or second approval path.

The public Release Process wiki remains the operational authority and gets a concise update once this is accepted — not before, per this record's existing rule that operational projections link here and cannot create competing rules.

Evidence and implementation relationship

The failure this prevents, measured on real trees with npx changeset status:

tree result
main before #6887 — one [breaking] among 22 Changesets all ten bumped minor → 0.7.0
main @ ebd939b after #6887 all ten at patch → 0.6.5

One contributor's Changeset moved the whole release by a minor, with no plan and no owner decision. That is the gap FR46–FR50 close.

#6889 implements it. This record is valid without it — until it lands, maintainers apply these requirements in review, exactly as this record's Current-state impact already says for the rest of the lifecycle.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a review transcript or rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge — templates and records aligned
  • pnpm check:repo — passes
  • Prettier — applied via lint-staged
  • git diff --check — clean

One file changed, +105 lines (down from +144 in the earlier revision).

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 2, 2026 4:23pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 2, 2026
@astracat-bot

astracat-bot Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 2, 2026, 4:37 PM UTC

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

View Storybook for this PR · View Sandbox for this PR

Current run: The current change has no visual or preview-producing scope. Visual checks are not applicable; preview links are not shown.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot 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.

Thanks for recording this as an extension of the existing release-compatibility spec rather than a new record. The proposal is clear and well scoped: derive the release target from the fixed group's shared version and the pending Changesets, refuse incompatible work while that target is a patch, and point contributors to replacement-first deprecation or an owner-approved minor plan. I found no contradiction with the current cleanup, deprecation, or minor-planning rules, and no unrelated change bundled in.

Approval needs one maintainer decision first. The new admission rules are not settled by the current spec, and the decision is recorded as pending, so a spec owner needs to approve this exact proposal to establish those rules as governing authority, or say what should change. Once that decision is made, the follow-up implementation and its tests can be reviewed against the approved text.

[Automated review]

@cixzhang
cixzhang force-pushed the spec-release-target-gate branch from c27d817 to a58e8dd Compare October 2, 2026 16:09
@cixzhang cixzhang changed the title docs(spec): gate incompatible work on the derived release target (AST-017 FR46-FR52, DEC-15) docs(spec): schedule a minor before its breaking work lands (AST-017 FR46-FR50, DEC-15) Oct 2, 2026
@cixzhang

cixzhang commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec a58e8dd

@github-actions github-actions Bot added spec-auto-merge Auto-merge was enabled by the spec owner gate and removed needs:spec-owner-review Current knowledge records await owner approval labels Oct 2, 2026
The publishable packages are a fixed group, so one `[breaking]` Changeset
moves every package to a new minor. FR31 and FR37 already require an
owner-approved plan before a removal ships, but both are evaluated by the
release owner at freeze — nothing evaluated them when such a Changeset
merged into main. The release changed shape, and the owner found out at cut
time.

FR46-FR50 close that with the smallest rule that works:

- FR46 — main targets a patch by default. No file, no ceremony, no
  per-change approval; it is simply what main is for.
- FR47 — a minor is scheduled explicitly by an owner, naming the version
  and the day, BEFORE its breaking work lands. Pending Changesets must not
  switch the mode: the entry being judged cannot be its own authorization.
- FR48 — while main targets a patch, `[breaking]`, `planned-removal`, and
  `incompatible-fix` are refused, and FR28's replacement-first deprecation
  is the admissible route.
- FR49 — the schedule fails closed: malformed, carrying extra fields, a
  version that is not the minor successor of the published version, a day
  that has passed, or published versions that disagree. Main stays on its
  patch default rather than inheriting a mode from an untrustworthy input.
- FR50 — returning to the patch default is ordinary post-release cleanup,
  needing no approval of its own, and the refusal names the target and both
  ways forward.

Deliberately small. The statement carries a version and a date and nothing
else — no Changeset list, no lifecycle ids, no per-change manifest, no
second approval path. This gate answers one question, patch or scheduled
minor, and leaves every other requirement where it already lives: FR28's
deprecation lifecycle, FR31's cleanup mapping, FR37's release planning, and
ordinary spec and code review all continue on their own terms, neither
restated nor enforced here.

DEC-15 records the three rejected alternatives: deriving the mode from the
pending Changesets, which is circular; a per-change authorization record
with cleanup and lifecycle ids, which buys accuracy at the cost of
bureaucracy on every breaking change; and an open-ended schedule, which
would outlive its release and quietly hold main in minor mode.

Replaces the earlier derived-target draft of this record, which computed the
target from the pending bumps and carried a frozen-plan schema. Both are
gone: the mode is now set before the work, not inferred from it.

Specification change only. No published package changes, so no Changeset.

Test plan:
- `pnpm check:knowledge` — templates and records aligned
- `pnpm check:repo` — passes
@cixzhang
cixzhang force-pushed the spec-release-target-gate branch from a58e8dd to c3929a3 Compare October 2, 2026 16:18
@cixzhang

cixzhang commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec c3929a3

@astracat-bot astracat-bot Bot 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.

Thanks for extending the existing release-compatibility spec rather than adding a new record. The proposal is clear and well scoped: main targets a patch by default, a minor becomes available only when an owner schedules it, and incompatible work follows replacement-first deprecation until then. I found no unrelated change bundled in, and the refused categories line up with the classifications the current spec already defines.

The owner decision this needed is now recorded for this revision, so I am happy for this to proceed as the governing text. Enforcement and its tests can then be reviewed against the approved rules in the follow-up work, including keeping the existing narrow emergency path intact.

[Automated review]

@cixzhang
cixzhang merged commit 9830868 into main Oct 2, 2026
41 checks passed
@github-actions
github-actions Bot deleted the spec-release-target-gate branch October 3, 2026 06:24

This branch was successfully deployed

1 active deployment
Preview — c3929a31 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant