Skip to content

fix(harness): preserve Resume retry and End authority [SAP-3292] - #1037

Closed
ynadge wants to merge 1 commit into
assistant-useful-brief-partsfrom
assistant-ui-operation-retries
Closed

ynadge wants to merge 1 commit into
assistant-useful-brief-partsfrom
assistant-ui-operation-retries

Conversation

@ynadge

@ynadge ynadge commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Bug fix

Problem and motivation

A delayed End response could dismiss a Terminal that had already resumed. An Assistant Resume that committed over the event bus but lost its HTTP acknowledgement could discard the original request and leave the user unable to reconcile it.

Summary and scope

Fence ordinary Terminal Resume and End acknowledgements by their shared per-Studio operation generation and current authority. Keep an uncertain Assistant Resume's original inspected entry and operation UUID across its own lifecycle event and Close/Back; Retry Resume reconciles that exact request. Only a strictly parsed lifecycle conflict offers a fresh availability check.

Related work

Related issue: https://linear.app/sapiom/issue/SAP-3292

Depends on #1036. Native stack target: main.

Validation

Browser fixtures: 72/72 cases across assistant-continuation.spec.ts, assistant-end.spec.ts, assistant-history.spec.ts and past-session-record.spec.ts passed. Two deliberate guard regressions were detected, restored, and followed by the clean broader run. Frontend TypeScript, explicit browser ESLint (zero errors; one existing unused-type warning), scoped formatting and git diff --check passed. These fixtures do not establish native execution; assembled browser/native validation follows in the final stack.

Tests and documentation

Added delayed End/Terminal Resume ordering and uncertain Resume bus-commit/Close/Back regressions. Updated assistant-history.md. Increment: 338 changed lines including tests/docs/changeset; SDK pr:size is absent.

Compatibility and release impact

  • Preserves the existing Assistant history flow and authority partition. No new styling or automatic work submission. Runtime activation stays under its existing owner; default activation is absent, supported legacy Resume remains available, and context-dependent work remains gated.
  • Changeset: @sapiom/harness patch.
  • Fix-forward: Retain the original request tuple and correct the operation guard; keep failed cleanup visible and retryable.

Security

  • No secrets, credentials, private data, or unsanitized logs included.
  • No suspected vulnerability disclosed publicly.

AI assistance

  • AI assistance used: Codex implemented and reviewed the change with the validation described above.

Checklist

  • CONTRIBUTING.md read; maintainer-authorized issue work.
  • One focused increment, checks, documentation and release impact addressed.
  • I can explain and maintain the submitted changes.

Review evidence

Disposable fixture states around explicit Resume: the initial verified action is from the earlier Resume fixture; the retry view is from the lost-acknowledgement regression. These are action states, not a historical baseline or native execution evidence.

Verified Resume action Original request remains retryable
Verified Resume Retry original Resume

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b6a175ac-c0c8-466a-a84a-487e1abda225

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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