Skip to content

Commit 40779c5

Browse files
saravmajesticclaude
andcommitted
fix: mark the two remaining altimate_change additions (#1305)
Marker Guard flagged the uninstall summary call and the packageName interface member as unmarked custom code in upstream-shared files. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent 2708fc8 commit 40779c5

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎packages/opencode/src/cli/cmd/uninstall.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export const UninstallCommand = {
8888
// publish.ts ships both a scoped and an unscoped wrapper; removing the wrong one removes
8989
// nothing while uninstall goes on to delete config and cache.
9090
const pkg = (await Installation.packageName()) ?? "@altimateai/altimate-code"
91-
// altimate_change end
9291
await showRemovalSummary(targets, method, pkg)
92+
// altimate_change end
9393

9494
if (!args.force && !args.dryRun) {
9595
const confirm = await prompts.confirm({
@@ -108,7 +108,10 @@ export const UninstallCommand = {
108108
return
109109
}
110110

111+
// altimate_change start — #1305: pass the verified package name through so removal
112+
// targets the wrapper the user actually installed.
111113
await executeUninstall(method, targets, pkg)
114+
// altimate_change end
112115

113116
prompts.outro("Done")
114117
},
@@ -128,7 +131,10 @@ async function collectRemovalTargets(args: UninstallArgs, method: Installation.M
128131
return { directories, shellConfig, binary }
129132
}
130133

134+
// altimate_change start — #1305: takes the verified package name so the summary prints the
135+
// command that will actually run.
131136
async function showRemovalSummary(targets: RemovalTargets, method: Installation.Method, pkg: string) {
137+
// altimate_change end
132138
prompts.log.message("The following will be removed:")
133139

134140
for (const dir of targets.directories) {
@@ -171,7 +177,10 @@ async function showRemovalSummary(targets: RemovalTargets, method: Installation.
171177
}
172178
}
173179

180+
// altimate_change start — #1305: takes the verified package name so removal targets the
181+
// wrapper the user actually installed.
174182
async function executeUninstall(method: Installation.Method, targets: RemovalTargets, pkg: string) {
183+
// altimate_change end
175184
const spinner = prompts.spinner()
176185
const errors: string[] = []
177186

‎packages/opencode/src/installation/index.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,9 @@ export interface Interface {
416416
readonly method: () => Effect.Effect<Method>
417417
readonly latest: (method?: Method) => Effect.Effect<string>
418418
readonly upgrade: (method: Method, target: string) => Effect.Effect<void, UpgradeFailedError>
419-
// altimate_change — #1305: verified owning package, or undefined when not ours
419+
// altimate_change start — #1305: verified owning package, or undefined when not ours
420420
readonly packageName: () => Effect.Effect<string | undefined>
421+
// altimate_change end
421422
}
422423

423424
export class Service extends Context.Service<Service, Interface>()("@opencode/Installation") {}
@@ -732,14 +733,16 @@ export const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProce
732733
if (!owner) return "unknown" as Method
733734
}
734735
return candidate
735-
// altimate_change end
736736
}),
737+
// altimate_change end
738+
// altimate_change start — #1305: the package the manager confirms owns this binary,
739+
// so upgrade and uninstall name the wrapper the user actually installed.
737740
packageName: Effect.fn("Installation.packageName")(function* () {
738-
// altimate_change — #1305
739741
const candidate = resolveInstall().method
740742
if (!PACKAGE_MANAGERS.includes(candidate)) return undefined
741743
return yield* owningPackage(candidate)
742744
}),
745+
// altimate_change end
743746
latest: Effect.fn("Installation.latest")(function* (installMethod?: Method) {
744747
const detectedMethod = installMethod || (yield* result.method())
745748

0 commit comments

Comments
 (0)