fix(ide): apply package commit to existing runtime and record actual installed revision

This commit is contained in:
2026-09-05 15:52:44 +03:00
parent 8f38fd53e4
commit aa498f4cbb
7 changed files with 15 additions and 11 deletions
+7 -6
View File
@@ -111,16 +111,16 @@ function resolveMarkerPinnedCommit(
): string | null {
const resolveHead = opts.resolveHead || resolveCheckoutHead
if (installStamp && isPinnedCommit(installStamp.commit)) {
return installStamp.commit
}
const head = resolveHead(activeRoot)
if (head) {
return head
}
if (installStamp && isPinnedCommit(installStamp.commit)) {
return installStamp.commit
}
return readExistingPinnedCommit(activeRoot)
}
@@ -918,14 +918,14 @@ async function runBootstrap(opts) {
try {
const existingCheckout = hasExistingGitCheckout(activeRoot)
const pinCommit = !existingCheckout
const pinCommit = Boolean(installStamp && isPinnedCommit(installStamp.commit)) || !existingCheckout
if (existingCheckout && installStamp && installStamp.commit) {
emit({
type: 'log',
line:
`[bootstrap] existing checkout detected at ${activeRoot}; ` +
`not pinning to packaged install stamp ${installStamp.commit.slice(0, 12)}`
`applying packaged install stamp ${installStamp.commit.slice(0, 12)} with installer rollback protection`
})
}
@@ -1002,6 +1002,7 @@ async function runBootstrap(opts) {
const markerPayload = {
pinnedCommit,
packageCommit: installStamp && isPinnedCommit(installStamp.commit) ? installStamp.commit : null,
pinnedBranch: installStamp ? installStamp.branch : null
}