Skip to content

Fence finalization-triggered episode composer writes - #26209

Merged
Git-on-my-level merged 1 commit into
mainfrom
agent/sca-4083-composer-fence
Nov 24, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
agent/sca-4083-composer-fence

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

SCA-4083 F1. Pass the finalizing conversation ID from the scheduled composer into the existing episode update transaction. The transaction reuses the shared account deletion policy and checks the conversation tombstone. A deletion refusal stops composition and leaves any already-claimed lease to expire.

Verification and read delta

The hermetic scheduled-compose tests use the episode writer and count the two authority document paths at the transaction boundary.

Case Added authority reads Result
Unfenced read-triggered control 0 Result committed
Finalization, one lease claim and one result write 4 Result committed
Account marker after lease claim 3 Result refused, stored state unchanged from immediately after the marker
Conversation tombstone after lease claim 4 Result refused, stored state unchanged from immediately after the marker

Each additional guarded transaction attempt can add up to two reads. No extra writes or provider calls are introduced.

Release

R19 review is scoped to F1. Roll out with the Python backend and revert this PR to roll back. Release owns production Firestore readback through SCA-1819.

Line-Count-Exception: backend/utils/episodes/composer.py | 2133 -> 2141 | Forward the existing finalization context at the common episode writer and stop on deletion refusal.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T07:39:35.794864Z 5b7b191 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 145f72b into main Nov 24, 2026
70 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/sca-4083-composer-fence branch November 24, 2026 08:08
Git-on-my-level added a commit to Git-on-my-level/omi that referenced this pull request Nov 24, 2026
…6209)

## Summary

SCA-4083 F1. Pass the finalizing conversation ID from the scheduled
composer into the existing episode update transaction. The transaction
reuses the shared account deletion policy and checks the conversation
tombstone. A deletion refusal stops composition and leaves any
already-claimed lease to expire.

## Verification and read delta

The hermetic scheduled-compose tests use the episode writer and count
the two authority document paths at the transaction boundary.

| Case | Added authority reads | Result |
| --- | ---: | --- |
| Unfenced read-triggered control | 0 | Result committed |
| Finalization, one lease claim and one result write | 4 | Result
committed |
| Account marker after lease claim | 3 | Result refused, stored state
unchanged from immediately after the marker |
| Conversation tombstone after lease claim | 4 | Result refused, stored
state unchanged from immediately after the marker |

Each additional guarded transaction attempt can add up to two reads. No
extra writes or provider calls are introduced.

## Release

R19 review is scoped to F1. Roll out with the Python backend and revert
this PR to roll back. Release owns production Firestore readback through
SCA-1819.

Line-Count-Exception: backend/utils/episodes/composer.py | 2133 -> 2141
| Forward the existing finalization context at the common episode writer
and stop on deletion refusal.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26209?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/26209?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26209&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

(cherry picked from commit 145f72b)
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