Skip to content

Auto-consume empty cancellation notices#266

Open
zzz163519 wants to merge 1 commit into
SeemSeam:mainfrom
zzz163519:fix/cancelled-control-notice
Open

Auto-consume empty cancellation notices#266
zzz163519 wants to merge 1 commit into
SeemSeam:mainfrom
zzz163519:fix/cancelled-control-notice

Conversation

@zzz163519

Copy link
Copy Markdown
Contributor

Summary

Represent cancelled + empty reply as a durable, already-consumed completion_notice instead of an ordinary queued task_reply.

This keeps cancellation completion observable without making the caller agent execute an empty reply-delivery turn or blocking its single-lane mailbox.

Changes

  • preserve the terminal job, cancelled attempt, ReplyRecord, and trace lineage;
  • tag the empty cancelled reply as a cancelled control notice;
  • append a consumed COMPLETION_NOTICE event for traceability without changing caller mailbox depth or pending-reply count;
  • retain the existing TASK_REPLY delivery path when cancellation captured meaningful partial output or a reply artifact;
  • make ack conflicts identify the inbound event, source job, and automatic delivery job;
  • cover repeated cancel idempotency.

The completion-on-cancel invariant from #112 remains intact.

Verification

  • 78 passed — full message-bureau dispatcher integration file
  • 15 passed — message-bureau control queue tests
  • dispatcher cancel subset passed
  • socket inbox/ack/reply-delivery subset passed
  • python -m py_compile for changed Python modules and tests
  • git diff --check

Closes #263.

@zzz163519

Copy link
Copy Markdown
Contributor Author

CI note: the full Tests matrix is currently red on upstream main as well. The latest main run (29558401022) and this PR's Ubuntu 3.10 job both fail in the unchanged lifecycle test test_ccbd_stop_all_does_not_run_post_shutdown_heartbeat (destroy_events == []), after the rest of the suite passes. This failure is outside this PR's diff; the PR-specific targeted/smoke checks are reported in the description.

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.

Empty cancelled replies should not occupy the caller's task mailbox

1 participant