Skip to content

fix(harness): retain terminal end markers after failed writes [SAP-3292] - #1035

Closed
ynadge wants to merge 1 commit into
assistant-seed-reconciliationfrom
terminal-end-binding-reconciliation
Closed

ynadge wants to merge 1 commit into
assistant-seed-reconciliationfrom
terminal-end-binding-reconciliation

Conversation

@ynadge

@ynadge ynadge commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Bug fix

Problem and motivation

A failed create/resume binding publication could roll back after a queued End, deleting its marker or restoring an old one and leaving an invalid registry on restart.

Summary and scope

Fence both compensation paths by their original close generation and exact proposed marker. Preserve End's retained tombstone or coordinator-confirmed removal and keep sibling sessions untouched.

Related work

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

Depends on #1034. Native stack target: main.

Validation

pnpm --filter @sapiom/harness test — 4,814 unit tests and 10 performance tests passed (2 skipped), including this review correction.

The combined focused core review run passed 304 tests. Server TypeScript, scoped ESLint and diff checks passed.

Tests and documentation

Four failed-publication/queued-End races verify disk reload, retained or removed markers, and same-directory sibling PTY ownership. Removing either generation guard failed its two regressions. Updated assistant-history.md. Increment: 122 changed lines including tests/docs/changeset; SDK pr:size is absent.

Compatibility and release impact

  • No wire or persisted format migration; existing lifecycle and history contracts remain.
  • Changeset: @sapiom/harness patch.
  • Fix-forward: correct the compensation fence in a focused follow-up while preserving End's durable marker and positive cleanup proof.

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.

Devin Review

@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: 3dee8e36-692b-4c60-bf3a-3681b09a8811

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

@ynadge ynadge closed this Sep 15, 2026
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