# Keep a fulfillment cancellation request pending until answered

Separate a sent request from accepted, rejected and unanswered external work states.

## A request is not a confirmed work result

In the original F1 example, an external service already accepted fulfillment work. Request C1 asks it to cancel. This local contract treats an accepted cancellation answer as cancelled work, a rejected answer as active work and no answer as unknown work state. It presumes answer identity has already been matched to C1; event authentication/order/replay is outside the model.

Filled request and work-state timeline

| Stage | Evidence | Request state | Work state |
| --- | --- | --- | --- |
| Request sent | C1; no answer | Pending | Unknown |
| Accepted answer | C1 / accepted | Accepted | Cancelled under contract |
| Rejected answer | C1 / rejected | Rejected | Active |

## Preserve the actual external answer

The baseline has no answer, so C1 is pending and the current work state is unknown. “Request sent” is not proof that goods were intercepted, recovered or refunded. Accepted and rejected answers are separate alternative cases, not consecutive events that both happened.

1. Retain fulfillment and request IDs
2. Await the matched answer
3. Record accepted or rejected result
4. Keep unresolved work visible

Do not repeat a live cancellation request because a local status page was refreshed.

C1 is rejected. What are request and work states?

Request rejected; work active under this supplied contract. There is no confirmed cancellation.

## Define the handoff evidence before integrating

The complete material contains pending, accepted and rejected alternatives. A custom integration must establish matched references and authoritative current state; use the existing order-cancellation owner for internal work disposition.

Only accepted, rejected or null answers are accepted, with nonempty fulfillment/request IDs. Match the answer to the request before entering this model; it does not validate that identity. Unsupported answer values or malformed IDs are rejected, not turned into a stopped shipment. This page sends no request, buys no label, issues no refund and decides no cancellation rights.

The local timeline can supply a clear integration requirement without claiming the external service will always be able to stop work.

## Complete local records and trace

```json
{
  "issuer": "Astera Technology",
  "resource": "ops-fulfillment-cancellation-request-state",
  "locale": "en",
  "contract": "In the original F1 example, an external service already accepted fulfillment work. Request C1 asks it to cancel. This local contract treats an accepted cancellation answer as cancelled work, a rejected answer as active work and no answer as unknown work state. It presumes answer identity has already been matched to C1; event authentication/order/replay is outside the model.",
  "input": {
    "fulfillment": "F1",
    "request": "C1",
    "answer": null
  },
  "output": {
    "ok": true,
    "state": "unknown",
    "result": {
      "fulfillment": "F1",
      "request": "C1",
      "requestState": "pending",
      "workState": "unknown"
    },
    "trace": [
      {
        "id": "C1",
        "decision": "await-answer"
      }
    ]
  },
  "verificationCases": [
    {
      "name": "baseline",
      "input": {
        "fulfillment": "F1",
        "request": "C1",
        "answer": null
      },
      "expected": {
        "ok": true,
        "state": "unknown",
        "result": {
          "fulfillment": "F1",
          "request": "C1",
          "requestState": "pending",
          "workState": "unknown"
        }
      }
    },
    {
      "name": "material-edit",
      "input": {
        "fulfillment": "F1",
        "request": "C1",
        "answer": "accepted"
      },
      "expected": {
        "ok": true,
        "state": "complete",
        "result": {
          "fulfillment": "F1",
          "request": "C1",
          "requestState": "accepted",
          "workState": "cancelled"
        }
      }
    },
    {
      "name": "fresh-boundary",
      "input": {
        "fulfillment": "F1",
        "request": "C1",
        "answer": "rejected"
      },
      "expected": {
        "ok": true,
        "state": "complete",
        "result": {
          "fulfillment": "F1",
          "request": "C1",
          "requestState": "rejected",
          "workState": "active"
        }
      }
    }
  ],
  "meaningOfNull": "Unknown or no established value for the field; inspect its specific trace.",
  "businessSideEffects": false
}
```
