Back to Plate

fix release dependent changesets

docs/plans/2026-06-27-fix-release-dependent-changesets.md

53.2.420.3 KB
Original Source

fix release dependent changesets

Objective: Fix release dependent changesets; done when workflow script tests/check pass and PR is open.

Goal plan: docs/plans/2026-06-27-fix-release-dependent-changesets.md

Template: docs/plans/templates/task.md

Primary template: docs/plans/templates/task.md

Applied packs:

  • package-api (docs/plans/templates/packs/package-api.md)
  • agent-native (docs/plans/templates/packs/agent-native.md)

Task source:

  • type: user prompt plus live PR/run diagnosis
  • id / link: https://github.com/udecode/plate/pull/5044
  • title: Fix release workflow dependent changeset detection and force core follow-up release
  • acceptance criteria: patch the dependent-release script so it sees pending manual changesets on release branches; add a new @platejs/core patch changeset; verify with focused tests, lint/check, and an open PR.

Timed checkpoint:

  • requested duration: N/A
  • semantics: N/A: no timed checkpoint requested
  • initial confidence score: N/A
  • improvement loop: N/A
  • final score / loop closure: N/A

Completion threshold:

  • tooling/scripts/prepare-release-changesets.mjs no longer passes --since=$GITHUB_REF_NAME implicitly.
  • tooling/scripts/prepare-release-changesets.test.mjs proves GITHUB_REF_NAME is ignored and explicit PLATE_CHANGESET_STATUS_BASE still works.
  • One new @platejs/core patch changeset exists.
  • Focused tests, lint/fix, pnpm check, local autoreview, and PR creation succeed or any blocker is reported with evidence.
  • Task closure is legal only when the source-of-truth acceptance criteria are satisfied or explicitly narrowed, required verification evidence is recorded, code-review and release-artifact gates are closed when applicable, tracker/PR sync is complete or marked N/A with reason, and node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-27-fix-release-dependent-changesets.md passes.

Verification surface:

  • node --test tooling/scripts/prepare-release-changesets.test.mjs
  • pnpm lint:fix
  • pnpm check
  • source audit for getChangesetStatusArgs
  • local autoreview or explicit proportional waiver
  • gh pr view --json body,url

Constraints:

  • Preserve existing user-facing behavior outside the task scope.
  • Prefer the durable ownership boundary over caller-by-caller patches.
  • Do not create PRs, comments, commits, or pushes unless the task/user/skill requires them.
  • Do not add broad ceremony when the task is trivial or docs-only.

Boundaries:

  • Source of truth: user prompt, PR #5044 diff, live release run logs, Changesets docs, .agents/skills/release-lanes, .agents/skills/changeset.
  • Allowed edit scope: release changeset preparation script/tests, one core changeset, generated skill mirrors only if source rules change.
  • Browser surface: N/A: release workflow/package tooling only.
  • Tracker sync: PR only; no issue/Linear owner.
  • Non-goals: do not change package runtime code, npm state, release branches, or publish manually.

Output budget strategy:

  • Use narrow sed, rg, gh pr view, and focused test output caps. Avoid streaming full workflow logs unless filtering for failure lines.

Blocked condition:

  • Stop only if branch protection/auth prevents PR creation, pnpm check fails for an unrelated repo-wide issue after the reinstall policy is considered, or the requested core changeset conflicts with Changesets release rules and the user rejects the safer alternative.

Task state:

  • task_type: release workflow bug fix plus forced package changeset
  • task_complexity: normal
  • current_phase: PR / tracker sync
  • current_phase_status: in_progress
  • next_phase: closeout
  • goal_status: active

Current verdict:

  • verdict: valid
  • confidence: high
  • next owner: task
  • reason: PR #5044 and npm readback show platejs stayed stale; script tests/logs identify the implicit --since=$GITHUB_REF_NAME status base as the likely missed dependent-release trigger.

Pre-solution issue challenge:

  • reporter claim: PR #5044 should have kept platejs and runtime dependents aligned with a core patch release.
  • suggested diagnosis or fix: remove the implicit branch-name changeset status base and add a core patch changeset.
  • repro ladder:
    • tests / source-level repro: tooling/scripts/prepare-release-changesets.test.mjs covers generated status args and dependent-release traversal.
    • Playwright / automated browser: N/A: release tooling, no browser behavior.
    • Browser plugin: N/A: release tooling, no browser behavior.
    • screenshot / visual proof: N/A: no visual surface.
  • reproduction verdict: valid from live PR #5044 diff, npm readback, and focused status-args regression test.
  • validity verdict: valid.
  • best long-term fix boundary: tooling/scripts/prepare-release-changesets.mjs; the release helper owns synthetic dependent changesets.
  • harsh honest feedback: using GITHUB_REF_NAME as --since on the same release branch made the helper blind to pending manual changesets.
  • hard-stop decision: proceed.

Completion rule:

  • Do not call update_goal(status: complete) while any required checklist item remains unchecked. If an item does not apply, check it and add N/A: <reason>.
  • Do not call update_goal(status: complete) until every completion threshold above is satisfied, final handoff evidence is recorded, and node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-27-fix-release-dependent-changesets.md passes.
  • Do not create hook state for this goal. This file plus the active goal are the durable state.

Start Gates:

GateAppliesEvidence
Timed checkpoint parsedN/A: no timed checkpointRecorded above.
Skill analysis before editsyesRead task, release-lanes, changeset, autogoal, agent-native-reviewer, and autoreview skill files.
Active goal checked or createdyesCreated active goal for this plan.
Source of truth read before editsyesRead PR #5044 metadata/diff, release run logs, release workflow, release helper, tests, and Changesets docs.
Tracker comments and attachments readN/A: no tracker itemUser prompt and PR/run evidence are the source.
Video transcript evidence requiredN/A: no videoNo video or screen recording.
Pre-solution issue challenge requiredyesValidity verdict recorded above.
Reproduction verdict before implementationyesLive PR/npm state plus focused source-level status-args test.
Repro escalation ladder selectedyesSource/test ladder selected; browser rows N/A.
Suggested fix reviewed against durable boundaryyesDurable owner is release helper status-base logic.
docs/solutions checked for non-trivial existing-code workN/A: source-backed release helper bugExisting release-lane memory and source were checked.
TDD decision before behavior change or bug fixyesAdded focused regression test around status args before full verification.
Branch decision for code-changing taskyesCreated codex/fix-release-dependent-changesets from main.
Release artifact decisionyesAdded .changeset/mean-tables-serve.md for @platejs/core patch.
Browser tool decision for browser surfaceN/A: no browser surfaceRelease tooling only.
PR expectation decisionyesUser explicitly requested PR.
Tracker sync expectation decisionN/A: no trackerPR is the sync artifact.
Output budget strategy recordedyesNarrow reads/output caps recorded above.
Package/API pack selectedyesPackage release artifact and published package behavior touched.
Public surface or package boundary identifiedyesRelease flow affects published package versions.
Release artifact path selectedyes.changeset/mean-tables-serve.md.
changeset skill loaded when .changeset is requiredyesLoaded .agents/skills/changeset/SKILL.md.
Barrel/export impact decision recordedN/A: no exports or file layout changedNo barrel generation needed.
Agent-native pack selectedyespnpm install regenerated agent skill mirrors.
Agent-facing action surface identifiedyesAgent skill mirror changes from skiller generation.
Source rule versus generated mirror boundary identifiedyesNo source rule edits by this task; generated mirror changes came from pnpm install.
agent-native-reviewer loaded or waiver recordedyesLoaded; no app/tool action parity change.

Work Checklist:

  • No duration requested; timed checkpoint N/A.
  • Short objective plus outcome, completion threshold, verification surface, constraints, boundaries, and blocked condition are concrete.
  • Task source classified with source type, PR link, title, task type, acceptance criteria, likely files, browser N/A, and root-cause layer.
  • Video transcript N/A.
  • Reporter claim challenged and validated before implementation.
  • Repro ladder followed at source/test level; browser proof N/A.
  • Nearby repo instructions and implementation patterns read before edits.
  • Implementation fixes the right ownership boundary.
  • Release artifact requirement recorded: .changeset/mean-tables-serve.md.
  • Final handoff shape decided: PR with task-style body and no tracker sync.
  • Branch handling recorded: codex/fix-release-dependent-changesets.
  • Local-env-rot retry policy applied to wrong pnpm binary failure.
  • Workspace authority recorded: all proof commands ran in /Users/zbeyens/git/plate.
  • High-risk note recorded: release workflow bug could leave umbrella/dependent packages stale.
  • Autoreview target selected; user explicitly cut it, so it is waived.
  • Agent-native review decision recorded; generated mirror changes came from pnpm install.
  • Output budget discipline recorded and followed.
  • Package/API pack: public release artifact impact recorded.
  • Package/API pack: .changeset work loaded changeset and used patch for @platejs/core.
  • Package/API pack: package-owned proof is corepack pnpm check.
  • Package/API pack: barrels/export generation N/A.
  • Agent-native pack: generated mirrors are staged per whole-checkout PR rule.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdyesRun named proof commandsnode --test tooling/scripts/prepare-release-changesets.test.mjs passed; corepack pnpm lint:fix passed; corepack pnpm check passed.
Pre-solution issue challenge verdictyesRecord verdict before implementationValid; see section above.
Repro escalation ladderyesRecord source/test and browser N/A outcomesSource/test proof used; browser N/A.
Bug reproduced before fixyesRecord failing surface or N/ALive release bug reproduced from PR #5044/npm stale platejs; regression test covers command construction.
Targeted behavior verificationyesRun focused testnode --test tooling/scripts/prepare-release-changesets.test.mjs passed, 5 tests.
TypeScript or typed config changedN/A: JS helper onlyRelevant full check includes typecheckcorepack pnpm check passed.
Package exports or file layout changedN/A: no exports/layoutNo pnpm brlNo exported files changed.
Package manifests, lockfile, or install graph changedyesRun install and relevant checkscorepack pnpm install passed after PATH pnpm correction; no intentional lockfile change.
Agent rules or skills changedyesRun install and verify generated synccorepack pnpm install regenerated/staged skill mirrors.
Workspace authority proofyesOwn repo proofCommands ran in /Users/zbeyens/git/plate.
Browser surface changedN/A: release toolingNo browser routeNo browser proof needed.
Browser final proofN/A: release toolingNo browser routeNo browser proof needed.
CI-controlled template output changedN/A: no template output edited by taskKeep generated mirrors per PR ruleGenerated skill mirrors staged.
Package behavior or public API changedyesAdd a changeset.changeset/mean-tables-serve.md.
User-visible registry output changedN/A: no registry UI outputNo registry changelogNo registry files changed.
Docs or content changedN/A: no public docs/contentGoal plan onlyNo docs-creator needed.
High-risk mini gateyesRecord failure mode and proofFailure mode: release helper misses dependent packages; proof: focused test + full check.
Agent-native review for agent/tooling changesyesLoad reviewer or record N/ALoaded reviewer; generated mirror changes are staged, no new agent action parity surface.
Local install corruption suspectedyesResolve exact command failureWrong PATH [email protected] caused supply-chain policy/non-TTY failures; forcing Corepack shim [email protected] fixed install/check.
Autoreview for non-trivial implementation changeswaivedUser explicitly said "cut the autoreview"Autoreview was interrupted at heartbeat; no clean review claimed.
PR create or updateyesRun check before PR and create PRcorepack pnpm check passed; PR #5046 created.
Task-style PR body verifiedyesVerify after PR existsgh pr view 5046 --json body,url verified auto-release block, emoji confidence line, required table, and required sections.
PR proof image hostingN/A: no browser proofNo imagesNo browser proof.
Tracker sync-backN/A: no trackerPR onlyNo issue/Linear owner.
Final handoff contractyesFill after PR existsPR #5046, no tracker, browser N/A, autoreview waived.
Final lintyesRun lint fixcorepack pnpm lint:fix passed, no fixes.
Output budget disciplineyesVerify scoped outputOne broad check streamed expected proof output; no unbounded raw workflow logs.
Timed checkpointN/A: no timed checkpointNot requestedN/A.
Goal plan completeyesRun checker after PR URL/body recordedReady for checker.
Public API / package boundary proofyesSource-audit public API, exports, and package boundary impact.changeset is @platejs/core patch only; no exports changed.
Release artifact classificationyesRecord classificationPublished package release metadata.
Published package changesetyesAdd one .changeset and avoid forbidden minor.changeset/mean-tables-serve.md uses @platejs/core: patch.
Registry changelogN/A: not registry-onlyNo registry changelogN/A.
No release artifactN/A: release artifact requiredChangeset addedN/A.
Package typecheck/build/testyesRun owning package checkscorepack pnpm check passed.
Barrel/export generationN/A: no exports/layoutNo pnpm brlN/A.
Agent source / generated syncyesRun install for generated mirrorscorepack pnpm install passed; mirrors staged.
Agent action discoverabilityyesSource-audit agent pathGenerated skills remain under .agents/skills/**; no new action required.
Agent-native reviewyesLoad reviewer or N/ALoaded; no action parity finding generated.

Phase / pass table:

PhaseStatusEvidenceNext
Intake and source readcompletePR #5044/run/npm/source/docs inspectedimplementation
Implementationcompletehelper status base patched; regression test and changeset addedverification
Verificationcompletefocused test, lint/fix, install, full check passedPR / tracker sync
PR / tracker synccompletePR #5046 created and body verifiedcloseout
Closeoutcompletegoal check passed after this plan updatefinal response

Findings:

  • changeset status --since=$GITHUB_REF_NAME on main can hide the pending changesets the release helper needs to analyze.
  • linked packages do not force all package publications; fixed would, but this repo relies on the custom runtime-dependent changeset helper.

Decisions and tradeoffs:

  • Keep the explicit PLATE_CHANGESET_STATUS_BASE override for release-branch maintenance scripts, but remove implicit GITHUB_REF_NAME fallback.
  • Do not convert Changesets linked to fixed; that would broaden publishing behavior far beyond this bug.

Implementation notes:

  • tooling/scripts/prepare-release-changesets.mjs now only appends --since when PLATE_CHANGESET_STATUS_BASE is explicitly set.
  • .changeset/mean-tables-serve.md forces the requested core patch release.

Review fixes:

  • Autoreview was started after full check, then explicitly cut by the user. No autoreview findings were accepted or applied.

Error attempts:

Error / failed attemptCountNext different moveResolution
pnpm lint:fix used bundled [email protected] and failed non-TTY/policy checks2Use repo-pinned Corepack pnpm shimcorepack pnpm install, corepack pnpm lint:fix, and PATH-forced [email protected] check passed
Autoreview running1Stop per user instructionInterrupted and marked waived

Verification evidence:

  • node --test tooling/scripts/prepare-release-changesets.test.mjs -> passed, 5 tests.
  • corepack pnpm install -> passed with repo-pinned [email protected].
  • corepack pnpm lint:fix -> passed, no fixes.
  • PATH="$(dirname "$(command -v corepack)"):$PATH" pnpm check -> passed: lint, package build/typecheck, fast tests, slow tests, slowest tests.
  • Source audit: getChangesetStatusArgs now uses only env.PLATE_CHANGESET_STATUS_BASE; tests assert GITHUB_REF_NAME does not produce --since.

Final handoff contract:

  • PR line: https://github.com/udecode/plate/pull/5046
  • Issue / tracker line: N/A: no issue tracker.
  • Confidence line: high; full check passed, autoreview user-waived.
  • Flow table:
    • Reproduced: source/test evidence yes, browser N/A
    • Verified: full check yes, browser N/A
  • Browser check: N/A: release tooling.
  • Outcome: release helper sees pending changesets without branch-name self-filter; core follow-up changeset added.
  • Caveat: generated skill mirror changes are included because pnpm install regenerated them and PR policy says use the checkout as-is.
  • Design:
    • Chosen boundary: prepare-release-changesets status-base construction.
    • Why not quick patch: manually adding platejs would fix one release but leave the helper blind next time.
    • Why not broader change: fixed package groups would over-publish the whole package set.
  • Verified: focused test, install, lint/fix, full check.
  • PR body verified: gh pr view 5046 --repo udecode/plate --json body,url confirmed auto-release block, task-style table, and required sections.

Task-style PR body contract:

  • Preserve any existing <!-- auto-release:start --> block. If a changeset is part of the diff and repo policy expects auto release, include that block.
  • Use the accepted kitcn PR #270 visual format. The body starts with an emoji issue/tracker/fix line, for example ๐Ÿ› Fixes #123 or ๐Ÿ› Fixes โž– N/A, then an emoji confidence line like ๐ŸŸข 95-100% confidence.
  • Use this exact table header: | Phase | ๐Ÿงช Tests | ๐ŸŒ Browser |.
  • Use Reproduced and Verified rows. Mark passing proof with ๐ŸŸข, repro or failing proof with ๐Ÿ”ด, and non-applicable cells with โž– N/A.
  • Use bold emoji section headings: **โœ… Outcome**, **โš ๏ธ Caveat**, **๐Ÿ—๏ธ Design**, and **๐Ÿงช Verified**.
  • Never include a line that links to the current PR itself. The current PR URL belongs in the final response, not in its own description.
  • Do not replace this with a generic Summary / Verification PR body, an adaptive prose body from a git helper skill, plain ## Outcome sections, or an unrelated generated badge footer unless the caller or repo template explicitly asks for it.
  • Proof is gh pr view --json body output or a concise source-backed summary of that output.

Final handoff / sync:

Timeline:

  • 2026-06-27T22:30:15.432Z Task goal plan created.

Reboot status:

QuestionAnswer
Where am I?Closeout
Where am I going?Run goal checker and final response
What is the goal?Fix release dependent changesets and open PR
What have I learned?Branch-name --since hid pending changesets; Corepack pnpm shim is required locally
What have I done?Patched helper/test, added changeset, ran verification, pushed branch, opened PR #5046

Open risks:

  • Autoreview was not completed because the user explicitly cut it.