Skip to content

fix: reconcile historical follow-up input mirrors - #2000

Merged
4pmtong merged 4 commits into
mainfrom
feat/deduplicate-failed-followup-messages
Oct 2, 2026
Merged

4pmtong merged 4 commits into
mainfrom
feat/deduplicate-failed-followup-messages

Conversation

@4pmtong

@4pmtong 4pmtong commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Pull Request

Related Issue

Description

Cloud history can replay a legacy confirmed step before canonical Run hydration supplies the same admitted user.message. That sequence rendered the user's failed follow-up twice in the transcript.

Historical Cloud playback normalizes confirmed frames to legacy.step with legacyStep: confirmed, while the local journal writes legacy.confirmed. Presentation previously recognized only the latter. Now a canonical user.message owns every confirmed mirror of its Run, in either form, keyed by Project and Run. This follows design 19 §7: legacy.confirmed is only a read-only fallback for Runs with no canonical input. Ownership is per Run and does not compare content or message identity, so a resume instruction echoed into a resumed Run as confirmed stays hidden. Legacy-only history, other Runs, other Projects, human_reply, and optimistic queries are unaffected. Raw events and persistence remain unchanged; the rule is confined to transcript presentation.

The original live v1.0.4 queued-to-403 report is still under investigation. This PR fixes the independently reproduced Cloud-history playback plus canonical-hydration duplicate.

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@4pmtong
4pmtong force-pushed the feat/deduplicate-failed-followup-messages branch 2 times, most recently from 4cab7e5 to 7417651 Compare October 2, 2026 07:55
@4pmtong
4pmtong marked this pull request as ready for review October 2, 2026 14:13
@4pmtong
4pmtong merged commit b3864a7 into main Oct 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant