Repository navigation
SCA-4084: send a manual-end wake after a written single-unit fast finish - #26208
Git-on-my-level merged 2 commits into
Conversation
A promoted single unit already holds its cut, so the pass got no cut callback and relied on the writer's plain wake. That wake shares the owner's per-minute task name and is skipped when a reconcile already ran that minute, leaving Home waiting for canonical delivery or the pending sweep. A promoted single unit now gets the manual-end wake (distinct manual_end_id task) after a written pass; an unpromoted one gets none. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdf1f2ef70
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # promoted single unit already holds its cut, but still gets its own | ||
| # manual-end wake after the write: the writer's plain wake shares the owner's | ||
| # per-minute task name and is skipped when a reconcile already ran that minute. | ||
| cut=cut if not single or promoted else None, |
There was a problem hiding this comment.
Add the required pipeline change note for this wake
backend/AGENTS.md requires conversation-lifecycle changes to “add a note under docs/listen_pusher_pipeline/changes/ in the same PR,” but this follow-up changes only Python source and tests. The existing 2026-11-24-v3-batch-manual-end.md describes single-unit finishes relying on the transcript writer's wake; it does not document this new manual-end enqueue or its additional transaction. Add a separate dated note covering the deduplication rationale, rollout/rollback, and verification so the pipeline's operational record reflects the changed dispatch behavior.
AGENTS.md reference: backend/AGENTS.md:L164-L164
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Added in 8afed056: backend/docs/listen_pusher_pipeline/changes/2026-11-24-v3-fast-finish-single-unit-wake.md. It covers the owner-minute dedupe rationale, the new manual-end wake and its cost (one mark_pending transaction and one enqueue), rollout and rollback through the existing kill switches, and verification.
Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
What changed and why
SCA-3024 / SCA-4084 follow-up to #26192, for Codex P2 r4676634678. #26192 merged at
6e00e2b2before this fix reached the branch.A single-unit manual finish has its cut promoted at admission, so the fast pass was given no
cutcallback and relied on the transcript writer's plain wake. That wake goes throughtriggers.enqueue()under the owner-minute task name, andenqueue_named_task()skips it when the owner's ordinary reconcile already ran in that minute. The pass then reportswritten, but Home can still wait for canonical delivery, another change, or the ten-minute pending sweep.Admission now passes
cutto the pass for a promoted single unit as well. After a written transcript the pass calls it, and it wakes the builder throughchanged(uid, cid, manual_end=True)under the distinctmanual_end_idtask name. Settingv3_manual_endagain on a promoted row is idempotent. A single unit that was not promoted gets no manual-end wake, so the marker is never set pastpromote_manual_end's guards. Several-unit recordings are unchanged.Cost
At most one extra Cloud Tasks enqueue and one
mark_pendingtransaction per written single-unit fast finish, which is cohort-gated (empty cohort plus David's account).Rollout and rollback
No new flag. It is covered by the existing
CONVERSATIONS_V3_FAST_FINISH(offdisables the pass) andCONVERSATIONS_V3_BATCH_MANUAL_ENDkill switches. Rollback is a revert.How it was verified
test_conversations_v3_fast_finish.py: 81 passed on m1.test_admission_cuts_a_single_unit_itself_before_the_passnow expects one wake after a written pass and none after a provider error or a funding refusal. The newtest_a_single_unit_that_was_not_promoted_gets_no_manual_end_wakecovers the unpromoted case.Product invariants affected
Failure-Class: none
🤖 Generated with Claude Code