Skip to content

Claim cancellation traces include the pending waiter's state - #1100

Open
zlareb1 wants to merge 1 commit into
mainfrom
test/claim-cancellation-waiter-state
Open

zlareb1 wants to merge 1 commit into
mainfrom
test/claim-cancellation-waiter-state

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 21, 2026

Copy link
Copy Markdown
Member

Related: #1072
Related: #1025

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Not required.

Why

A failed claim cancellation can leave a task with one cancellation request while it still waits for input. The failure trace needs the waiter's state to distinguish a consumed request from a cancelled waiter awaiting its task's next step.

Scope and risk

Only the claim cancellation test's failure observer changes. It records fixed task and waiter booleans, plus the pending cancellation flag when the runtime exposes it. Task names, arguments, local values, input and exception content stay out of the packet. The existing task, frame and byte limits remain.

This adds diagnostic evidence; it does not establish or repair the cancellation failure's cause. The command, signal tests, stdin behavior, lifecycle assertions and exit deadlines are unchanged.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: reverting leaves no stored data or generated files.

Tests

Two isolated controls fail with missing observer fields before the change and pass after it. They distinguish a cancelled waiter before task resumption from a consumed cancellation followed by a fresh waiter.

The five selected observer and privacy cases pass. Scoped Ruff, format, prose and whitespace checks pass. An AST comparison verifies that every existing test and helper except the observer is unchanged, that all original assertions remain, and that the two new controls match their failing versions.

Full hosted CI and a fresh independent review are required after publication. The natural signal race and the claim subprocess tests were not repeated locally.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the observer fields and isolated controls. The source diff, regression failures, focused results and preservation proof were checked.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full format, lint, type and unit gates pass in hosted CI before merge.
  • No generated files, migrations, plugin files, frontend code, runtime configuration or wire behavior change.
  • Public text passes the prose check.
  • The commit is signed off.

Cancellation request counts omit whether their waiter was cancelled or replaced. Fixed booleans distinguish those states without recording private task content.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 21, 2026 3:05am UTC

Request Review

This branch has not been deployed

No deployments
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