Skip to content

SCA-4084: send a manual-end wake after a written single-unit fast finish - #26208

Merged
Git-on-my-level merged 2 commits into
BasedHardware:mainfrom
Git-on-my-level:fast-finish-single-unit-wake
Nov 24, 2026
Merged

Git-on-my-level merged 2 commits into
BasedHardware:mainfrom
Git-on-my-level:fast-finish-single-unit-wake

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

SCA-3024 / SCA-4084 follow-up to #26192, for Codex P2 r4676634678. #26192 merged at 6e00e2b2 before this fix reached the branch.

A single-unit manual finish has its cut promoted at admission, so the fast pass was given no cut callback and relied on the transcript writer's plain wake. That wake goes through triggers.enqueue() under the owner-minute task name, and enqueue_named_task() skips it when the owner's ordinary reconcile already ran in that minute. The pass then reports written, but Home can still wait for canonical delivery, another change, or the ten-minute pending sweep.

Admission now passes cut to the pass for a promoted single unit as well. After a written transcript the pass calls it, and it wakes the builder through changed(uid, cid, manual_end=True) under the distinct manual_end_id task name. Setting v3_manual_end again on a promoted row is idempotent. A single unit that was not promoted gets no manual-end wake, so the marker is never set past promote_manual_end's guards. Several-unit recordings are unchanged.

Cost

At most one extra Cloud Tasks enqueue and one mark_pending transaction 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 (off disables the pass) and CONVERSATIONS_V3_BATCH_MANUAL_END kill 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_pass now expects one wake after a written pass and none after a provider error or a funding refusal. The new test_a_single_unit_that_was_not_promoted_gets_no_manual_end_wake covers the unpromoted case.
  • No production readback yet. It joins the SCA-4084 readback on the owner account.

Product invariants affected

  • INV-DATA-1

Failure-Class: none

🤖 Generated with Claude Code

View guided diff

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]>
@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:35:49.563266Z 8afed05 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@Git-on-my-level
Git-on-my-level merged commit 4a680e2 into BasedHardware:main Nov 24, 2026
57 checks passed
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