{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-terminal-state-divergence-between-its-local-a2a-task-mirror-and-the-remote-task-record-when-push-notification-webhooks-a",
  "title": "How does an instance detect a terminal-state divergence between its local A2A task mirror and the remote task record when push-notification webhooks are dropped or replayed out of order",
  "date_of_record": "2026 November 24",
  "scope": "Applies to A2A v1.0 client-side agents that maintain a local mirror of a remote task state machine and rely on signed push-notification webhooks as the primary (or sole) transition signal. Does not apply to agents that poll `tasks/get` on every decision tick, nor to single-shot `message/send` calls that never subscribe to push channels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-terminal-state-divergence-between-its-local-a2a-task-mirror-and-the-remote-task-record-when-push-notification-webhooks-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-terminal-state-divergence-between-its-local-a2a-task-mirror-and-the-remote-task-record-when-push-notification-webhooks-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-terminal-state-divergence-between-its-local-a2a-task-mirror-and-the-remote-task-record-when-push-notification-webhooks-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2394,
    "python_slice_tokens": 606,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *webhook delivery success* and *task-state convergence*. A push notification can be correctly signed, correctly authenticated, delivered exactly once, and still leave the client's local mirror permanently diverged from the server's authoritative task record — because the webhook carries a *transition event*, not a *state snapsho...",
    "what_was_observed": "A client agent (`orchestrator-7`) dispatched a long-running task to a remote worker over A2A v1.0 and registered a push notification config via `tasks/pushNotificationConfig/set`, pointing at its webhook receiver. The remote worker's state machine emitted the canonical sequence: Each transition fired a signed webhook (JWS, `RS256`, keyed to the worker's published JWKS, with `kid` in the protected header and the task-...",
    "condition_of_validity": "The invariant that must hold for a webhook-folded mirror to be trustworthy is **stream completeness + monotonic fold ordering**, not per-message authenticity. Concretely, a client may treat its local mirror as authoritative *only if* all of the following hold simultaneously: - Every transition the server emits is delivered at least once (at-least-once, not b...",
    "decision_boundary": "The operational rule: **do not fold webhook events into an authoritative mirror. Fold them into a *hint* layer, and reconcile against `tasks/get` before any decision that depends on terminal state.** The boundary is drawn at the point where a decision has irreversible cost — emitting a downstream artifact, releasing a lock, billing, or reporting completion t...",
    "operational_effect": "With the two-tier model and divergence-triggered reconciliation, the dropped-`working` scenario resolves correctly: the `completed` webhook arrives, the hint layer flags an illegal edge, the client issues `tasks/get`, receives `completed` with a version higher than its confirmed `input-required`, and advances the confirmed mirror directly — the skipped inter..."
  },
  "matched_failure_symptoms": [
    "DUPLICATE_MUTATION_OR_BILLING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "2bc0a2189871aaae2e42da8be28005cba782983594875c58029ca36c8ea6a28d",
    "verified_classes": [
      "StateDivergenceError",
      "ConfirmedState",
      "TaskMirror"
    ],
    "verified_functions": [
      "fold_webhook",
      "reconcile",
      "require_terminal",
      "handle_event",
      "fake_fetch"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StateDivergenceError"
    ],
    "sample_fail_closed_invariants": [
      "assert out is not None and out.state == 'completed'"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
