Skip to content

fix(harness): preserve storage failures through cleanup [SAP-3292] - #1031

Closed
ynadge wants to merge 1 commit into
assistant-continuation-timeoutfrom
assistant-storage-cleanup
Closed

ynadge wants to merge 1 commit into
assistant-continuation-timeoutfrom
assistant-storage-cleanup

Conversation

@ynadge

@ynadge ynadge commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Bug fix

Problem and motivation

A temporary-file removal failure could replace the unconfirmed-commit error after Assistant metadata publication and rollback failed, hiding the information needed to reconcile Resume.

Summary and scope

Settle all temporary removals and preserve the primary operation failure. Surface cleanup failure when publication otherwise succeeded, keeping uncertainty and cleanup errors observable.

Related work

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

Depends on #1030. Native stack target: main.

Validation

pnpm --filter @sapiom/harness exec vitest run src/core/assistant-session-files.test.ts src/core/assistant-session-store.test.ts — 19 tests passed.

Server TypeScript, scoped ESLint and diff checks passed. Restoring the masking behavior in memory failed both new primary-error regressions.

Tests and documentation

Covers uncertain publication plus rollback/cleanup failure, pre-publication failure plus cleanup failure, and cleanup failure following successful publication. Updated assistant-history.md. Increment: 88 changed lines including tests/docs/changeset; SDK pr:size is absent.

Compatibility and release impact

  • Existing typed unconfirmed-commit behavior is preserved; no wire or filesystem format changes.
  • Changeset: @sapiom/harness patch.
  • Fix-forward: correct error precedence in a focused follow-up while preserving the durable Resume 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.

@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: 25236f41-104f-4598-a274-99e20bd88fa1

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