Back to Plate

changeset changelog github fallback

docs/plans/2026-06-30-changeset-changelog-github-fallback.md

53.3.115.9 KB
Original Source

changeset changelog github fallback

Objective: Fix release changelog GitHub fetch flake; done when fallback is tested, local release-version proof passes, rerun status is known, and plan check passes.

Goal plan: docs/plans/2026-06-30-changeset-changelog-github-fallback.md

Template: docs/plans/templates/task.md

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

Applied packs:

  • none

Task source:

  • type: GitHub Actions job URL from user
  • id / link: https://github.com/udecode/plate/actions/runs/28402211788/job/84156054337
  • title: ReleaseOrVersionPR Release and changelog failure after PR #5045 merge
  • acceptance criteria: identify the failing owner, rerun the failed workflow once, patch the durable release owner if rerun fails again, verify locally, and prepare a PR-ready fix.

Timed checkpoint:

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

Completion threshold:

  • Failed job logs identify the exact release failure.
  • .changeset/changelog-config.js does not abort release-version generation when GitHub metadata lookup fails.
  • Tests cover the failed GitHub info path.
  • Local pnpm check passes before PR creation.
  • Rerun status is recorded.
  • node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-30-changeset-changelog-github-fallback.md passes.

Verification surface:

  • gh run view / job logs for run 28402211788.
  • node --test .changeset/changelog-config.test.cjs.
  • node --test tooling/scripts/release-workflow.test.mjs.
  • pnpm lint:fix, git diff --check, and pnpm check.
  • PR body/readback after branch push.

Constraints:

  • Keep release behavior unchanged when GitHub info lookup succeeds.
  • Preserve existing changelog formatting: PR link suppresses commit link.
  • Do not add a package changeset for release tooling only.
  • Formal autoreview remains waived by the user's earlier instruction.

Boundaries:

  • Source of truth: GitHub Actions logs and current release workflow/changelog config.
  • Allowed edit scope: .changeset/changelog-config.js, .changeset/changelog-config.test.cjs, this plan, and PR metadata.
  • Browser surface: N/A; release tooling only.
  • Tracker sync: GitHub PR for the fix.
  • Non-goals: changing Changesets dependency versions, release workflow redesign, or AI SDK package changes.

Output budget strategy:

  • Use targeted job-log extracts from /tmp/plate-job-*.log; avoid streaming full logs after the initial accidental large log output.

Blocked condition:

  • Stop only if local tests/checks fail in a way that requires a broader release-flow design choice, or if GitHub access cannot create/push the PR.

Task state:

  • task_type: CI release workflow fix
  • task_complexity: normal
  • current_phase: closeout
  • current_phase_status: complete
  • next_phase: final response
  • goal_status: locally complete

Current verdict:

  • verdict: valid
  • confidence: high
  • next owner: current agent
  • reason: the release job failed twice on the same GitHub GraphQL metadata fetch inside Changesets changelog generation.

Pre-solution issue challenge:

  • reporter claim: merged PR caused a failing release job.
  • suggested diagnosis or fix: N/A.
  • repro ladder:
    • tests / source-level repro: job logs and mocked changelog tests cover the failing path.
    • Playwright / automated browser: N/A.
    • Browser plugin: N/A.
    • screenshot / visual proof: N/A.
  • reproduction verdict: reproduced from Actions logs.
  • validity verdict: valid.
  • best long-term fix boundary: .changeset/changelog-config.js.
  • harsh honest feedback: a network-close from GitHub should not brick release-version generation when deterministic PR/commit links are available.
  • hard-stop decision: no hard stop.

Completion rule:

  • Do not call update_goal(status: complete) until local verification, PR prep, and this plan checker pass.

Start Gates:

GateAppliesEvidence
Timed checkpoint parsedN/ANo duration requested.
Skill analysis before editsyesUsed github:gh-fix-ci; used autogoal because this is a verifiable CI fix.
Active goal checked or createdyesget_goal returned none; active goal created for this CI fix.
Source of truth read before editsyesRead run/job metadata and logs for 28402211788 / 84156054337.
Tracker comments and attachments readN/AJob URL only.
Video transcript evidence requiredN/ANo video.
Pre-solution issue challenge requiredyesJob failure reproduced from Actions logs before patching.
Reproduction verdict before implementationyesBoth original run and rerun failed in pnpm ci:version.
Repro escalation ladder selectedyesActions logs plus focused changelog tests; browser N/A.
Suggested fix reviewed against durable boundaryyesDurable owner is changelog config, not one-off rerun.
docs/solutions checked for non-trivial existing-code workN/ARelease logs and local owner were enough.
TDD decision before behavior change or bug fixyesAdded regression tests for GitHub info failure fallback.
Branch decision for code-changing taskyesCreated codex/fix-changeset-changelog-github-fallback from main.
Release artifact decisionyesNo package changeset: release tooling only.
Browser tool decision for browser surfaceN/ANo browser surface.
PR expectation decisionyesFix will be opened as a PR against main.
Tracker sync expectation decisionyesPR body/final handoff are sync surfaces.
Output budget strategy recordedyesTargeted log extracts after initial large log fetch.

Work Checklist:

  • If a duration was requested, it is recorded as minimum active work unless explicitly marked hard stop. N/A: no duration requested.
  • Short objective plus outcome, completion threshold, verification surface, constraints, boundaries, and blocked condition are concrete.
  • Task source classified with source type, id/link, title, task type, acceptance criteria, caveats, likely files/routes/packages, browser surface, and root-cause layer.
  • Required video or screen-recording evidence is cached/read as normalized XML, or marked N/A with reason.
  • Public failure claim challenged before implementation with a recorded verdict.
  • Repro escalation ladder followed for the relevant owner.
  • Hard-stop rule followed for bug/behavior claims.
  • Nearby repo instructions and implementation patterns read before edits.
  • Implementation fixes the right ownership boundary.
  • Release artifact requirement recorded.
  • Final handoff shape decided: PR link, CI root cause, tests, and caveat.
  • Branch handling recorded.
  • Local-env-rot retry policy recorded. N/A: failure is remote GitHub API response, reproduced on rerun.
  • Workspace authority recorded: local checks run in /Users/zbeyens/git/plate.
  • High-risk note recorded. Failure mode: release-version PR creation aborts on transient GitHub metadata fetch; proof plan: mocked fallback tests and root check.
  • Review/autoreview target selected. N/A: user cut autoreview earlier.
  • Agent-native review decision recorded. N/A: no agent instruction/tooling files.
  • Output budget discipline recorded and followed after initial oversized log output.

Completion Gates:

GateAppliesRequired actionEvidence
Named verification thresholdyesRun log readback and local checksFocused tests, release workflow tests, diff check, and pnpm check passed.
Pre-solution issue challenge verdictyesRecord failure and validity verdictOriginal and rerun logs fail in pnpm changeset version with GitHub GraphQL premature close.
Repro escalation ladderyesRecord relevant owner proofActions logs and mocked unit tests cover the release owner.
Bug reproduced before fixyesRecord failing reproRerun job 84273207295 failed with the same Invalid response body ... Premature close.
Targeted behavior verificationyesRun focused testsnode --test .changeset/changelog-config.test.cjs passed.
TypeScript or typed config changedN/ARun typecheck if changedCommonJS release config and tests only.
Package exports or file layout changedN/ARun pnpm brl if neededNo package exports or file layout changed.
Package manifests, lockfile, or install graph changedN/ARun install if changedNo manifest/lockfile changes.
Agent rules or skills changedN/ARun skill sync if changedNo agent files changed.
Workspace authority proofyesRun checks in owning repo/Users/zbeyens/git/plate commands recorded.
Browser surface changedN/ACapture browser proof or caveatNo browser surface.
Browser final proofN/AAttach browser proof or caveatNo browser surface.
CI-controlled template output changedN/ARestore or justifyNo template output.
Package behavior or public API changedN/AAdd changeset or reasonRelease tooling only, not published package behavior.
User-visible registry output changedN/ARegistry changelog if neededNo registry output.
Docs or content changedN/ADocs proof if neededNo docs/content.
High-risk mini gateyesRecord failure mode and proofRelease PR generation fallback tested; successful GitHub metadata path remains unchanged.
Agent-native review for agent/tooling changesN/ARun agent review if neededNo agent/tooling changes.
Local install corruption suspectedN/AReinstall if suspectedNot local install corruption.
Autoreview for non-trivial implementation changesN/ARun or record reasonWaived per user's earlier "cut the autoreview".
PR create or updateyesRun check, push branch, create PRCreated PR #5049 after pnpm check passed.
Task-style PR body verifiedyesVerify PR body with gh pr view --json bodygh pr view 5049 --repo udecode/plate --json body,url,headRefName,headRefOid verified task-style body.
PR proof image hostingN/AHost proof image if neededNo images.
Tracker sync-backN/APost tracker sync if neededJob URL only; PR/final response enough.
Final handoff contractyesFill final fieldsRecorded below; PR URL to be added after creation.
Final lintyesRun pnpm lint:fixPassed; fixed one file.
Output budget disciplineyesRecord accidental output and recoveryFull log output was accidentally large once; subsequent reads used /tmp log artifacts and focused rg/tail.
Timed checkpointN/AClose timed loopNo duration requested.
Goal plan completeyesRun plan checkerPassed at 2026-06-30T11:14Z.

Phase / pass table:

PhaseStatusEvidenceNext
Intake and source readcompleteGitHub run metadata and logs readimplementation done
ImplementationcompleteChangelog fallback added with testsverification
VerificationcompleteFocused tests, release workflow tests, diff check, and pnpm check passedPR done
PR / tracker synccompletePR #5049 created and body verifiedfinal response
CloseoutcompletePlan ready for checkerfinal response

Findings:

  • Original failed run 28402211788, job 84156054337, failed on main at 34fdca42f7.
  • pnpm ci:version failed inside pnpm changeset version.
  • Changesets failed while generating changelog entries because @changesets/get-github-info received Invalid response body while trying to fetch https://api.github.com/graphql: Premature close.
  • Manual rerun also failed with the same GraphQL premature-close error in job 84273207295.
  • The real changeset has no explicit pr: metadata, so the commit fallback path is required.

Decisions and tradeoffs:

  • Keep GitHub metadata lookup when it succeeds.
  • On lookup failure, fall back to deterministic PR and commit links from changeset metadata instead of aborting release.
  • Do not change ci:version or wrap the whole Changesets action; the narrower owner is the changelog generator that calls GitHub metadata.

Implementation notes:

  • Added createFallbackLinks and readGithubLinks to .changeset/changelog-config.js.
  • Added tests for PR metadata fallback and commit fallback when @changesets/get-github-info throws.

Review fixes:

  • Adjusted the PR fallback test after it caught existing changelog behavior: when a PR link exists, commit links are intentionally suppressed.

Error attempts:

Error / failed attemptCountNext different moveResolution
Full gh run view --log streamed too much output1Save job logs to /tmp and inspect focused slicesUsed /tmp/plate-job-*.log with rg and tail.
Rerun failed workflow1Patch changelog fallback instead of relying on rerunRerun reproduced the same failure.

Verification evidence:

  • /Users/zbeyens/git/plate: gh run view 28402211788 --repo udecode/plate showed original failure and rerun failure.
  • /Users/zbeyens/git/plate: node --test .changeset/changelog-config.test.cjs passed, 3 tests.
  • /Users/zbeyens/git/plate: node --test tooling/scripts/release-workflow.test.mjs passed, 21 tests.
  • /Users/zbeyens/git/plate: pnpm lint:fix passed and formatted one file.
  • /Users/zbeyens/git/plate: git diff --check passed.
  • /Users/zbeyens/git/plate: pnpm check passed; existing sidebar hook warning remains warning-only.
  • /Users/zbeyens/git/plate: PR #5049 created at https://github.com/udecode/plate/pull/5049.
  • /Users/zbeyens/git/plate: gh pr view 5049 --repo udecode/plate --json body,url,headRefName,headRefOid verified the PR body and head 8499236f2d5761efa8040e57508c6dc275bd8acc.
  • /Users/zbeyens/git/plate: node .agents/skills/autogoal/scripts/check-complete.mjs docs/plans/2026-06-30-changeset-changelog-github-fallback.md passed.

Final handoff contract:

  • PR line: PR #5049 created.
  • Issue / tracker line: failed job URL and rerun status.
  • Confidence line: high after root check.
  • Flow table:
    • Reproduced: GitHub Actions logs, browser N/A.
    • Verified: focused tests, release workflow tests, root check, browser N/A.
  • Browser check: N/A.
  • Outcome: release changelog generation falls back instead of failing on GitHub metadata fetch errors.
  • Caveat: existing failed main run still needs the fix merged and release workflow rerun.
  • Design:
    • Chosen boundary: .changeset/changelog-config.js.
    • Why not quick patch: rerun failed again with same GraphQL error.
    • Why not broader change: no need to change Changesets action or workflow layout.
  • Verified: focused tests, release workflow tests, lint, diff check, and root pnpm check passed.
  • PR body verified: yes.

Task-style PR body contract:

  • Use task-style PR body after root check passes.

Final handoff / sync:

Timeline:

  • 2026-06-30T11:00Z Read original job metadata and logs.
  • 2026-06-30T11:00Z Reran failed workflow.
  • 2026-06-30T11:01Z Rerun failed with same GraphQL metadata error.
  • 2026-06-30T11:05Z Added changelog fallback and regression tests.
  • 2026-06-30T11:08Z Focused tests and release workflow tests passed.
  • 2026-06-30T11:12Z pnpm check passed.
  • 2026-06-30T11:13Z PR #5049 created and body verified.
  • 2026-06-30T11:14Z Goal-plan checker passed.

Reboot status:

QuestionAnswer
Where am I?Closeout after PR creation.
Where am I going?Run plan checker, push the final plan update, and hand off.
What is the goal?Make release changelog generation resilient to GitHub metadata fetch failures.
What have I learned?The failure is reproducible in Actions rerun and owned by .changeset/changelog-config.js.
What have I done?Patched fallback behavior, added tests, reran the failed workflow once, ran full checks, and opened PR #5049.

Open risks:

  • The current failed main run cannot pass until the fix lands and the release workflow is rerun.