Skip to content

feat(harness): persist one continuation child across retries [SAP-3292] - #1009

Closed
ynadge wants to merge 1 commit into
assistant-history-panefrom
assistant-continuation-receipts
Closed

ynadge wants to merge 1 commit into
assistant-history-panefrom
assistant-continuation-receipts

Conversation

@ynadge

@ynadge ynadge commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Feature

Problem and motivation

Continue must preserve one source snapshot and child identity through crashes and lost responses. In-memory retries can allocate another child or silently accept newer context.

Summary and scope

Add a private durable continuation receipt with strict bounded validation, immutable identity/content, monotonic preparation phases, and revision CAS. Reserve the receipt and child lookup before allocation, serialize external steps with a separate operation lock, and block ordinary attachment until the linked receipt is prepared. Freeze new-child candidate material only as pending input to the existing accepted-source owner.

Related work

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

Depends on #1008. Native stack target: main. Native create/seed orchestration follows; this increment performs no native or Terminal IO.

Validation

Receipt, brief, assistant files, delivery and source-store suites — 81 passed
Final receipt suite — 21 passed
pnpm --filter @sapiom/harness exec tsc --noEmit — passed
pnpm --filter @sapiom/harness build:server — passed
Scoped ESLint, Prettier and git diff --check — passed
Existing-receipt, phase rollback and child-link guard mutations — failed as expected, restored

Tests and documentation

Real-filesystem tests cover restart/concurrency, exact retries after newer history, publication uncertainty, immutable bindings/content, phase CAS, separate operation locks, corrupt/missing child links, and content/hash validation. Updated assistant-continuation.md. Increment:940 changed lines including tests/docs/changeset; pr:size is absent.

Compatibility and release impact

  • Breaking or externally visible changes: additive private receipt format; no existing record is replaced.
  • Changeset: added for @sapiom/harness.
  • Fix-forward: preserve reserved child IDs and frozen inputs while correcting receipt validation/reconciliation. Never reset an uncertain native mutation phase.

Security

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

AI assistance

  • AI assistance used: Codex implemented receipt persistence and tests; root reviewed phase, source, child-link and accepted-context boundaries and verified the recorded checks.

Checklist

  • CONTRIBUTING.md read; maintainer-authorized issue work.
  • One focused increment, tests, relevant checks, documentation, and release impact addressed above.
  • 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: 3372c668-1c84-4092-b2a9-31d3890c2d73

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