Skip to content

fix(harness): validate native compaction context provenance [SAP-3292] - #1023

Closed
ynadge wants to merge 1 commit into
terminal-binding-write-orderfrom
assistant-compaction-provenance
Closed

ynadge wants to merge 1 commit into
terminal-binding-write-orderfrom
assistant-compaction-provenance

Conversation

@ynadge

@ynadge ynadge commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Bug fix

Problem and motivation

Permissive synthetic-part recognition could borrow an earlier Assistant context or completion token for a message that is not a native compaction control.

Summary and scope

Use one shared recognizer matching the native control-message contract across completion tokens, retained record provenance, Resume history selection and final-response recovery. Require text and literal boolean markers for auto-continue; retain ordinary compaction-part support.

Related work

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

Depends on #1022. Native stack target: main.

Validation

143 focused tests passed, including exact seed regression coverage. Full Harness server/web TypeScript, scoped ESLint and diff checks passed.

Tests and documentation

New behavior cases reject fake tool/file markers and truthy strings; they prove no inherited accepted reference, old Resume context or recovery dispatch. A later real continuation cannot resurrect a reset token. Updated assistant-history.md. Increment:206 changed lines including tests/docs/changeset; SDK pr:size is absent.

Compatibility and release impact

  • Real native compaction behavior is preserved; ordinary acknowledgement filtering retains its separate purpose.
  • Changeset: @sapiom/harness patch.
  • Fix-forward: keep native control recognition consistent across context consumers while correcting provenance handling.

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: ba568f89-95fe-45a5-b138-3e6d843091dc

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