Skip to content

Throw context-manager's CompressionWithdrawn for maintenance withdrawals (CM #196's fix needs the host half) #549

Closed

Description

@Anarchid

What's wrong (main b82ba630)

MaintenanceWithdrawnError (src/framework.ts:1150-1155, thrown at ~3866 under a surgery and ~3876 at stop()) is a plain Error subclass. context-manager #214 added a branded CompressionWithdrawn that every ladder rung and the merge path rethrow without recording anything, and closed context-manager#196 with it. The framework neither throws nor brands that class, so context-manager can't tell a withdrawal from a failure.

What happens today

Prerequisites

Suggested fix

Once a context-manager release carries #214:

  1. Bump the dependency.
  2. Make MaintenanceWithdrawnError extend CompressionWithdrawn, or set its brand Symbol.for('@animalabs/context-manager:compression-withdrawn').
  3. Add a test that a withdrawal mid-ladder leaves no quarantine.
  4. Update the stale docstrings on MaintenanceWithdrawnError (~1132-1149) and refuseHeldProviderModel (~4225-4233).

How found

Round-2 review of context-manager #138. Both reviewers found it, and it was probed with an error of the framework's exact shape.

Found during our review of anima-research/context-manager#138: anima-research/context-manager#138 (review)

Posted by the maintainer's desk assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions