Repository navigation
fix(release): support renamed package Changesets - #706
Conversation
artiphishle
left a comment
There was a problem hiding this comment.
Review findings on dcc09562082abc2ebd211647a9a423db61842d1c (part of infra#477):
P1 — Do not merge before correcting base-identity comparison. In src/cli/runChangesetAsync.ts, readPackageNamesAsync parses the current package.json name but compares it with the raw JSON string returned by readGitFileAsync. Consequently, current !== base evaluates true for virtually every valid base manifest, and --since gets stripped even when no rename happened. Parse the base manifest with readPackageName(await readGitFileAsync(baseReference)); add focused tests for unchanged names, actual renames, missing/malformed/unrelated changesets, and unavailable refs. Preserve fail-closed semantics; do not silently weaken normal Changesets validation.
CI blocker — separate diagnosis required. The exact-head Actions run 40113878571 fails at Check changesets with Failed to find where HEAD diverged from "main". Investigate how the PR checkout/base ref is presented to Changesets and fix the managed CI/check boundary without bypassing comparisons; reproduce in a PR-shaped checkout.
Re-evaluate the dependency claim. K3s PR #10 exact-head run 40114059347 is now green, and its changeset:status --since=origin/main recognized @ankhorage/infra-k3s. Determine whether #706 is still needed for this rename before releasing it.
All follow-up work stays under the full eight-adapter infra#477 initiative.
|
P1 follow-up is pushed in b34c88c.
Full local validation passed: build, check-types, lint, knip:check, 198 tests, changeset status, format, and format:check. |
artiphishle
left a comment
There was a problem hiding this comment.
Review of current head b34c88c (infra#477):
The previous P1 is fixed: both manifests now go through readPackageName, normal identities retain --since, and the generated CI materializes main at the exact PR base SHA. Exact-head CI run 40120089042 is green.
P2 test gap: The cases called “missing or unrelated release intent” in src/cli/runChangesetAsync.test.ts only assert the forwarded argument array, with runExternalToolAsync hardcoded to return exitCode: 0. They do not prove an actual renamed-root checkout rejects a missing, malformed, or unrelated Changeset. Because genuine renames intentionally remove --since, add a small deterministic integration/regression check through the actual Changesets status boundary for (a) valid current-name patch Changeset succeeds, (b) no release-intent Changeset fails, and (c) unrelated/obsolete package-name Changeset fails. If those cases are already guaranteed elsewhere, reference the specific executable evidence and clarify the test titles. Do not reintroduce the obsolete identity, bypass the managed gate, or expand into unrelated cleanup.
This is a correctness/evidence request before treating Devtools #706 as the canonical rename gate fix; complete the full eight-adapter infra#477 sequence after required approvals and verified releases.
|
P2 follow-up pushed at The renamed-root runner now writes and verifies the actual Changesets release plan after intentionally removing Local checks passed: |
Summary
Allow the managed Changesets status runner to omit
--sinceonly when the root package name differs from the exact base revision. Ordinary package identities retain the strict base comparison.Closes #705
Part of ankhorage/infra#477.
Validation
bun run buildbun run check-typesbun run lintbun run knip:checkbun test(194 passing)bun run changeset:statusbun run formatbun run format:checkstatus --since=origin/mainfrom the renamed k3s package checkoutRelease impact
Patch Changeset included. No generated release documentation changed.