Skip to content

fix(pb): backport serverless fix#4611

Merged
MasterPtato merged 1 commit intomainfrom
04-12-fix_pb_backport_serverless_fix
Apr 13, 2026
Merged

fix(pb): backport serverless fix#4611
MasterPtato merged 1 commit intomainfrom
04-12-fix_pb_backport_serverless_fix

Conversation

@MasterPtato
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
Contributor Author

MasterPtato commented Apr 12, 2026

@MasterPtato MasterPtato marked this pull request as ready for review April 12, 2026 21:04
@claude
Copy link
Copy Markdown

claude bot commented Apr 12, 2026

PR Review: fix(pb): backport serverless fix

This is a clean, minimal bug fix that removes incorrect drain signal handling from within an activity.

Summary

The PR removes a Drain message subscription from the outbound_req activity in the serverless Pegboard connection workflow. Activities in this workflow engine are not the right place to receive durable messages — that responsibility belongs to the surrounding workflow context.

Changes Analysis

conn.rs — Correct removal

Removing drain_sub and its select! branch from outbound_req_inner is the right call. Activities run with #[timeout = u64::MAX] and cannot durably handle signals. The drain detection path that remains — is_runner_draining polling at the start of each outbound_req_inner call and ctx.listen_with_timeout::<Drain> in the loope retry body — is architecturally sound for the activity-based model.

receiver.rs — Correct cleanup

Removing the ctx.msg(conn::Drain {}).send() call is consistent: once the activity no longer subscribes to that message, sending it is a no-op. The signal pathway (ctx.signal(conn::Drain {}).to_workflow_id(conn_wf_id)) remains and is the correct mechanism for waking the connection workflow between retries.

The ctx.removed::<Message<conn::Drain>>() call is correctly retained for workflow-engine bookkeeping to clean up the message type from durable state.

Verdict

The fix is minimal, well-targeted, and correct. No new logic is introduced — only dead/incorrect code is removed. No issues found.

@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_backport_serverless_fix branch from f4342a7 to b45c190 Compare April 12, 2026 21:21
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_optimize_actor_key_allocation branch from 4573f6b to 2efef31 Compare April 12, 2026 21:22
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_backport_serverless_fix branch from b45c190 to d9003fa Compare April 12, 2026 21:45
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_optimize_actor_key_allocation branch from 2efef31 to c0cc63d Compare April 12, 2026 21:45
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_optimize_actor_key_allocation branch from c0cc63d to d4d4a75 Compare April 12, 2026 23:38
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_backport_serverless_fix branch from d9003fa to fad7632 Compare April 12, 2026 23:38
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_backport_serverless_fix branch from fad7632 to 744ddb3 Compare April 13, 2026 00:20
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_optimize_actor_key_allocation branch from d4d4a75 to 079bc44 Compare April 13, 2026 00:20
Copy link
Copy Markdown
Contributor Author

MasterPtato commented Apr 13, 2026

Merge activity

  • Apr 13, 12:21 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 13, 12:38 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 13, 12:38 AM UTC: @MasterPtato merged this pull request with Graphite.

@MasterPtato MasterPtato changed the base branch from 04-12-fix_pb_optimize_actor_key_allocation to graphite-base/4611 April 13, 2026 00:35
@MasterPtato MasterPtato changed the base branch from graphite-base/4611 to main April 13, 2026 00:36
@MasterPtato MasterPtato force-pushed the 04-12-fix_pb_backport_serverless_fix branch from 744ddb3 to aab07e9 Compare April 13, 2026 00:37
@MasterPtato MasterPtato merged commit 2dec26f into main Apr 13, 2026
5 of 7 checks passed
@MasterPtato MasterPtato deleted the 04-12-fix_pb_backport_serverless_fix branch April 13, 2026 00:38
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.

2 participants