This is an automated email from the ASF dual-hosted git repository.

henry3260 pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-4-test by this push:
     new 0c3788b1ebe Fix rotate-fernet-key failing on trigger rows from 
deferred tasks (#77614) (#77718)
0c3788b1ebe is described below

commit 0c3788b1ebea6cbe14ac7e4112258c220bd7f95d
Author: Jed Cunningham <[email protected]>
AuthorDate: Fri Nov 27 18:45:32 2026 -0700

    Fix rotate-fernet-key failing on trigger rows from deferred tasks (#77614) 
(#77718)
---
 .../language-sdks/index.rst                        |   4 +-
 airflow-core/docs/security/secrets/fernet.rst      |   6 +-
 airflow-core/docs/security/security_model.rst      |   2 +-
 .../execution_api/datamodels/taskinstance.py       |  20 +--
 .../execution_api/routes/task_instances.py         |  11 +-
 .../api_fastapi/execution_api/versions/__init__.py |   2 +
 .../execution_api/versions/v2026_12_01.py          |  48 ++++++
 airflow-core/src/airflow/cli/cli_config.py         |   6 +-
 .../src/airflow/config_templates/config.yml        |   2 +-
 airflow-core/src/airflow/models/trigger.py         |  23 ++-
 .../versions/head/test_task_instances.py           |  29 ++++
 .../execution_api/versions/v2026_12_01/__init__.py |  16 ++
 .../versions/v2026_12_01/test_task_instances.py    |  83 ++++++++++
 .../cli/commands/test_rotate_fernet_key_command.py |  35 +++-
 docker-stack-docs/entrypoint.rst                   |   2 +-
 go-sdk/README.md                                   |   2 +-
 go-sdk/capabilities.yaml                           |   2 +-
 go-sdk/pkg/execution/genmodels/models.gen.go       | 183 +++++++++++----------
 go-sdk/pkg/execution/messages.go                   |   2 +-
 go-sdk/schema/supervisor-schema.json               |   5 +-
 scripts/ci/prek/check_security_doc_constants.py    |   2 +-
 .../src/airflow/sdk/api/datamodels/_generated.py   |   4 +-
 task-sdk/src/airflow/sdk/definitions/dag.py        |   4 +-
 .../airflow/sdk/execution_time/schema/schema.json  |   5 +-
 .../sdk/execution_time/schema/versions/__init__.py |   2 +
 .../execution_time/schema/versions/v2026_12_01.py  |  42 +++++
 .../execution_time/schema/test_migrator.py         |  51 +++++-
 ts-sdk/README.md                                   |   2 +-
 ts-sdk/capabilities.yaml                           |   2 +-
 ts-sdk/schema/supervisor-schema.json               |   5 +-
 ts-sdk/src/generated/supervisor.ts                 |  11 +-
 31 files changed, 439 insertions(+), 174 deletions(-)

diff --git a/airflow-core/docs/authoring-and-scheduling/language-sdks/index.rst 
b/airflow-core/docs/authoring-and-scheduling/language-sdks/index.rst
index 1414efab9d1..3b004bbcf9c 100644
--- a/airflow-core/docs/authoring-and-scheduling/language-sdks/index.rst
+++ b/airflow-core/docs/authoring-and-scheduling/language-sdks/index.rst
@@ -465,9 +465,9 @@ release that shipped it. See the legend below the tables 
for what each mark mean
      - 3.4.0
      - 3.4.0
    * - Current Supervisor Schema Version
+     - 2026-12-01
      - 2026-10-30
-     - 2026-10-30
-     - 2026-10-30
+     - 2026-12-01
 
 .. list-table:: Common to both authoring modes
    :header-rows: 1
diff --git a/airflow-core/docs/security/secrets/fernet.rst 
b/airflow-core/docs/security/secrets/fernet.rst
index 341e2186bd3..13a249f2afc 100644
--- a/airflow-core/docs/security/secrets/fernet.rst
+++ b/airflow-core/docs/security/secrets/fernet.rst
@@ -21,7 +21,7 @@ Fernet
 ------
 
 Airflow uses `Fernet <https://github.com/fernet/spec/>`__ to encrypt passwords 
in the connection
-configuration and the variable configuration. It guarantees that a password 
encrypted using it cannot be manipulated or read without the key.
+configuration, the variable configuration and the kwargs of triggers. It 
guarantees that a password encrypted using it cannot be manipulated or read 
without the key.
 Fernet is an implementation of symmetric (also known as "secret key") 
authenticated cryptography.
 
 The first time Airflow is started, the ``airflow.cfg`` file is generated with 
the default configuration and the unique Fernet
@@ -51,7 +51,7 @@ If you need to generate a new fernet key you can use the 
following code snippet.
 Rotating encryption keys
 ''''''''''''''''''''''''
 
-Once connection credentials and variables have been encrypted using a fernet
+Once connection credentials, variables and trigger kwargs have been encrypted 
using a fernet
 key, changing the key will cause decryption of existing credentials to fail. To
 rotate the fernet key without invalidating existing encrypted values, prepend
 the new key to the ``fernet_key`` setting, run
@@ -59,5 +59,5 @@ the new key to the ``fernet_key`` setting, run
 ``fernet_key``:
 
 #. Set ``fernet_key`` to ``new_fernet_key,old_fernet_key``
-#. Run ``airflow rotate-fernet-key`` to re-encrypt existing credentials with 
the new fernet key
+#. Run ``airflow rotate-fernet-key`` to re-encrypt existing credentials, 
variables and trigger kwargs with the new fernet key
 #. Set ``fernet_key`` to ``new_fernet_key``
diff --git a/airflow-core/docs/security/security_model.rst 
b/airflow-core/docs/security/security_model.rst
index 468f8efd999..f21a9f2c15a 100644
--- a/airflow-core/docs/security/security_model.rst
+++ b/airflow-core/docs/security/security_model.rst
@@ -740,7 +740,7 @@ model — Airflow does not enforce these natively.
         - Asset manager credentials
         - Dag File Processor
       * - ``AIRFLOW__CORE__FERNET_KEY``
-        - Fernet encryption key for connections/variables at rest
+        - Fernet encryption key for connections, variables and trigger kwargs 
at rest
         - API Server, Scheduler, Workers, Dag File Processor, Triggerer
       * - ``AIRFLOW__DATABASE__SQL_ALCHEMY_CONN``
         - Metadata database connection string
diff --git 
a/airflow-core/src/airflow/api_fastapi/execution_api/datamodels/taskinstance.py 
b/airflow-core/src/airflow/api_fastapi/execution_api/datamodels/taskinstance.py
index 45bf242fad2..880dec23203 100644
--- 
a/airflow-core/src/airflow/api_fastapi/execution_api/datamodels/taskinstance.py
+++ 
b/airflow-core/src/airflow/api_fastapi/execution_api/datamodels/taskinstance.py
@@ -168,23 +168,15 @@ class TIDeferredStatePayload(StrictBaseModel):
         ),
     ]
     classpath: str
-    trigger_kwargs: Annotated[dict[str, JsonValue] | str, 
Field(default_factory=dict)]
-    """
-    Kwargs to pass to the trigger constructor, either a plain dict or an 
encrypted string.
-
-    Both forms will be passed along to the trigger, the server will not handle 
either.
-    """
+    trigger_kwargs: Annotated[dict[str, JsonValue], 
Field(default_factory=dict)]
+    """Serde-encoded kwargs to pass to the trigger constructor. The server 
encrypts them before storing."""
 
     trigger_timeout: timedelta | None = None
     queue: str | None = None
     next_method: str
     """The name of the method on the operator to call in the worker after the 
trigger has fired."""
     next_kwargs: Annotated[dict[str, JsonValue], Field(default_factory=dict)]
-    """
-    Kwargs to pass to the above method, either a plain dict or an encrypted 
string.
-
-    Both forms will be passed along to the TaskSDK upon resume, the server 
will not handle either.
-    """
+    """Serde-encoded kwargs to pass to the above method; returned on resume 
with the event added under `event`."""
     rendered_map_index: str | None = None
 
 
@@ -225,11 +217,7 @@ class TIAwaitingInputStatePayload(StrictBaseModel):
     next_method: str
     """The name of the method on the operator to call in the worker after 
input is received."""
     next_kwargs: Annotated[dict[str, JsonValue], Field(default_factory=dict)]
-    """
-    Kwargs to pass to the above method, either a plain dict or an encrypted 
string.
-
-    Both forms will be passed along to the TaskSDK upon resume, the server 
will not handle either.
-    """
+    """Serde-encoded kwargs to pass to the above method; returned on resume 
with the event added under `event`."""
     rendered_map_index: str | None = None
 
 
diff --git 
a/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py 
b/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
index 3d0dcb5ccdc..bf31cbe6eaf 100644
--- 
a/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
+++ 
b/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
@@ -945,19 +945,12 @@ def _create_ti_state_update_query_and_update_state(
         if ti_patch_payload.trigger_timeout is not None:
             timeout = timezone.utcnow() + ti_patch_payload.trigger_timeout
 
-        trigger_kwargs = ti_patch_payload.trigger_kwargs
-        if not isinstance(trigger_kwargs, str):
-            # If it's passed as a string, assume the client encrypted it, 
otherwise assume it doesn't need to
-            # be. Just JSON serialize it
-            trigger_kwargs = json.dumps(trigger_kwargs)
-
-        trigger_row = Trigger(
+        trigger_row = Trigger.from_serialized_kwargs(
             classpath=ti_patch_payload.classpath,
-            kwargs={},
+            serialized_kwargs=ti_patch_payload.trigger_kwargs,
             queue=ti_patch_payload.queue,
             team_name=get_team_name_for_ti(task_instance_id, session),
         )
-        trigger_row.encrypted_kwargs = trigger_kwargs
         session.add(trigger_row)
         session.flush()
 
diff --git 
a/airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py 
b/airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py
index 981b1279b52..e6abf1e50b6 100644
--- a/airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py
+++ b/airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py
@@ -70,9 +70,11 @@ from airflow.api_fastapi.execution_api.versions.v2026_10_30 
import (
 from airflow.api_fastapi.execution_api.versions.v2026_10_30_xcom_params import 
(
     AddPreviousIterationToXComFilterParams,
 )
+from airflow.api_fastapi.execution_api.versions.v2026_12_01 import 
RemoveStringTriggerKwargs
 
 bundle = VersionBundle(
     HeadVersion(),
+    Version("2026-12-01", RemoveStringTriggerKwargs),
     Version(
         "2026-10-30",
         AddArgBindingsToTIRunContext,
diff --git 
a/airflow-core/src/airflow/api_fastapi/execution_api/versions/v2026_12_01.py 
b/airflow-core/src/airflow/api_fastapi/execution_api/versions/v2026_12_01.py
new file mode 100644
index 00000000000..5367e27bf4d
--- /dev/null
+++ b/airflow-core/src/airflow/api_fastapi/execution_api/versions/v2026_12_01.py
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from __future__ import annotations
+
+from cadwyn import RequestInfo, VersionChange, 
convert_request_to_next_version_for, schema
+from fastapi import HTTPException
+from pydantic import JsonValue
+
+from airflow.api_fastapi.compat import HTTP_422_UNPROCESSABLE_CONTENT
+from airflow.api_fastapi.execution_api.datamodels.taskinstance import 
TIDeferredStatePayload
+
+
+class RemoveStringTriggerKwargs(VersionChange):
+    """Stop accepting `trigger_kwargs` as a string in 
TIDeferredStatePayload."""
+
+    description = __doc__
+
+    instructions_to_migrate_to_previous_version = (
+        
schema(TIDeferredStatePayload).field("trigger_kwargs").had(type=dict[str, 
JsonValue] | str),
+    )
+
+    # Keyed by path: cadwyn 8 can't match a body-schema converter to one 
member of the TIStateUpdate union.
+    
@convert_request_to_next_version_for("/task-instances/{task_instance_id}/state",
 ["PATCH"])  # type: ignore[arg-type]
+    def reject_string_trigger_kwargs(request: RequestInfo) -> None:
+        """Reject a string from older clients; the server can't tell whether 
it is encrypted."""
+        if isinstance(request.body, dict) and 
isinstance(request.body.get("trigger_kwargs"), str):
+            raise HTTPException(
+                status_code=HTTP_422_UNPROCESSABLE_CONTENT,
+                detail={
+                    "reason": "invalid_trigger_kwargs",
+                    "message": "trigger_kwargs must be a serialized dict, not 
a string",
+                },
+            )
diff --git a/airflow-core/src/airflow/cli/cli_config.py 
b/airflow-core/src/airflow/cli/cli_config.py
index c3f9d14ce82..f85d508dd38 100644
--- a/airflow-core/src/airflow/cli/cli_config.py
+++ b/airflow-core/src/airflow/cli/cli_config.py
@@ -2335,10 +2335,10 @@ core_commands: list[CLICommand] = [
     ActionCommand(
         name="rotate-fernet-key",
         
func=lazy_load_command("airflow.cli.commands.rotate_fernet_key_command.rotate_fernet_key"),
-        help="Rotate encrypted connection credentials and variables",
+        help="Rotate encrypted connection credentials, variables and trigger 
kwargs",
         description=(
-            "Rotate all encrypted connection credentials and variables; see "
-            
"https://airflow.apache.org/docs/apache-airflow/stable/howto/secure-connections.html";
+            "Rotate all encrypted connection credentials, variables and 
trigger kwargs; see "
+            
"https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html";
             "#rotating-encryption-keys"
         ),
         args=(),
diff --git a/airflow-core/src/airflow/config_templates/config.yml 
b/airflow-core/src/airflow/config_templates/config.yml
index b87f27c5093..2f278b8e388 100644
--- a/airflow-core/src/airflow/config_templates/config.yml
+++ b/airflow-core/src/airflow/config_templates/config.yml
@@ -238,7 +238,7 @@ core:
       type: boolean
     fernet_key:
       description: |
-        Secret key to save connection passwords in the db
+        Secret key to encrypt connection passwords, variables and trigger 
kwargs in the db
       version_added: ~
       type: string
       sensitive: true
diff --git a/airflow-core/src/airflow/models/trigger.py 
b/airflow-core/src/airflow/models/trigger.py
index 6e857c1fe65..f1f1f1ce5c3 100644
--- a/airflow-core/src/airflow/models/trigger.py
+++ b/airflow-core/src/airflow/models/trigger.py
@@ -173,9 +173,8 @@ class Trigger(Base):
         from airflow.models.crypto import get_fernet
         from airflow.sdk.serde import deserialize
 
-        # We weren't able to encrypt the kwargs in all migration paths,
-        # so we need to handle the case where they are not encrypted.
-        # Triggers aren't long lasting, so we can skip encrypting them now.
+        # Plaintext JSON comes from running without a fernet key, the offline 
2.9 migration,
+        # or task deferrals in older Airflow 3 releases.
         if encrypted_kwargs.startswith("{"):
             decrypted_kwargs = json.loads(encrypted_kwargs)
         else:
@@ -198,7 +197,11 @@ class Trigger(Base):
         """Encrypts data with a new key. See: :ref:`security/fernet`."""
         from airflow.models.crypto import get_fernet
 
-        self.encrypted_kwargs = 
get_fernet().rotate(self.encrypted_kwargs.encode("utf-8")).decode("utf-8")
+        fernet = get_fernet()
+        if self.encrypted_kwargs.startswith("{"):
+            self.encrypted_kwargs = 
fernet.encrypt(self.encrypted_kwargs.encode("utf-8")).decode("utf-8")
+        else:
+            self.encrypted_kwargs = 
fernet.rotate(self.encrypted_kwargs.encode("utf-8")).decode("utf-8")
 
     @classmethod
     def from_object(cls, trigger: BaseTrigger) -> Trigger:
@@ -208,15 +211,19 @@ class Trigger(Base):
 
     @classmethod
     def from_serialized_kwargs(
-        cls, classpath: str, serialized_kwargs: dict[str, Any], queue: str | 
None = None
+        cls,
+        classpath: str,
+        serialized_kwargs: dict[str, Any],
+        queue: str | None = None,
+        team_name: str | None = None,
     ) -> Trigger:
         """
         Create a trigger row from kwargs that are already in their 
serde-encoded form.
 
-        The kwargs are stored exactly as given and decoded by the triggerer 
when it creates
-        the trigger, the same as kwargs stored by :meth:`from_object`.
+        The kwargs are encrypted without being re-serialized and decoded by 
the triggerer when it
+        creates the trigger, the same as kwargs stored by :meth:`from_object`.
         """
-        trigger = cls(classpath=classpath, kwargs={}, queue=queue)
+        trigger = cls(classpath=classpath, kwargs={}, queue=queue, 
team_name=team_name)
         trigger.encrypted_kwargs = 
cls._encrypt_serialized_kwargs(serialized_kwargs)
         return trigger
 
diff --git 
a/airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_task_instances.py
 
b/airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_task_instances.py
index 0a94edfa0cb..027272527f0 100644
--- 
a/airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_task_instances.py
+++ 
b/airflow-core/tests/unit/api_fastapi/execution_api/versions/head/test_task_instances.py
@@ -17,6 +17,7 @@
 
 from __future__ import annotations
 
+import json
 import re
 from concurrent.futures import ThreadPoolExecutor
 from contextlib import nullcontext
@@ -62,6 +63,7 @@ from airflow.exceptions import AirflowSkipException, 
TaskNotFound
 from airflow.jobs.scheduler_job_runner import SchedulerJobRunner
 from airflow.models import DagRun, RenderedTaskInstanceFields, TaskReschedule, 
Trigger
 from airflow.models.asset import AssetActive, AssetAliasModel, AssetEvent, 
AssetModel
+from airflow.models.crypto import get_fernet
 from airflow.models.dag import DagModel
 from airflow.models.dag_version import DagVersion
 from airflow.models.dagbag import DBDagBag
@@ -3937,6 +3939,8 @@ class TestTIUpdateState:
             assert len(t) == 1
             assert t[0].created_date == instant
             assert t[0].classpath == "my-classpath"
+            stored = 
get_fernet().decrypt(t[0].encrypted_kwargs.encode("utf-8"))
+            assert json.loads(stored) == payload["trigger_kwargs"]
             assert t[0].kwargs == {
                 "key": "value",
                 "moment": datetime(2024, 12, 18, 00, 00, 1, 
tzinfo=timezone.utc),
@@ -3946,6 +3950,31 @@ class TestTIUpdateState:
             else:
                 assert t[0].queue is None
 
+    def test_ti_update_state_to_deferred_rejects_string_trigger_kwargs(
+        self, client, session, create_task_instance
+    ):
+        ti = create_task_instance(
+            
task_id="test_ti_update_state_to_deferred_rejects_string_trigger_kwargs",
+            state=State.RUNNING,
+            session=session,
+        )
+        session.commit()
+
+        response = client.patch(
+            f"/execution/task-instances/{ti.id}/state",
+            json={
+                "state": "deferred",
+                "trigger_kwargs": '{"key": "value"}',
+                "classpath": "my-classpath",
+                "next_method": "execute_callback",
+            },
+        )
+
+        assert response.status_code == 422
+        session.expire_all()
+        assert session.scalar(select(TaskInstance.state).where(TaskInstance.id 
== ti.id)) == State.RUNNING
+        assert session.scalars(select(Trigger)).all() == []
+
     @staticmethod
     def _defer_ti_in_team_bundle(client, session, create_task_instance):
         """Map the TI's Dag to a bundle/team, then defer it via the Execution 
API."""
diff --git 
a/airflow-core/tests/unit/api_fastapi/execution_api/versions/v2026_12_01/__init__.py
 
b/airflow-core/tests/unit/api_fastapi/execution_api/versions/v2026_12_01/__init__.py
new file mode 100644
index 00000000000..13a83393a91
--- /dev/null
+++ 
b/airflow-core/tests/unit/api_fastapi/execution_api/versions/v2026_12_01/__init__.py
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
diff --git 
a/airflow-core/tests/unit/api_fastapi/execution_api/versions/v2026_12_01/test_task_instances.py
 
b/airflow-core/tests/unit/api_fastapi/execution_api/versions/v2026_12_01/test_task_instances.py
new file mode 100644
index 00000000000..f8014549f76
--- /dev/null
+++ 
b/airflow-core/tests/unit/api_fastapi/execution_api/versions/v2026_12_01/test_task_instances.py
@@ -0,0 +1,83 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import pytest
+from sqlalchemy import select
+
+from airflow.models import TaskInstance, Trigger
+from airflow.utils.state import State
+
+from tests_common.test_utils.db import clear_db_runs, clear_db_triggers
+
+pytestmark = pytest.mark.db_test
+
+PREVIOUS_VERSION = "2026-10-30"
+
+
[email protected](autouse=True)
+def _clean_db():
+    clear_db_runs()
+    clear_db_triggers()
+    yield
+    clear_db_runs()
+    clear_db_triggers()
+
+
[email protected](
+    ("trigger_kwargs", "expected_status", "expected_state"),
+    [
+        pytest.param({"key": "value"}, 204, State.DEFERRED, id="dict"),
+        pytest.param('{"key": "value"}', 422, State.RUNNING, id="string"),
+    ],
+)
+def test_old_version_deferral_trigger_kwargs(
+    client, session, create_task_instance, trigger_kwargs, expected_status, 
expected_state
+):
+    ti = create_task_instance(
+        task_id="test_old_version_deferral_trigger_kwargs", 
state=State.RUNNING, session=session
+    )
+    session.commit()
+    client.headers["Airflow-API-Version"] = PREVIOUS_VERSION
+
+    response = client.patch(
+        f"/execution/task-instances/{ti.id}/state",
+        json={
+            "state": "deferred",
+            "trigger_kwargs": trigger_kwargs,
+            "classpath": "my-classpath",
+            "next_method": "execute_callback",
+        },
+    )
+
+    assert response.status_code == expected_status, response.text
+    if expected_status == 422:
+        assert response.json()["detail"]["reason"] == "invalid_trigger_kwargs"
+    session.expire_all()
+    assert session.scalar(select(TaskInstance.state).where(TaskInstance.id == 
ti.id)) == expected_state
+    triggers = session.scalars(select(Trigger)).all()
+    assert [t.kwargs for t in triggers] == ([trigger_kwargs] if 
expected_status == 204 else [])
+
+
[email protected]("version", [PREVIOUS_VERSION, "2026-12-01"])
+def test_trigger_kwargs_schema_by_version(client, version):
+    response = client.get(f"/execution/openapi.json?version={version}")
+
+    assert response.status_code == 200
+    field = 
response.json()["components"]["schemas"]["TIDeferredStatePayload"]["properties"]["trigger_kwargs"]
+    types = {option.get("type") for option in field.get("oneOf", [field])}
+    assert ("string" in types) == (version == PREVIOUS_VERSION)
diff --git 
a/airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py 
b/airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py
index ec661a156f2..7311c5c6e08 100644
--- a/airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py
+++ b/airflow-core/tests/unit/cli/commands/test_rotate_fernet_key_command.py
@@ -16,6 +16,7 @@
 # under the License.
 from __future__ import annotations
 
+import json
 from argparse import ArgumentParser
 from typing import TYPE_CHECKING
 
@@ -25,13 +26,13 @@ from sqlalchemy import select
 
 from airflow.cli import cli_parser
 from airflow.cli.commands import rotate_fernet_key_command
-from airflow.models import Connection, Variable
+from airflow.models import Connection, Trigger, Variable
 from airflow.models.crypto import get_fernet
 from airflow.sdk import BaseHook
 from airflow.utils.session import provide_session
 
 from tests_common.test_utils.config import conf_vars
-from tests_common.test_utils.db import clear_db_connections, clear_db_variables
+from tests_common.test_utils.db import clear_db_connections, 
clear_db_triggers, clear_db_variables
 
 if TYPE_CHECKING:
     from sqlalchemy.orm import Session
@@ -49,10 +50,12 @@ class TestRotateFernetKeyCommand:
     def setup_method(self) -> None:
         clear_db_connections(add_default_connections_back=False)
         clear_db_variables()
+        clear_db_triggers()
 
     def teardown_method(self) -> None:
         clear_db_connections(add_default_connections_back=False)
         clear_db_variables()
+        clear_db_triggers()
 
     @provide_session
     def test_should_rotate_variable(self, *, session: Session):
@@ -143,3 +146,31 @@ class TestRotateFernetKeyCommand:
             # Mock for the second connection
             mock_supervisor_comms.send.return_value = 
mock_get_connection(var2_key)
             assert BaseHook.get_connection(var2_key).password == "pass"
+
+    @provide_session
+    def test_should_rotate_trigger_and_encrypt_plaintext_trigger(self, *, 
session: Session):
+        fernet_key1 = Fernet.generate_key()
+        fernet_key2 = Fernet.generate_key()
+        classpath = "airflow.triggers.testing.SuccessTrigger"
+
+        with conf_vars({("core", "fernet_key"): fernet_key1.decode()}):
+            get_fernet.cache_clear()
+            encrypted = Trigger(classpath=classpath, kwargs={"secret": 
"encrypted"})
+            # Plaintext JSON, as written by task deferrals on earlier Airflow 
3 releases.
+            plaintext = Trigger(classpath=classpath, kwargs={})
+            plaintext.encrypted_kwargs = json.dumps({"secret": "plaintext"})
+            session.add_all([encrypted, plaintext])
+            session.commit()
+
+        with conf_vars({("core", "fernet_key"): 
f"{fernet_key2.decode()},{fernet_key1.decode()}"}):
+            get_fernet.cache_clear()
+            args = self.parser.parse_args(["rotate-fernet-key"])
+            rotate_fernet_key_command.rotate_fernet_key(args)
+
+        session.expire_all()
+        with conf_vars({("core", "fernet_key"): fernet_key2.decode()}):
+            get_fernet.cache_clear()
+            rotated_encrypted, rotated_plaintext = 
session.scalars(select(Trigger).order_by(Trigger.id))
+            assert rotated_encrypted.kwargs == {"secret": "encrypted"}
+            assert "plaintext" not in rotated_plaintext.encrypted_kwargs
+            assert rotated_plaintext.kwargs == {"secret": "plaintext"}
diff --git a/docker-stack-docs/entrypoint.rst b/docker-stack-docs/entrypoint.rst
index 94f92d7c1df..7d039af7ef0 100644
--- a/docker-stack-docs/entrypoint.rst
+++ b/docker-stack-docs/entrypoint.rst
@@ -211,7 +211,7 @@ If there are any other arguments - they are simply passed 
to the "airflow" comma
           kerberos          Start a kerberos ticket renewer
           plugins           Dump information about loaded plugins
           rotate-fernet-key
-                            Rotate encrypted connection credentials and 
variables
+                            Rotate encrypted connection credentials, variables 
and trigger kwargs
           scheduler         Start a scheduler instance
           standalone        Run an all-in-one copy of Airflow
           triggerer         Start a triggerer instance
diff --git a/go-sdk/README.md b/go-sdk/README.md
index 6da0ccba329..33a6f922efb 100644
--- a/go-sdk/README.md
+++ b/go-sdk/README.md
@@ -117,7 +117,7 @@ prek hook regenerate it.
 
 <!-- BEGIN AUTO-GENERATED LANG-SDK COMPAT MATRIX -->
 
-*Min. Airflow version: 3.4.0 · supervisor schema: 2026-10-30*
+*Min. Airflow version: 3.4.0 · supervisor schema: 2026-12-01*
 
 | Dimension | Tier | Supported | Since (Airflow) | Since (SDK) | Notes |
 |---|---|---|---|---|---|
diff --git a/go-sdk/capabilities.yaml b/go-sdk/capabilities.yaml
index 95b39727d49..ad076d32fd6 100644
--- a/go-sdk/capabilities.yaml
+++ b/go-sdk/capabilities.yaml
@@ -21,7 +21,7 @@ min_airflow_version: "3.4.0"
 
 # Keep in sync with SupervisorSchemaVersion in pkg/execution/messages.go, 
which is embedded in
 # bundle metadata. The render hook fails if the two disagree.
-supervisor_schema_version: "2026-10-30"
+supervisor_schema_version: "2026-12-01"
 
 # The task runner terminates a task with SucceedTask, RetryTask, or TaskState 
(failed/removed); only
 # an airflow.TriggerDagRun task emits TaskState skipped or DeferTask. It does 
not emit RescheduleTask
diff --git a/go-sdk/pkg/execution/genmodels/models.gen.go 
b/go-sdk/pkg/execution/genmodels/models.gen.go
index fbf36031cea..eadb29c434f 100644
--- a/go-sdk/pkg/execution/genmodels/models.gen.go
+++ b/go-sdk/pkg/execution/genmodels/models.gen.go
@@ -1662,33 +1662,60 @@ type StartupDetails struct {
        Type string `msgpack:"type,omitempty"`
 }
 
+const TaskInstanceStateScheduled TaskInstanceState = "scheduled"
+const TaskInstanceStateRemoved TaskInstanceState = "removed"
+
+type TaskInstanceState string
+
 type States []string
 
-// Update a task's state to success. Includes task_outlets and outlet_events 
for
-// registering asset events.
-type SucceedTask struct {
-       // EndDate corresponds to the JSON schema field "end_date".
-       EndDate time.Time `msgpack:"end_date"`
+type VersionData map[string]interface{}
 
-       // LoopDecision corresponds to the JSON schema field "loop_decision".
-       LoopDecision *LoopDecisionPayload `msgpack:"loop_decision,omitempty"`
+// Schema for TaskInstance model with minimal required fields needed for 
Runtime.
+type TaskInstance struct {
+       // ContextCarrier corresponds to the JSON schema field 
"context_carrier".
+       ContextCarrier *ContextCarrier `msgpack:"context_carrier,omitempty"`
 
-       // OutletEvents corresponds to the JSON schema field "outlet_events".
-       OutletEvents *OutletEvents `msgpack:"outlet_events,omitempty"`
+       // DagID corresponds to the JSON schema field "dag_id".
+       DagID string `msgpack:"dag_id"`
 
-       // RenderedMapIndex corresponds to the JSON schema field 
"rendered_map_index".
-       RenderedMapIndex interface{} `msgpack:"rendered_map_index,omitempty"`
+       // DagVersionID corresponds to the JSON schema field "dag_version_id".
+       DagVersionID string `msgpack:"dag_version_id"`
 
-       // State corresponds to the JSON schema field "state".
-       State string `msgpack:"state,omitempty"`
+       // Hostname corresponds to the JSON schema field "hostname".
+       Hostname interface{} `msgpack:"hostname,omitempty"`
 
-       // TaskOutlets corresponds to the JSON schema field "task_outlets".
-       TaskOutlets *TaskOutlets `msgpack:"task_outlets,omitempty"`
+       // ID corresponds to the JSON schema field "id".
+       ID string `msgpack:"id"`
 
-       // Type corresponds to the JSON schema field "type".
-       Type string `msgpack:"type,omitempty"`
+       // MapIndex corresponds to the JSON schema field "map_index".
+       MapIndex *int `msgpack:"map_index,omitempty"`
+
+       // Queue corresponds to the JSON schema field "queue".
+       Queue string `msgpack:"queue,omitempty"`
+
+       // RegionID corresponds to the JSON schema field "region_id".
+       RegionID *string `msgpack:"region_id,omitempty"`
+
+       // RegionIndex corresponds to the JSON schema field "region_index".
+       RegionIndex *int `msgpack:"region_index,omitempty"`
+
+       // RunID corresponds to the JSON schema field "run_id".
+       RunID string `msgpack:"run_id"`
+
+       // TaskID corresponds to the JSON schema field "task_id".
+       TaskID string `msgpack:"task_id"`
+
+       // TryNumber corresponds to the JSON schema field "try_number".
+       TryNumber int `msgpack:"try_number"`
 }
 
+type Warnings []interface{}
+
+type TriggerKwargs map[string]interface{}
+
+type TaskArgBinding interface{}
+
 // Response containing count of Task Instances matching certain filters.
 type TICount struct {
        // Count corresponds to the JSON schema field "count".
@@ -1698,6 +1725,34 @@ type TICount struct {
        Type string `msgpack:"type,omitempty"`
 }
 
+// Variable schema for responses with fields that are needed for Runtime.
+type VariableResponse struct {
+       // Key corresponds to the JSON schema field "key".
+       Key string `msgpack:"key"`
+
+       // Value corresponds to the JSON schema field "value".
+       Value interface{} `msgpack:"value"`
+}
+
+const TaskInstanceStateRunning TaskInstanceState = "running"
+const TaskInstanceStateSuccess TaskInstanceState = "success"
+const TaskInstanceStateRestarting TaskInstanceState = "restarting"
+
+type TaskOutlets []AssetProfile
+
+const TaskInstanceStateUpForRetry TaskInstanceState = "up_for_retry"
+const TaskInstanceStateUpForReschedule TaskInstanceState = "up_for_reschedule"
+const TaskInstanceStateUpstreamFailed TaskInstanceState = "upstream_failed"
+
+const TaskInstanceStateSkipped TaskInstanceState = "skipped"
+const TaskInstanceStateDeferred TaskInstanceState = "deferred"
+const TaskInstanceStateAwaitingInput TaskInstanceState = "awaiting_input"
+
+type TaskIds []string
+
+const TaskInstanceStateFailed TaskInstanceState = "failed"
+const TaskInstanceStateQueued TaskInstanceState = "queued"
+
 // Response schema for TaskInstance run context.
 type TIRunContext struct {
        // ArgBindings corresponds to the JSON schema field "arg_bindings".
@@ -1748,86 +1803,36 @@ type TIRunContext struct {
        XcomKeysToClear []string `msgpack:"xcom_keys_to_clear,omitempty"`
 }
 
-type TaskArgBinding interface{}
-
-type TriggerKwargs map[string]interface{}
-
-type Warnings []interface{}
-
-type TaskIds []string
-
-// Variable schema for responses with fields that are needed for Runtime.
-type VariableResponse struct {
-       // Key corresponds to the JSON schema field "key".
-       Key string `msgpack:"key"`
-
-       // Value corresponds to the JSON schema field "value".
-       Value interface{} `msgpack:"value"`
-}
-
-// Schema for TaskInstance model with minimal required fields needed for 
Runtime.
-type TaskInstance struct {
-       // ContextCarrier corresponds to the JSON schema field 
"context_carrier".
-       ContextCarrier *ContextCarrier `msgpack:"context_carrier,omitempty"`
-
-       // DagID corresponds to the JSON schema field "dag_id".
-       DagID string `msgpack:"dag_id"`
-
-       // DagVersionID corresponds to the JSON schema field "dag_version_id".
-       DagVersionID string `msgpack:"dag_version_id"`
-
-       // Hostname corresponds to the JSON schema field "hostname".
-       Hostname interface{} `msgpack:"hostname,omitempty"`
-
-       // ID corresponds to the JSON schema field "id".
-       ID string `msgpack:"id"`
-
-       // MapIndex corresponds to the JSON schema field "map_index".
-       MapIndex *int `msgpack:"map_index,omitempty"`
-
-       // Queue corresponds to the JSON schema field "queue".
-       Queue string `msgpack:"queue,omitempty"`
-
-       // RegionID corresponds to the JSON schema field "region_id".
-       RegionID *string `msgpack:"region_id,omitempty"`
-
-       // RegionIndex corresponds to the JSON schema field "region_index".
-       RegionIndex *int `msgpack:"region_index,omitempty"`
-
-       // RunID corresponds to the JSON schema field "run_id".
-       RunID string `msgpack:"run_id"`
+type TaskBreadcrumbsResultBreadcrumbsElem map[string]interface{}
 
-       // TaskID corresponds to the JSON schema field "task_id".
-       TaskID string `msgpack:"task_id"`
+type TaskBreadcrumbsResult struct {
+       // Breadcrumbs corresponds to the JSON schema field "breadcrumbs".
+       Breadcrumbs []TaskBreadcrumbsResultBreadcrumbsElem 
`msgpack:"breadcrumbs"`
 
-       // TryNumber corresponds to the JSON schema field "try_number".
-       TryNumber int `msgpack:"try_number"`
+       // Type corresponds to the JSON schema field "type".
+       Type string `msgpack:"type,omitempty"`
 }
 
-const TaskInstanceStateAwaitingInput TaskInstanceState = "awaiting_input"
-const TaskInstanceStateDeferred TaskInstanceState = "deferred"
-const TaskInstanceStateSkipped TaskInstanceState = "skipped"
-const TaskInstanceStateUpstreamFailed TaskInstanceState = "upstream_failed"
-const TaskInstanceStateUpForReschedule TaskInstanceState = "up_for_reschedule"
-const TaskInstanceStateUpForRetry TaskInstanceState = "up_for_retry"
-const TaskInstanceStateFailed TaskInstanceState = "failed"
-const TaskInstanceStateRestarting TaskInstanceState = "restarting"
-const TaskInstanceStateSuccess TaskInstanceState = "success"
-const TaskInstanceStateRunning TaskInstanceState = "running"
-const TaskInstanceStateQueued TaskInstanceState = "queued"
+// Update a task's state to success. Includes task_outlets and outlet_events 
for
+// registering asset events.
+type SucceedTask struct {
+       // EndDate corresponds to the JSON schema field "end_date".
+       EndDate time.Time `msgpack:"end_date"`
 
-const TaskInstanceStateScheduled TaskInstanceState = "scheduled"
-const TaskInstanceStateRemoved TaskInstanceState = "removed"
+       // LoopDecision corresponds to the JSON schema field "loop_decision".
+       LoopDecision *LoopDecisionPayload `msgpack:"loop_decision,omitempty"`
 
-type TaskInstanceState string
+       // OutletEvents corresponds to the JSON schema field "outlet_events".
+       OutletEvents *OutletEvents `msgpack:"outlet_events,omitempty"`
 
-type TaskOutlets []AssetProfile
+       // RenderedMapIndex corresponds to the JSON schema field 
"rendered_map_index".
+       RenderedMapIndex interface{} `msgpack:"rendered_map_index,omitempty"`
 
-type TaskBreadcrumbsResultBreadcrumbsElem map[string]interface{}
+       // State corresponds to the JSON schema field "state".
+       State string `msgpack:"state,omitempty"`
 
-type TaskBreadcrumbsResult struct {
-       // Breadcrumbs corresponds to the JSON schema field "breadcrumbs".
-       Breadcrumbs []TaskBreadcrumbsResultBreadcrumbsElem 
`msgpack:"breadcrumbs"`
+       // TaskOutlets corresponds to the JSON schema field "task_outlets".
+       TaskOutlets *TaskOutlets `msgpack:"task_outlets,omitempty"`
 
        // Type corresponds to the JSON schema field "type".
        Type string `msgpack:"type,omitempty"`
@@ -1969,8 +1974,6 @@ type UpdateDagRunNote struct {
        Type string `msgpack:"type,omitempty"`
 }
 
-type VersionData map[string]interface{}
-
 // Update the response content part of an existing Human-in-the-loop response.
 type UpdateHITLDetail struct {
        // ChosenOptions corresponds to the JSON schema field "chosen_options".
diff --git a/go-sdk/pkg/execution/messages.go b/go-sdk/pkg/execution/messages.go
index 1dd59620125..560fd5f62dc 100644
--- a/go-sdk/pkg/execution/messages.go
+++ b/go-sdk/pkg/execution/messages.go
@@ -32,7 +32,7 @@ import (
 // reported in a bundle's airflow-metadata manifest as
 // sdk.supervisor_schema_version so the supervisor can down/upgrade messages to
 // a shape the bundle understands.
-const SupervisorSchemaVersion = "2026-10-30"
+const SupervisorSchemaVersion = "2026-12-01"
 
 // The message-type discriminator strings (genmodels.Type*) are generated from 
the
 // schema's "type" consts in discriminators.gen.go; outbound messages stamp the
diff --git a/go-sdk/schema/supervisor-schema.json 
b/go-sdk/schema/supervisor-schema.json
index e739708d12d..5fe1d211da2 100644
--- a/go-sdk/schema/supervisor-schema.json
+++ b/go-sdk/schema/supervisor-schema.json
@@ -1,6 +1,6 @@
 {
   "$schema": "https://json-schema.org/draft/2020-12/schema";,
-  "api_version": "2026-10-30",
+  "api_version": "2026-12-01",
   "description": "Apache Airflow SDK Supervisor Schema",
   "$defs": {
     "AssetAliasReferenceAssetEventDagRun": {
@@ -1555,9 +1555,6 @@
               },
               "type": "object"
             },
-            {
-              "type": "string"
-            },
             {
               "type": "null"
             }
diff --git a/scripts/ci/prek/check_security_doc_constants.py 
b/scripts/ci/prek/check_security_doc_constants.py
index 05e59ba89bf..cf49e41f202 100755
--- a/scripts/ci/prek/check_security_doc_constants.py
+++ b/scripts/ci/prek/check_security_doc_constants.py
@@ -94,7 +94,7 @@ CORE_DESCRIPTIONS: dict[tuple[str, str], str] = {
     ("api", "secret_key"): "API secret key for log token signing",
     ("api_auth", "jwt_secret"): "JWT signing key (symmetric mode)",
     ("core", "asset_manager_kwargs"): "Asset manager credentials",
-    ("core", "fernet_key"): "Fernet encryption key for connections/variables 
at rest",
+    ("core", "fernet_key"): "Fernet encryption key for connections, variables 
and trigger kwargs at rest",
     ("database", "sql_alchemy_conn"): "Metadata database connection string",
     ("database", "sql_alchemy_conn_async"): "Async metadata database 
connection string",
     ("database", "sql_alchemy_engine_args"): "SQLAlchemy engine parameters 
(may contain credentials)",
diff --git a/task-sdk/src/airflow/sdk/api/datamodels/_generated.py 
b/task-sdk/src/airflow/sdk/api/datamodels/_generated.py
index 508059029ad..d0da28b1cb5 100644
--- a/task-sdk/src/airflow/sdk/api/datamodels/_generated.py
+++ b/task-sdk/src/airflow/sdk/api/datamodels/_generated.py
@@ -27,7 +27,7 @@ from uuid import UUID
 
 from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, JsonValue, 
RootModel
 
-API_VERSION: Final[str] = "2026-10-30"
+API_VERSION: Final[str] = "2026-12-01"
 
 
 class AssetAliasReferenceAssetEventDagRun(BaseModel):
@@ -316,7 +316,7 @@ class TIDeferredStatePayload(BaseModel):
     )
     state: Annotated[Literal["deferred"], Field(title="State")] = "deferred"
     classpath: Annotated[str, Field(title="Classpath")]
-    trigger_kwargs: Annotated[dict[str, JsonValue | None] | str | None, 
Field(title="Trigger Kwargs")] = None
+    trigger_kwargs: Annotated[dict[str, JsonValue | None] | None, 
Field(title="Trigger Kwargs")] = None
     trigger_timeout: Annotated[timedelta | None, Field(title="Trigger 
Timeout")] = None
     queue: Annotated[str | None, Field(title="Queue")] = None
     next_method: Annotated[str, Field(title="Next Method")]
diff --git a/task-sdk/src/airflow/sdk/definitions/dag.py 
b/task-sdk/src/airflow/sdk/definitions/dag.py
index b0e227c5c85..4a7083965b1 100644
--- a/task-sdk/src/airflow/sdk/definitions/dag.py
+++ b/task-sdk/src/airflow/sdk/definitions/dag.py
@@ -1575,9 +1575,7 @@ def _run_task(
                 log.info("[DAG TEST] running trigger in line")
                 # trigger_kwargs need to be deserialized before passing to the
                 # trigger class since they are in serde encoded format.
-                # Ignore needed to convince mypy that trigger_kwargs is a dict
-                # or a str because its unable to infer JsonValue.
-                kwargs = deserialize(msg.trigger_kwargs)  # type: 
ignore[type-var]
+                kwargs = deserialize(msg.trigger_kwargs)
                 if TYPE_CHECKING:
                     assert isinstance(kwargs, dict)
                 trigger = import_string(msg.classpath)(**kwargs)
diff --git a/task-sdk/src/airflow/sdk/execution_time/schema/schema.json 
b/task-sdk/src/airflow/sdk/execution_time/schema/schema.json
index e739708d12d..5fe1d211da2 100644
--- a/task-sdk/src/airflow/sdk/execution_time/schema/schema.json
+++ b/task-sdk/src/airflow/sdk/execution_time/schema/schema.json
@@ -1,6 +1,6 @@
 {
   "$schema": "https://json-schema.org/draft/2020-12/schema";,
-  "api_version": "2026-10-30",
+  "api_version": "2026-12-01",
   "description": "Apache Airflow SDK Supervisor Schema",
   "$defs": {
     "AssetAliasReferenceAssetEventDagRun": {
@@ -1555,9 +1555,6 @@
               },
               "type": "object"
             },
-            {
-              "type": "string"
-            },
             {
               "type": "null"
             }
diff --git 
a/task-sdk/src/airflow/sdk/execution_time/schema/versions/__init__.py 
b/task-sdk/src/airflow/sdk/execution_time/schema/versions/__init__.py
index 40da65651ae..cc8342480c7 100644
--- a/task-sdk/src/airflow/sdk/execution_time/schema/versions/__init__.py
+++ b/task-sdk/src/airflow/sdk/execution_time/schema/versions/__init__.py
@@ -46,9 +46,11 @@ def get_bundle() -> VersionBundle:
         AddRegionCoordinatesToSupervisorTaskInstance,
         AddRetryReasonToTaskState,
     )
+    from airflow.sdk.execution_time.schema.versions.v2026_12_01 import 
RemoveStringTriggerKwargsFromDeferTask
 
     return VersionBundle(
         HeadVersion(),
+        Version("2026-12-01", RemoveStringTriggerKwargsFromDeferTask),
         Version(
             "2026-10-30",
             AddArgBindingsToSupervisorTIRunContext,
diff --git 
a/task-sdk/src/airflow/sdk/execution_time/schema/versions/v2026_12_01.py 
b/task-sdk/src/airflow/sdk/execution_time/schema/versions/v2026_12_01.py
new file mode 100644
index 00000000000..ab2f667f3ae
--- /dev/null
+++ b/task-sdk/src/airflow/sdk/execution_time/schema/versions/v2026_12_01.py
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""Supervisor schema version 2026-12-01."""
+
+from __future__ import annotations
+
+from cadwyn import VersionChange, schema
+from pydantic import JsonValue
+
+from airflow.sdk.api.datamodels._generated import TIDeferredStatePayload
+
+
+class RemoveStringTriggerKwargsFromDeferTask(VersionChange):
+    """
+    Stop accepting ``trigger_kwargs`` as a string in ``DeferTask``.
+
+    The supervisor-schema mirror of the execution API's 
``RemoveStringTriggerKwargs``.
+    """
+
+    description = __doc__
+
+    instructions_to_migrate_to_previous_version = (
+        # DeferTask inherits the field from the generated 
TIDeferredStatePayload, and Cadwyn only
+        # changes a field on the class that declares it.
+        schema(TIDeferredStatePayload)
+        .field("trigger_kwargs")
+        .had(type=dict[str, JsonValue | None] | str | None),
+    )
diff --git a/task-sdk/tests/task_sdk/execution_time/schema/test_migrator.py 
b/task-sdk/tests/task_sdk/execution_time/schema/test_migrator.py
index 6e86037fe05..249e7507165 100644
--- a/task-sdk/tests/task_sdk/execution_time/schema/test_migrator.py
+++ b/task-sdk/tests/task_sdk/execution_time/schema/test_migrator.py
@@ -42,9 +42,10 @@ from cadwyn import (
     VersionBundle,
     VersionChange,
     convert_request_to_next_version_for,
+    generate_versioned_models,
     schema,
 )
-from pydantic import BaseModel
+from pydantic import BaseModel, ValidationError
 from task_sdk.execution_time.schema._mock_version_bundle import (
     MOCK_REGISTRY,
     _LangSdkRequest,
@@ -63,6 +64,7 @@ from airflow.sdk.api.datamodels._generated import (
     TIRunContext,
 )
 from airflow.sdk.execution_time.comms import (
+    DeferTask,
     GetXCom,
     GetXComCount,
     GetXComSequenceItem,
@@ -127,6 +129,40 @@ def test_loop_selectors_follow_supervisor_version(model, 
extra, field):
     assert migrator.downgrade(message, "2026-10-30").model_dump()[field] is 
True
 
 
[email protected](
+    ("trigger_kwargs", "accepted"),
+    [
+        pytest.param({"key": "value"}, True, id="dict"),
+        pytest.param('{"key": "value"}', False, id="string"),
+    ],
+)
+def test_defer_task_trigger_kwargs_from_older_runtime(trigger_kwargs, 
accepted):
+    body = {
+        "type": "DeferTask",
+        "classpath": "my-classpath",
+        "trigger_kwargs": trigger_kwargs,
+        "next_method": "execute_callback",
+    }
+
+    if accepted:
+        upgraded = get_schema_version_migrator().upgrade(body, DeferTask, 
"2026-10-30")
+        assert upgraded["trigger_kwargs"] == trigger_kwargs
+    else:
+        with pytest.raises(ValidationError):
+            get_schema_version_migrator().upgrade(body, DeferTask, 
"2026-10-30")
+
+
+def test_defer_task_trigger_kwargs_is_string_only_before_2026_12_01():
+    from airflow.sdk.execution_time.schema.versions import bundle
+
+    versioned = generate_versioned_models(bundle)
+    fields = {"classpath": "my-classpath", "trigger_kwargs": "{}", 
"next_method": "execute_callback"}
+
+    assert versioned["2026-10-30"][DeferTask](**fields).trigger_kwargs == "{}"
+    with pytest.raises(ValidationError):
+        versioned["2026-12-01"][DeferTask](**fields)
+
+
 class _IntroduceQueueCapacity(VersionChange):
     """3026-04-17: introduce queue_capacity."""
 
@@ -550,22 +586,21 @@ class TestRealBundleArgBindingsDowngrade:
             assert ti["region_id"] == startup_details.ti.region_id
             assert ti["region_index"] == 7
 
-    def test_head_version_keeps_arg_bindings(self, real_migrator, 
startup_details):
-        from airflow.sdk.api.datamodels._generated import LiteralArgBinding, 
XComArgBinding
-
-        out = real_migrator.downgrade(startup_details, "2026-10-30")
+    @pytest.mark.parametrize("version", ["2026-10-30", "2026-12-01"])
+    def test_arg_bindings_kept_from_version_that_added_them(self, 
real_migrator, startup_details, version):
+        out = real_migrator.downgrade(startup_details, version)
         assert out.ti_context.arg_bindings is not None
         literal, xcom, defaulted = (a.root for a in 
out.ti_context.arg_bindings)
-        assert isinstance(literal, LiteralArgBinding)
+        assert literal.kind == "literal"
         assert literal.value == "uk"
         assert literal.name == "country"
         assert literal.from_default is False
         assert literal.value_schema is None
-        assert isinstance(xcom, XComArgBinding)
+        assert xcom.kind == "xcom"
         assert xcom.task_id == "extract"
         assert xcom.name == "extracted"
         assert xcom.value_schema.root == {"type": "object"}
-        assert isinstance(defaulted, LiteralArgBinding)
+        assert defaulted.kind == "literal"
         assert defaulted.from_default is True
         assert defaulted.value_schema.root == {"type": "integer", "format": 
"int64"}
 
diff --git a/ts-sdk/README.md b/ts-sdk/README.md
index e63a9a8ca91..29fd4f5dbb7 100644
--- a/ts-sdk/README.md
+++ b/ts-sdk/README.md
@@ -100,7 +100,7 @@ Do not edit the table by hand. Update the manifest and run 
the `update-ts-sdk-re
 
 <!-- BEGIN AUTO-GENERATED LANG-SDK COMPAT MATRIX -->
 
-*Min. Airflow version: 3.4.0 · supervisor schema: 2026-10-30*
+*Min. Airflow version: 3.4.0 · supervisor schema: 2026-12-01*
 
 | Dimension | Tier | Supported | Since (Airflow) | Since (SDK) | Notes |
 |---|---|---|---|---|---|
diff --git a/ts-sdk/capabilities.yaml b/ts-sdk/capabilities.yaml
index 6fef910ad01..0fd5f48b286 100644
--- a/ts-sdk/capabilities.yaml
+++ b/ts-sdk/capabilities.yaml
@@ -21,7 +21,7 @@ min_airflow_version: "3.4.0"
 
 # Keep in sync with SUPERVISOR_API_VERSION in src/generated/supervisor.ts. The 
render hook fails
 # if the two disagree.
-supervisor_schema_version: "2026-10-30"
+supervisor_schema_version: "2026-12-01"
 
 # The runtime terminates a task with SucceedTask, RetryTask, TaskState 
(failed/removed), or, for a
 # human-in-the-loop task, AwaitInputTask; only a triggerDagRun task emits 
TaskState skipped or
diff --git a/ts-sdk/schema/supervisor-schema.json 
b/ts-sdk/schema/supervisor-schema.json
index e739708d12d..5fe1d211da2 100644
--- a/ts-sdk/schema/supervisor-schema.json
+++ b/ts-sdk/schema/supervisor-schema.json
@@ -1,6 +1,6 @@
 {
   "$schema": "https://json-schema.org/draft/2020-12/schema";,
-  "api_version": "2026-10-30",
+  "api_version": "2026-12-01",
   "description": "Apache Airflow SDK Supervisor Schema",
   "$defs": {
     "AssetAliasReferenceAssetEventDagRun": {
@@ -1555,9 +1555,6 @@
               },
               "type": "object"
             },
-            {
-              "type": "string"
-            },
             {
               "type": "null"
             }
diff --git a/ts-sdk/src/generated/supervisor.ts 
b/ts-sdk/src/generated/supervisor.ts
index 75a05dde12c..27f5b3b428d 100644
--- a/ts-sdk/src/generated/supervisor.ts
+++ b/ts-sdk/src/generated/supervisor.ts
@@ -325,12 +325,9 @@ export type Type18 = "DagRunResult";
 export type Type19 = "DagRunStateResult";
 export type State2 = "deferred";
 export type Classpath = string;
-export type TriggerKwargs =
-  | {
-      [k: string]: JsonValue | null;
-    }
-  | string
-  | null;
+export type TriggerKwargs = {
+  [k: string]: JsonValue | null;
+} | null;
 export type TriggerTimeout = string | null;
 export type Queue1 = string | null;
 export type NextMethod2 = string;
@@ -2048,4 +2045,4 @@ export interface XComSequenceSliceResult {
  *  (e.g. bundle metadata) and runs the migrator accordingly.
  *  Exposed so the SDK author / operator can confirm which schema
  *  version their build is pinned to. */
-export const SUPERVISOR_API_VERSION = "2026-10-30" as const;
+export const SUPERVISOR_API_VERSION = "2026-12-01" as const;

Reply via email to