Skip to content

Commit c27b880

Browse files
committed
chore(harness): protect final review fixes with markers
1 parent ee7cb0e commit c27b880

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎packages/core/src/v1/config/migrate.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const keys = new Set([
3030

3131
export function isV1(input: unknown) {
3232
if (typeof input !== "object" || input === null || Array.isArray(input)) return false
33+
// altimate_change start — detect renamed nested V1 compaction keys
3334
if (Object.keys(input).some((key) => keys.has(key))) return true
3435
const compaction = (input as Record<string, unknown>).compaction
3536
if (typeof compaction !== "object" || compaction === null || Array.isArray(compaction)) return false
@@ -39,6 +40,7 @@ export function isV1(input: unknown) {
3940
return ["tail_turns", "preserve_recent_tokens", "reserved"].some((key) =>
4041
Object.prototype.hasOwnProperty.call(compaction, key),
4142
)
43+
// altimate_change end
4244
}
4345

4446
export function migrate(info: typeof ConfigV1.Info.Type) {

‎packages/opencode/src/session/processor.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,9 @@ export namespace SessionProcessor {
769769
start: match.state.time.start,
770770
end: Date.now(),
771771
},
772+
// altimate_change start — persist only dispatch-capped attachments
772773
attachments: toolResultAttachments,
774+
// altimate_change end
773775
},
774776
})
775777

‎packages/opencode/src/session/prompt.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,7 @@ export namespace SessionPrompt {
19531953
}
19541954
await Telemetry.shutdown()
19551955
// altimate_change end
1956+
// altimate_change start — resolve callbacks from this prompt generation only
19561957
for await (const item of MessageV2.stream(sessionID)) {
19571958
if (item.info.role === "user") continue
19581959
// Resolve only callers queued on THIS loop generation. A cancelled loop
@@ -1965,6 +1966,7 @@ export namespace SessionPrompt {
19651966
}
19661967
return item
19671968
}
1969+
// altimate_change end
19681970
throw new Error("Impossible")
19691971
})
19701972

0 commit comments

Comments
 (0)