chore: remove implementation plan

This commit is contained in:
Catriel Müller
2026-06-11 10:46:28 -03:00
parent fee5cf441a
commit ea92eb2244
-24
View File
@@ -1,24 +0,0 @@
# Prevent Bun downgrades during upstream merges
## Goal
Ensure `script/upstream/merge.ts` keeps the newer root `packageManager` Bun version across Kilo and upstream: accept an upstream upgrade, preserve Kilo when upstream is older, and fail before finalizing if the merged result is below either input.
## Implementation
1. Update `script/upstream/transforms/transform-package-json.ts` with a small, exported Bun package-manager reconciliation helper that:
- Applies only to the root `package.json`.
- Parses `bun@<semver>` values and compares them with the existing version comparison logic.
- Selects the newer value from Kilo/base and upstream, preserving the original full `packageManager` string.
- Treats malformed or missing values conservatively so an unparseable upstream value cannot replace a valid Kilo value.
- Records a transform change when it restores a newer Kilo version.
2. Invoke that helper in every root package reconciliation path: conflicted package transformation, pre-merge package transformation, and post-merge reconciliation. This makes an upstream `bun@1.3.15` upgrade flow through while preventing an upstream `bun@1.3.13` from replacing Kilo's `bun@1.3.14`.
3. Add a final guard in `script/upstream/merge.ts`, after successful package reconciliation and before finalization/push, that compares the working-tree Bun version with both the base commit and pristine upstream target. Abort with a clear error if the result is lower than the newest valid input, protecting against future transform/rerere regressions.
4. Extend `script/upstream/transforms/transform-package-json.test.ts` with focused cases for Kilo-newer, upstream-newer, equal, non-root, and malformed package-manager values. Cover the final comparison/guard through an exported pure assertion helper rather than mocking git.
5. Update `script/upstream/README.md` to document the newest-Bun-wins behavior and the no-downgrade final validation.
## Validation
- Run `bun test script/upstream/transforms/transform-package-json.test.ts`.
- Run the repository typecheck (`bun run typecheck`) to validate the updated transform and merge orchestration types.
- No changeset is needed because this only changes internal upstream-merge tooling.