mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 10:00:38 +09:00
fix: harden worktree dependency hydration
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
8ae4c0e765
commit
c19208010a
2 changed files with 60 additions and 28 deletions
|
|
@ -779,6 +779,8 @@ function enrichWakeContextSnapshot(input: {
|
|||
contextSnapshot[WAKE_COMMENT_IDS_KEY] = wakeCommentIds;
|
||||
contextSnapshot.commentId = latestCommentId;
|
||||
contextSnapshot.wakeCommentId = latestCommentId;
|
||||
// Once comment ids are normalized into the snapshot, rebuild the structured
|
||||
// wake payload from those ids later instead of carrying forward stale data.
|
||||
delete contextSnapshot[PAPERCLIP_WAKE_PAYLOAD_KEY];
|
||||
} else if (!readNonEmptyString(contextSnapshot["wakeCommentId"]) && wakeCommentId) {
|
||||
contextSnapshot.wakeCommentId = wakeCommentId;
|
||||
|
|
@ -814,6 +816,8 @@ export function mergeCoalescedContextSnapshot(
|
|||
merged[WAKE_COMMENT_IDS_KEY] = mergedCommentIds;
|
||||
merged.commentId = latestCommentId;
|
||||
merged.wakeCommentId = latestCommentId;
|
||||
// The merged context should carry canonical comment ids; the next wake will
|
||||
// regenerate any structured payload from those ids.
|
||||
delete merged[PAPERCLIP_WAKE_PAYLOAD_KEY];
|
||||
}
|
||||
return merged;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue