{
  "schema": "task26-gate19-amended-matrix-v1",
  "task": 26,
  "gate": 19,
  "scope": "trainer-free deterministic negative and restart matrix",
  "authority": {
    "plan": ".omo/plans/dualcoach-production-readiness.md#specification-19",
    "historical_matrix": ".omo/evidence/dualcoach-task-19-matrix.json",
    "historical_matrix_sha256": "e43f6ed3b269f5aaf4324e2294170e8690c042d632b9a91efeac02ce5b576799",
    "amendment_reason": "The historical matrix named eight shared-room bootstrap phases and a transport test that do not exist in the current private-DM bootstrap state machine. The amended matrix covers all four current nonterminal states without reducing any other historical invariant and adds explicit owner-review stale, duplicate, and restart coverage required by Specification 19."
  },
  "candidate": {
    "full_candidate_digest": "50685ac2c063c5b18fa895cc1991e3473368d177c7309bf54af0374ea67ba1d1",
    "manifest_path": ".omo/evidence/task26/dualcoach-provider-auth-candidate-50685ac2c063c5b18fa895cc1991e3473368d177c7309bf54af0374ea67ba1d1/candidate-manifest.json",
    "manifest_sha256": "2135189a2025abd563ff4a8adf62af13a0da912b446fb53f9218b63c07a19a81",
    "wheel_path": ".omo/evidence/task26/dualcoach-provider-auth-candidate-50685ac2c063c5b18fa895cc1991e3473368d177c7309bf54af0374ea67ba1d1/artifacts/hermes_agent-0.17.0-py3-none-any.whl",
    "wheel_sha256": "e4bd655672edf148ee3026b44f78149402234ba5cc0be3db19b875cbd86659be",
    "candidate_artifact_change": "none; the restoration changes test-only sources outside the sealed wheel and provider-auth source closure, so the existing candidate and wheel pins are preserved"
  },
  "cases": [
    {
      "id": "wrong_actor_chat_and_topic",
      "invariant": "Only the canonical customer private-DM identity, chat, and topic may reach delivery reservation.",
      "nodes": [
        "tests/gateway/test_nutrition_coaching.py::test_telegram_customer_transport_rejects_wrong_customer_or_noncanonical_destination[user_id-other-user]",
        "tests/gateway/test_nutrition_coaching.py::test_telegram_customer_transport_rejects_wrong_customer_or_noncanonical_destination[chat_id-other-chat]",
        "tests/gateway/test_nutrition_coaching.py::test_telegram_customer_transport_rejects_wrong_customer_or_noncanonical_destination[topic_id-other-topic]"
      ]
    },
    {
      "id": "stale_revision_and_callback_expiry",
      "invariant": "Stale render or generation authority, expired callbacks, and replayed launcher callbacks cannot mutate durable business state.",
      "nodes": [
        "tests/gateway/test_telegram_physique_checkin.py::TestPhysiqueTelegramAdapterIngress::test_n3_callback_acknowledges_before_rejecting_stale_revision_or_render",
        "tests/gateway/test_telegram_physique_checkin.py::TestPhysiqueTelegramAdapterIngress::test_n3_callback_rejects_stale_render_identity_before_business_mutation",
        "tests/gateway/test_telegram_physique_checkin.py::TestPhysiqueCheckinBridge::test_replay_and_expiry_are_rejected_without_mutating_service"
      ]
    },
    {
      "id": "generation_failure_and_restart",
      "invariant": "Authentication failure remains retryable, invalid output remains nonretryable without a draft, and worker-crash recovery protects lease and CAS ownership.",
      "nodes": [
        "tests/gateway/test_nutrition_coaching.py::test_generation_worker_auth_failure_is_retryable_without_receipt_deletion",
        "tests/gateway/test_nutrition_coaching.py::test_generation_worker_invalid_output_creates_no_draft",
        "tests/gateway/test_nutrition_coaching.py::test_generation_worker_restart_reclaims_only_an_expired_lease",
        "tests/gateway/test_nutrition_coaching.py::test_generation_worker_stale_provider_return_cannot_persist_over_reclaimed_claim"
      ]
    },
    {
      "id": "gateway_restart_every_current_waiting_state",
      "invariant": "Every current nonterminal private-DM bootstrap phase survives durable-store reconstruction and dispatches only its authoritative recovery path.",
      "nodes": [
        "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[PREPARED]",
        "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[REGISTERING]",
        "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[AWAITING_CONSENT]",
        "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[AWAITING_ACTIVATION]"
      ],
      "assertions": {
        "PREPARED": "persists byte-equivalently with no recovery side effect",
        "REGISTERING": "durably registers the disabled customer then publishes and receipts one consent card",
        "AWAITING_CONSENT": "publishes and receipts one consent card without registration replay",
        "AWAITING_ACTIVATION": "dispatches exactly the onboarding-runtime recovery path without consent-card publication",
        "provider_calls": 0,
        "production_delivery_calls": 0
      }
    },
    {
      "id": "owner_review_negative_restart_and_card_recovery",
      "invariant": "Owner Revise and Reject use the canonical owner route; wrong actors, stale cards, and duplicate owner callbacks cannot apply a second mutation; restart finalizes only the durable owner approval.",
      "nodes": [
        "tests/gateway/test_telegram_nutrition_onboarding.py::test_review_callbacks_use_canonical_service_and_exact_role_route[op_rev-owner_review-review_as_owner-revise-owner-collecting-revision]",
        "tests/gateway/test_telegram_nutrition_onboarding.py::test_review_callbacks_use_canonical_service_and_exact_role_route[op_rej-owner_review-review_as_owner-rejected-owner-rejected-rejection]",
        "tests/gateway/test_telegram_nutrition_onboarding.py::test_review_callback_rejects_wrong_user_before_service_mutation",
        "tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py::test_stale_owner_review_callback_is_rejected_before_mutation",
        "tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py::test_restart_authenticates_original_owner_update_and_records_terminal_receipt",
        "tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py::test_restart_recovers_committed_owner_approval_without_second_review"
      ]
    },
    {
      "id": "provider_success_before_receipt_persistence",
      "invariant": "A transport success before local receipt persistence remains unknown and is never blindly resent after restart.",
      "nodes": [
        "tests/gateway/test_task7_generation_hardening.py::test_delivery_restart_after_transport_before_receipt_does_not_resend"
      ]
    },
    {
      "id": "duplicate_explicit_send",
      "invariant": "Repeated explicit send and duplicate approval callbacks cannot create a second delivery while outcome is unresolved.",
      "nodes": [
        "tests/gateway/test_nutrition_coaching.py::test_delivery_outbox_provider_timeout_callback_never_resends",
        "tests/gateway/test_nutrition_coaching.py::test_approval_receipt_is_immutable_duplicate_idempotent_and_zero_delivery"
      ]
    }
  ],
  "exact_nodes": [
    "tests/gateway/test_nutrition_coaching.py::test_telegram_customer_transport_rejects_wrong_customer_or_noncanonical_destination[user_id-other-user]",
    "tests/gateway/test_nutrition_coaching.py::test_telegram_customer_transport_rejects_wrong_customer_or_noncanonical_destination[chat_id-other-chat]",
    "tests/gateway/test_nutrition_coaching.py::test_telegram_customer_transport_rejects_wrong_customer_or_noncanonical_destination[topic_id-other-topic]",
    "tests/gateway/test_telegram_physique_checkin.py::TestPhysiqueTelegramAdapterIngress::test_n3_callback_acknowledges_before_rejecting_stale_revision_or_render",
    "tests/gateway/test_telegram_physique_checkin.py::TestPhysiqueTelegramAdapterIngress::test_n3_callback_rejects_stale_render_identity_before_business_mutation",
    "tests/gateway/test_telegram_physique_checkin.py::TestPhysiqueCheckinBridge::test_replay_and_expiry_are_rejected_without_mutating_service",
    "tests/gateway/test_nutrition_coaching.py::test_generation_worker_auth_failure_is_retryable_without_receipt_deletion",
    "tests/gateway/test_nutrition_coaching.py::test_generation_worker_invalid_output_creates_no_draft",
    "tests/gateway/test_nutrition_coaching.py::test_generation_worker_restart_reclaims_only_an_expired_lease",
    "tests/gateway/test_nutrition_coaching.py::test_generation_worker_stale_provider_return_cannot_persist_over_reclaimed_claim",
    "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[PREPARED]",
    "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[REGISTERING]",
    "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[AWAITING_CONSENT]",
    "tests/gateway/test_telegram_room_bootstrap_adversarial.py::test_restart_preserves_every_nonterminal_phase[AWAITING_ACTIVATION]",
    "tests/gateway/test_telegram_nutrition_onboarding.py::test_review_callbacks_use_canonical_service_and_exact_role_route[op_rev-owner_review-review_as_owner-revise-owner-collecting-revision]",
    "tests/gateway/test_telegram_nutrition_onboarding.py::test_review_callbacks_use_canonical_service_and_exact_role_route[op_rej-owner_review-review_as_owner-rejected-owner-rejected-rejection]",
    "tests/gateway/test_telegram_nutrition_onboarding.py::test_review_callback_rejects_wrong_user_before_service_mutation",
    "tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py::test_stale_owner_review_callback_is_rejected_before_mutation",
    "tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py::test_restart_authenticates_original_owner_update_and_records_terminal_receipt",
    "tests/gateway/test_telegram_nutrition_onboarding_callback_observability.py::test_restart_recovers_committed_owner_approval_without_second_review",
    "tests/gateway/test_task7_generation_hardening.py::test_delivery_restart_after_transport_before_receipt_does_not_resend",
    "tests/gateway/test_nutrition_coaching.py::test_delivery_outbox_provider_timeout_callback_never_resends",
    "tests/gateway/test_nutrition_coaching.py::test_approval_receipt_is_immutable_duplicate_idempotent_and_zero_delivery"
  ]
}
