Public report of apache/airflow, published 25 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 25 October 2026, 17:48 UTC · Survey ID cd_f5e0791d425c4ac684de3aa617a8bbee
apache/airflow
Measured 25 October 2026, 17:34 UTC, at code version 05f5551
Regression: 1 dimension fell since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAt riskDown 5 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A very large codebase: 813,078 lines of product code in 156 projects, tests not counted · Estimated rebuild effort: about 12.0 person-years · Weakest lens: Production Readiness, 45
Findings by how serious they are
178 critical3772 serious482 minor
12 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 October 2026, 17:34 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
99of 99 dimensions measured by tools.
4395of 4432 findings point to an exact file and line, so you can open each one in the code. The other 37 concern the repository as a whole, such as missing documentation.
99dimensions across 8 lenses, read from 813,078 lines of product code in 156 projects.
apache/airflow is rated At risk because critical security findings are open. Its score is held back in part because nine passwords or keys sit in the current code. It scores 53 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 45, is the weakest lens and counts most in the score. The best first step is replacing the nine exposed passwords or keys and switching the old ones off, worth about 6 points. Making the controls keyboard-usable comes next, worth about 4 points. Raising Production Readiness to 70 would lift the score to about 58.
Forty-six settings leave the servers or containers unsafe. Thirty-six known security holes in the packages the code depends on can be used by attackers, and thirty-two passwords or keys in the code's history and nine in the code are open to anyone who can read the repository. Correcting the unsafe settings, updating the vulnerable packages and replacing each exposed password or key would close these risks. Fixing the weaknesses the scanner points to would fix the ten security weaknesses in the code, and the six pipeline steps that run downloads without checking them need each download checked against a known checksum first. The 12 parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.
The product code is 813,078 lines, about €1,700,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 45 to 70, the lowest score rated Strong, the score would rise from 53 to about 58.
Code composition: what the lines of code are
Product code 45%Tests 55%
New since the last survey: 344 findings
These 344 critical or serious findings weren't in the previous survey, on 11 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · FileTooLong: utils/fork_ci_reconcile.py dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py
God Classes · FileTooLong: sdk/AirflowProcessor.kt java-sdk/processor/src/main/kotlin/org/apache/airflow/sdk/AirflowProcessor.kt
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 387 findings
These 387 critical or serious findings were in the previous survey, on 11 October 2026, and are gone from this one. The first 100 are listed here.
Code Duplication · Duplicated block with local edits (183 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx
Code Duplication · Duplicated block with local edits (135 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx
Code Duplication · Duplicated block with local edits (96 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Events/Events.tsx
Code Duplication · Duplicated block with local edits (63 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagBundle/BundleFiles.tsx
Rebuild cost: about €1,700,000 · Estimate
Cost to rebuild
€580,000 to €2,900,000, for 9,666 to 30,665 hours of work, about 12.0 person-years for 7 to 23 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Very large: 813,078 lines of product code
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 9 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €1,700,000 to build again, about 12.0 person-years of work. Its weakest lens is Production Readiness, at 45 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 9 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 9 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.5 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 793,927 lines over the last 90 days, which is about 3,219,815 lines a year. At that pace, the extra work comes to an estimated 161 to 1073.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
2733 modules, with 854 dependencies between them. 5 loops run through 18 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 2693 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
1 pair of types, where a type in airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager uses a type in airflow-core.src.airflow.utils.log.logging_mixin.
airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager, while a change to airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.api_fastapi.common.parameters.base uses a type in airflow-core.src.airflow.api_fastapi.core_api.base.
airflow-core.src.airflow.api_fastapi.common.parameters.base uses airflow-core.src.airflow.api_fastapi.core_api.base, so a change to airflow-core.src.airflow.api_fastapi.core_api.base can break airflow-core.src.airflow.api_fastapi.common.parameters.base, while a change to airflow-core.src.airflow.api_fastapi.common.parameters.base can't break airflow-core.src.airflow.api_fastapi.core_api.base.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.common.parameters.base uses a module listed above it, which is the healthy direction.
11 pairs of types, where a type in airflow-core.src.airflow.api_fastapi.core_api.datamodels.common uses a type in airflow-core.src.airflow.api_fastapi.core_api.base.
airflow-core.src.airflow.api_fastapi.core_api.datamodels.common uses airflow-core.src.airflow.api_fastapi.core_api.base, so a change to airflow-core.src.airflow.api_fastapi.core_api.base can break airflow-core.src.airflow.api_fastapi.core_api.datamodels.common, while a change to airflow-core.src.airflow.api_fastapi.core_api.datamodels.common can't break airflow-core.src.airflow.api_fastapi.core_api.base.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.datamodels.common uses a module listed above it, which is the healthy direction.
24 pairs of types, where a type in airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses a type in airflow-core.src.airflow.api_fastapi.core_api.base.
airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses airflow-core.src.airflow.api_fastapi.core_api.base, so a change to airflow-core.src.airflow.api_fastapi.core_api.base can break airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance, while a change to airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance can't break airflow-core.src.airflow.api_fastapi.core_api.base.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses a type in airflow-core.src.airflow.utils.state.
airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses airflow-core.src.airflow.utils.state, so a change to airflow-core.src.airflow.utils.state can break airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance, while a change to airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance can't break airflow-core.src.airflow.utils.state.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses a type in airflow-core.src.airflow.utils.types.
airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses airflow-core.src.airflow.utils.types, so a change to airflow-core.src.airflow.utils.types can break airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance, while a change to airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance can't break airflow-core.src.airflow.utils.types.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.job uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.jobs.job, while a change to airflow-core.src.airflow.jobs.job can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.jobs.job uses a module listed above it, which is the healthy direction.
16→23 airflow-core.src.airflow.serialization.definitions.taskgroup uses airflow-core.src.airflow.serialization.definitions.dagpart of a loop✕
Connections
1 pair of types, where a type in airflow-core.src.airflow.serialization.definitions.taskgroup uses a type in airflow-core.src.airflow.serialization.definitions.dag.
airflow-core.src.airflow.serialization.definitions.taskgroup uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.serialization.definitions.taskgroup, while a change to airflow-core.src.airflow.serialization.definitions.taskgroup can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
airflow-core.src.airflow.timetables.base uses airflow-core.src.airflow.partition_mappers.base, so a change to airflow-core.src.airflow.partition_mappers.base can break airflow-core.src.airflow.timetables.base, while a change to airflow-core.src.airflow.timetables.base can't break airflow-core.src.airflow.partition_mappers.base.
Position
Below the diagonal: airflow-core.src.airflow.timetables.base uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.timetables.base uses airflow-core.src.airflow.serialization.definitions.assets, so a change to airflow-core.src.airflow.serialization.definitions.assets can break airflow-core.src.airflow.timetables.base, while a change to airflow-core.src.airflow.timetables.base can't break airflow-core.src.airflow.serialization.definitions.assets.
Position
Below the diagonal: airflow-core.src.airflow.timetables.base uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.timetables.base uses airflow-core.src.airflow.utils.types, so a change to airflow-core.src.airflow.utils.types can break airflow-core.src.airflow.timetables.base, while a change to airflow-core.src.airflow.timetables.base can't break airflow-core.src.airflow.utils.types.
Position
Below the diagonal: airflow-core.src.airflow.timetables.base uses a module listed above it, which is the healthy direction.
17→26 airflow-core.src.airflow.timetables.base uses airflow-core.src.airflow.models.dagrunpart of a loop✕
Connections
1 pair of types, where a type in airflow-core.src.airflow.timetables.base uses a type in airflow-core.src.airflow.models.dagrun.
airflow-core.src.airflow.timetables.base uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.timetables.base, while a change to airflow-core.src.airflow.timetables.base can't break airflow-core.src.airflow.models.dagrun.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
airflow-core.src.airflow.triggers.base uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.triggers.base, while a change to airflow-core.src.airflow.triggers.base can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.triggers.base uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.triggers.base uses airflow-core.src.airflow.utils.state, so a change to airflow-core.src.airflow.utils.state can break airflow-core.src.airflow.triggers.base, while a change to airflow-core.src.airflow.triggers.base can't break airflow-core.src.airflow.utils.state.
Position
Below the diagonal: airflow-core.src.airflow.triggers.base uses a module listed above it, which is the healthy direction.
19→24 org.apache.airflow.sdk.execution uses org.apache.airflow.sdkpart of a loop✕
Connections
18 pairs of types, where a type in org.apache.airflow.sdk.execution uses a type in org.apache.airflow.sdk.
org.apache.airflow.sdk.execution uses org.apache.airflow.sdk, so a change to org.apache.airflow.sdk can break org.apache.airflow.sdk.execution, while a change to org.apache.airflow.sdk.execution can't break org.apache.airflow.sdk.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4 pairs of types, where a type in providers.edge3.src.airflow.providers.edge3.plugins.www.src.components uses a type in airflow-core.src.airflow.ui.src.components.Graph.Edge.
providers.edge3.src.airflow.providers.edge3.plugins.www.src.components uses airflow-core.src.airflow.ui.src.components.Graph.Edge, so a change to airflow-core.src.airflow.ui.src.components.Graph.Edge can break providers.edge3.src.airflow.providers.edge3.plugins.www.src.components, while a change to providers.edge3.src.airflow.providers.edge3.plugins.www.src.components can't break airflow-core.src.airflow.ui.src.components.Graph.Edge.
Position
Below the diagonal: providers.edge3.src.airflow.providers.edge3.plugins.www.src.components uses a module listed above it, which is the healthy direction.
6 pairs of types, where a type in ts-sdk.src.generated.supervisor uses a type in airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
ts-sdk.src.generated.supervisor uses airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen, so a change to airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen can break ts-sdk.src.generated.supervisor, while a change to ts-sdk.src.generated.supervisor can't break airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
Position
Below the diagonal: ts-sdk.src.generated.supervisor uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization uses airflow-core.src.airflow.partition_mappers.base, so a change to airflow-core.src.airflow.partition_mappers.base can break airflow-core.src.airflow.serialization, while a change to airflow-core.src.airflow.serialization can't break airflow-core.src.airflow.partition_mappers.base.
Position
Below the diagonal: airflow-core.src.airflow.serialization uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization uses airflow-core.src.airflow.serialization.definitions.assets, so a change to airflow-core.src.airflow.serialization.definitions.assets can break airflow-core.src.airflow.serialization, while a change to airflow-core.src.airflow.serialization can't break airflow-core.src.airflow.serialization.definitions.assets.
Position
Below the diagonal: airflow-core.src.airflow.serialization uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization uses airflow-core.src.airflow.timetables.base, so a change to airflow-core.src.airflow.timetables.base can break airflow-core.src.airflow.serialization, while a change to airflow-core.src.airflow.serialization can't break airflow-core.src.airflow.timetables.base.
Position
Below the diagonal: airflow-core.src.airflow.serialization uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization uses airflow-core.src.airflow.triggers.base, so a change to airflow-core.src.airflow.triggers.base can break airflow-core.src.airflow.serialization, while a change to airflow-core.src.airflow.serialization can't break airflow-core.src.airflow.triggers.base.
Position
Below the diagonal: airflow-core.src.airflow.serialization uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization.definitions.dag uses airflow-core.src.airflow.utils.state, so a change to airflow-core.src.airflow.utils.state can break airflow-core.src.airflow.serialization.definitions.dag, while a change to airflow-core.src.airflow.serialization.definitions.dag can't break airflow-core.src.airflow.utils.state.
Position
Below the diagonal: airflow-core.src.airflow.serialization.definitions.dag uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization.definitions.dag uses airflow-core.src.airflow.utils.types, so a change to airflow-core.src.airflow.utils.types can break airflow-core.src.airflow.serialization.definitions.dag, while a change to airflow-core.src.airflow.serialization.definitions.dag can't break airflow-core.src.airflow.utils.types.
Position
Below the diagonal: airflow-core.src.airflow.serialization.definitions.dag uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.serialization.definitions.dag uses a type in airflow-core.src.airflow.serialization.definitions.taskgroup.
airflow-core.src.airflow.serialization.definitions.dag uses airflow-core.src.airflow.serialization.definitions.taskgroup, so a change to airflow-core.src.airflow.serialization.definitions.taskgroup can break airflow-core.src.airflow.serialization.definitions.dag, while a change to airflow-core.src.airflow.serialization.definitions.dag can't break airflow-core.src.airflow.serialization.definitions.taskgroup.
Position
Below the diagonal: airflow-core.src.airflow.serialization.definitions.dag uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization.definitions.dag uses airflow-core.src.airflow.timetables.base, so a change to airflow-core.src.airflow.timetables.base can break airflow-core.src.airflow.serialization.definitions.dag, while a change to airflow-core.src.airflow.serialization.definitions.dag can't break airflow-core.src.airflow.timetables.base.
Position
Below the diagonal: airflow-core.src.airflow.serialization.definitions.dag uses a module listed above it, which is the healthy direction.
23→26 airflow-core.src.airflow.serialization.definitions.dag uses airflow-core.src.airflow.models.dagrunpart of a loop✕
Connections
1 pair of types, where a type in airflow-core.src.airflow.serialization.definitions.dag uses a type in airflow-core.src.airflow.models.dagrun.
airflow-core.src.airflow.serialization.definitions.dag uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.serialization.definitions.dag, while a change to airflow-core.src.airflow.serialization.definitions.dag can't break airflow-core.src.airflow.models.dagrun.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
org.apache.airflow.sdk uses org.apache.airflow.sdk.execution, so a change to org.apache.airflow.sdk.execution can break org.apache.airflow.sdk, while a change to org.apache.airflow.sdk can't break org.apache.airflow.sdk.execution.
Position
Below the diagonal: org.apache.airflow.sdk uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in ts-sdk.src.sdk.operator uses a type in airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
ts-sdk.src.sdk.operator uses airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen, so a change to airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen can break ts-sdk.src.sdk.operator, while a change to ts-sdk.src.sdk.operator can't break airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
Position
Below the diagonal: ts-sdk.src.sdk.operator uses a module listed above it, which is the healthy direction.
ts-sdk.src.sdk.operator uses ts-sdk.src.generated.supervisor, so a change to ts-sdk.src.generated.supervisor can break ts-sdk.src.sdk.operator, while a change to ts-sdk.src.sdk.operator can't break ts-sdk.src.generated.supervisor.
Position
Below the diagonal: ts-sdk.src.sdk.operator uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.utils.state, so a change to airflow-core.src.airflow.utils.state can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.utils.state.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.utils.types, so a change to airflow-core.src.airflow.utils.types can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.utils.types.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.models.dagrun uses a type in airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance, so a change to airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.serialization.definitions.taskgroup, so a change to airflow-core.src.airflow.serialization.definitions.taskgroup can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.serialization.definitions.taskgroup.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.timetables.base, so a change to airflow-core.src.airflow.timetables.base can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.timetables.base.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Below the diagonal: airflow-core.src.airflow.models.dagrun uses a module listed above it, which is the healthy direction.
26→32 airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.models.taskinstancepart of a loop✕
Connections
1 pair of types, where a type in airflow-core.src.airflow.models.dagrun uses a type in airflow-core.src.airflow.models.taskinstance.
airflow-core.src.airflow.models.dagrun uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.models.dagrun, while a change to airflow-core.src.airflow.models.dagrun can't break airflow-core.src.airflow.models.taskinstance.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in airflow-core.src.airflow.serialization.serialized_objects uses a type in airflow-core.src.airflow.serialization.definitions.taskgroup.
airflow-core.src.airflow.serialization.serialized_objects uses airflow-core.src.airflow.serialization.definitions.taskgroup, so a change to airflow-core.src.airflow.serialization.definitions.taskgroup can break airflow-core.src.airflow.serialization.serialized_objects, while a change to airflow-core.src.airflow.serialization.serialized_objects can't break airflow-core.src.airflow.serialization.definitions.taskgroup.
Position
Below the diagonal: airflow-core.src.airflow.serialization.serialized_objects uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.serialization.serialized_objects uses airflow-core.src.airflow.timetables.base, so a change to airflow-core.src.airflow.timetables.base can break airflow-core.src.airflow.serialization.serialized_objects, while a change to airflow-core.src.airflow.serialization.serialized_objects can't break airflow-core.src.airflow.timetables.base.
Position
Below the diagonal: airflow-core.src.airflow.serialization.serialized_objects uses a module listed above it, which is the healthy direction.
5 pairs of types, where a type in airflow-core.src.airflow.serialization.serialized_objects uses a type in airflow-core.src.airflow.serialization.definitions.dag.
airflow-core.src.airflow.serialization.serialized_objects uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.serialization.serialized_objects, while a change to airflow-core.src.airflow.serialization.serialized_objects can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Below the diagonal: airflow-core.src.airflow.serialization.serialized_objects uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in ts-sdk.src.coordinator uses a type in airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
ts-sdk.src.coordinator uses airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen, so a change to airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen can break ts-sdk.src.coordinator, while a change to ts-sdk.src.coordinator can't break airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
Position
Below the diagonal: ts-sdk.src.coordinator uses a module listed above it, which is the healthy direction.
ts-sdk.src.coordinator uses ts-sdk.src.generated.supervisor, so a change to ts-sdk.src.generated.supervisor can break ts-sdk.src.coordinator, while a change to ts-sdk.src.coordinator can't break ts-sdk.src.generated.supervisor.
Position
Below the diagonal: ts-sdk.src.coordinator uses a module listed above it, which is the healthy direction.
ts-sdk.src.coordinator uses ts-sdk.src.sdk.operator, so a change to ts-sdk.src.sdk.operator can break ts-sdk.src.coordinator, while a change to ts-sdk.src.coordinator can't break ts-sdk.src.sdk.operator.
Position
Below the diagonal: ts-sdk.src.coordinator uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in ts-sdk.src.sdk uses a type in airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
ts-sdk.src.sdk uses airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen, so a change to airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen can break ts-sdk.src.sdk, while a change to ts-sdk.src.sdk can't break airflow-core.src.airflow.api_fastapi.auth.managers.simple.ui.openapi-gen.requests.core.queryKeySerializer_gen.
Position
Below the diagonal: ts-sdk.src.sdk uses a module listed above it, which is the healthy direction.
ts-sdk.src.sdk uses ts-sdk.src.sdk.operator, so a change to ts-sdk.src.sdk.operator can break ts-sdk.src.sdk, while a change to ts-sdk.src.sdk can't break ts-sdk.src.sdk.operator.
Position
Below the diagonal: ts-sdk.src.sdk uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.api_fastapi.core_api.services.public uses airflow-core.src.airflow.utils.state, so a change to airflow-core.src.airflow.utils.state can break airflow-core.src.airflow.api_fastapi.core_api.services.public, while a change to airflow-core.src.airflow.api_fastapi.core_api.services.public can't break airflow-core.src.airflow.utils.state.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.services.public uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in airflow-core.src.airflow.api_fastapi.core_api.services.public uses a type in airflow-core.src.airflow.serialization.definitions.dag.
airflow-core.src.airflow.api_fastapi.core_api.services.public uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.api_fastapi.core_api.services.public, while a change to airflow-core.src.airflow.api_fastapi.core_api.services.public can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.services.public uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.api_fastapi.core_api.services.public uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.api_fastapi.core_api.services.public, while a change to airflow-core.src.airflow.api_fastapi.core_api.services.public can't break airflow-core.src.airflow.models.dagrun.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.services.public uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagbag uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.models.dagbag, while a change to airflow-core.src.airflow.models.dagbag can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Below the diagonal: airflow-core.src.airflow.models.dagbag uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.dagbag uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.models.dagbag, while a change to airflow-core.src.airflow.models.dagbag can't break airflow-core.src.airflow.models.dagrun.
Position
Below the diagonal: airflow-core.src.airflow.models.dagbag uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.taskinstance uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.models.taskinstance, while a change to airflow-core.src.airflow.models.taskinstance can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.models.taskinstance uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.taskinstance uses airflow-core.src.airflow.utils.state, so a change to airflow-core.src.airflow.utils.state can break airflow-core.src.airflow.models.taskinstance, while a change to airflow-core.src.airflow.models.taskinstance can't break airflow-core.src.airflow.utils.state.
Position
Below the diagonal: airflow-core.src.airflow.models.taskinstance uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.models.taskinstance uses a type in airflow-core.src.airflow.serialization.definitions.taskgroup.
airflow-core.src.airflow.models.taskinstance uses airflow-core.src.airflow.serialization.definitions.taskgroup, so a change to airflow-core.src.airflow.serialization.definitions.taskgroup can break airflow-core.src.airflow.models.taskinstance, while a change to airflow-core.src.airflow.models.taskinstance can't break airflow-core.src.airflow.serialization.definitions.taskgroup.
Position
Below the diagonal: airflow-core.src.airflow.models.taskinstance uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models.taskinstance uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.models.taskinstance, while a change to airflow-core.src.airflow.models.taskinstance can't break airflow-core.src.airflow.models.dagrun.
Position
Below the diagonal: airflow-core.src.airflow.models.taskinstance uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.api_fastapi.core_api.routes.public uses a type in airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager.
airflow-core.src.airflow.api_fastapi.core_api.routes.public uses airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager, so a change to airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager can break airflow-core.src.airflow.api_fastapi.core_api.routes.public, while a change to airflow-core.src.airflow.api_fastapi.core_api.routes.public can't break airflow-core.src.airflow.api_fastapi.auth.managers.base_auth_manager.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.routes.public uses a module listed above it, which is the healthy direction.
6 pairs of types, where a type in airflow-core.src.airflow.api_fastapi.core_api.routes.public uses a type in airflow-core.src.airflow.api_fastapi.core_api.datamodels.common.
airflow-core.src.airflow.api_fastapi.core_api.routes.public uses airflow-core.src.airflow.api_fastapi.core_api.datamodels.common, so a change to airflow-core.src.airflow.api_fastapi.core_api.datamodels.common can break airflow-core.src.airflow.api_fastapi.core_api.routes.public, while a change to airflow-core.src.airflow.api_fastapi.core_api.routes.public can't break airflow-core.src.airflow.api_fastapi.core_api.datamodels.common.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.routes.public uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.api_fastapi.core_api.routes.public uses a type in airflow-core.src.airflow.models.taskinstance.
airflow-core.src.airflow.api_fastapi.core_api.routes.public uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.api_fastapi.core_api.routes.public, while a change to airflow-core.src.airflow.api_fastapi.core_api.routes.public can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.routes.public uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.api_fastapi.core_api.routes.ui uses airflow-core.src.airflow.models.dagbag, so a change to airflow-core.src.airflow.models.dagbag can break airflow-core.src.airflow.api_fastapi.core_api.routes.ui, while a change to airflow-core.src.airflow.api_fastapi.core_api.routes.ui can't break airflow-core.src.airflow.models.dagbag.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.core_api.routes.ui uses a module listed above it, which is the healthy direction.
10 pairs of types, where a type in airflow-core.src.airflow.api_fastapi.execution_api.routes uses a type in airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance.
airflow-core.src.airflow.api_fastapi.execution_api.routes uses airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance, so a change to airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance can break airflow-core.src.airflow.api_fastapi.execution_api.routes, while a change to airflow-core.src.airflow.api_fastapi.execution_api.routes can't break airflow-core.src.airflow.api_fastapi.execution_api.datamodels.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.routes uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.api_fastapi.execution_api.routes uses airflow-core.src.airflow.jobs.job, so a change to airflow-core.src.airflow.jobs.job can break airflow-core.src.airflow.api_fastapi.execution_api.routes, while a change to airflow-core.src.airflow.api_fastapi.execution_api.routes can't break airflow-core.src.airflow.jobs.job.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.routes uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.api_fastapi.execution_api.routes uses airflow-core.src.airflow.models.dagbag, so a change to airflow-core.src.airflow.models.dagbag can break airflow-core.src.airflow.api_fastapi.execution_api.routes, while a change to airflow-core.src.airflow.api_fastapi.execution_api.routes can't break airflow-core.src.airflow.models.dagbag.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.routes uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.api_fastapi.execution_api.routes uses a type in airflow-core.src.airflow.models.taskinstance.
airflow-core.src.airflow.api_fastapi.execution_api.routes uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.api_fastapi.execution_api.routes, while a change to airflow-core.src.airflow.api_fastapi.execution_api.routes can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.api_fastapi.execution_api.routes uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.executors.base_executor uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.executors.base_executor, while a change to airflow-core.src.airflow.executors.base_executor can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.executors.base_executor uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.executors.base_executor uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.executors.base_executor, while a change to airflow-core.src.airflow.executors.base_executor can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.executors.base_executor uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.utils.types, so a change to airflow-core.src.airflow.utils.types can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.utils.types.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.serialization.definitions.taskgroup, so a change to airflow-core.src.airflow.serialization.definitions.taskgroup can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.serialization.definitions.taskgroup.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.timetables.base, so a change to airflow-core.src.airflow.timetables.base can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.timetables.base.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.triggers.base, so a change to airflow-core.src.airflow.triggers.base can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.triggers.base.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.models.dagrun.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.models uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.models, while a change to airflow-core.src.airflow.models can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.models uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.ti_deps.dep_context uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.ti_deps.dep_context, while a change to airflow-core.src.airflow.ti_deps.dep_context can't break airflow-core.src.airflow.models.dagrun.
Position
Below the diagonal: airflow-core.src.airflow.ti_deps.dep_context uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.ti_deps.dep_context uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.ti_deps.dep_context, while a change to airflow-core.src.airflow.ti_deps.dep_context can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.ti_deps.dep_context uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.utils.log.logging_mixin, so a change to airflow-core.src.airflow.utils.log.logging_mixin can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.utils.log.logging_mixin.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.jobs.job, so a change to airflow-core.src.airflow.jobs.job can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.jobs.job.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.timetables.base, so a change to airflow-core.src.airflow.timetables.base can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.timetables.base.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in airflow-core.src.airflow.jobs.scheduler_job_runner uses a type in airflow-core.src.airflow.serialization.definitions.dag.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.serialization.definitions.dag, so a change to airflow-core.src.airflow.serialization.definitions.dag can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.serialization.definitions.dag.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.models.dagrun, so a change to airflow-core.src.airflow.models.dagrun can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.models.dagrun.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.models.dagbag, so a change to airflow-core.src.airflow.models.dagbag can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.models.dagbag.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.jobs.scheduler_job_runner uses airflow-core.src.airflow.executors.base_executor, so a change to airflow-core.src.airflow.executors.base_executor can break airflow-core.src.airflow.jobs.scheduler_job_runner, while a change to airflow-core.src.airflow.jobs.scheduler_job_runner can't break airflow-core.src.airflow.executors.base_executor.
Position
Below the diagonal: airflow-core.src.airflow.jobs.scheduler_job_runner uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.ti_deps.deps.base_ti_dep uses airflow-core.src.airflow.models.taskinstance, so a change to airflow-core.src.airflow.models.taskinstance can break airflow-core.src.airflow.ti_deps.deps.base_ti_dep, while a change to airflow-core.src.airflow.ti_deps.deps.base_ti_dep can't break airflow-core.src.airflow.models.taskinstance.
Position
Below the diagonal: airflow-core.src.airflow.ti_deps.deps.base_ti_dep uses a module listed above it, which is the healthy direction.
airflow-core.src.airflow.ti_deps.deps.base_ti_dep uses airflow-core.src.airflow.ti_deps.dep_context, so a change to airflow-core.src.airflow.ti_deps.dep_context can break airflow-core.src.airflow.ti_deps.deps.base_ti_dep, while a change to airflow-core.src.airflow.ti_deps.deps.base_ti_dep can't break airflow-core.src.airflow.ti_deps.dep_context.
Position
Below the diagonal: airflow-core.src.airflow.ti_deps.deps.base_ti_dep uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2025 — Security Misconfiguration
342
High / Critical
A05:2025 — Injection
153
High / Critical
A03:2025 — Software Supply Chain Failures
64
High / Critical
A07:2025 — Authentication Failures
42
High / Critical
Roadmap
Immediately resolve the nine leaked secrets in configuration files to secure sensitive credentials. Enhance accessibility by making custom controls keyboard-operable and ensure outbound HTTP calls are resilient with proper timeouts, retries, and circuit breakers. Finally, maintain code hygiene by removing unused dependencies and switching schema management to versioned migrations instead of automatic creation.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 9 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Raise allocation-aware density on the hot paths — currently 34 use(s) across 22,378 production line(s) (~1.5/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 178
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 3772
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 482
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 12
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 99 of 99 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 99 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 4395 of 4432 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .py, and our analyzer cannot run the .py test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 72.9% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or `coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 2,436 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 4,418 test source file(s) (.py, .go, .kt) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .py, and the python executor ran against the .py half and did not finish re-running within its tier budget — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/ (1 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in airflow-core/src/airflow/ui/ (2165 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in dev/react-plugin-tools/react_plugin_template/ (0 tests); node:test via `pnpm install --frozen-lockfile --ignore-scripts` in providers/common/ai/src/airflow/providers/common/ai/plugins/www/ (17 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in providers/edge3/src/airflow/providers/edge3/plugins/www/ (4 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in ts-sdk/ (935 tests); node:test via `npm ci --ignore-scripts` in ts-sdk/docs/ (18 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python REDACTED/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (ts-sdk/package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D25 ADR Conformance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The code index reads C#, Razor, TypeScript, JavaScript and Vue. A rule whose scope holds production code in another language is not called honoured, because its uses could sit in that code.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py`, `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py`, `airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_stats.py`, `airflow-core/src/airflow/dag_processing/collection.py`, `airflow-core/src/airflow/models/dagrun.py`, … (+27 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D41 Kernel & Syscall Confinement — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Chart/templates/api-server/api-server-deployment.yaml:34, chart/templates/cleanup/cleanup-cronjob.yaml:32, REDACTED:36, chart/templates/database-cleanup/database-cleanup-cronjob.yaml:32, chart/templates/flower/flower-deployment.yaml:33, chart/templates/jobs/create-user-job.yaml:32, chart/templates/jobs/migrate-database-job.yaml:32, chart/templates/otel-collector/otel-collector-deployment.yaml:30, chart/templates/pgbouncer/pgbouncer-deployment.yaml:35, REDACTED:33 and 1 more did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is svcs, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (task-sdk-integration-tests/docker-compose.yaml). compose up failed (exit 15 — the compose project is invalid) — time="2026-10-25T17:36:38Z" level=warning msg="The \"AIRFLOW_IMAGE_NAME\" variable is not set. Defaulting to a blank string." time="2026-10-25T17:36:38Z" level=warning msg="The \"FERNET_KEY\" variable is not set. Defaulting to a blank string." service "airflow-scheduler" has neither an image nor a build context specified: invalid compose project; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Go, Java, Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Go, Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P7 Outbound HTTP resilience — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 212 further occurrence(s) are not listed individually; the score already reflects all 252.
R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
Repo exclusion declarations: 29 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
447 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was task_instances.post_clear_task_instances at 69. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ClassFilesKt.readSourceFile at 22 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: java-sdk/plugin/src/main/kotlin/org/apache/airflow/sdk/plugin/ClassFiles.kt (ClassFilesKt.readSourceFile at 22), airflow-core/src/airflow/ui/src/hooks/usePluginAppliesToContext.ts (usePluginAppliesToContext.usePluginAppliesToContext at 20), java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/execution/Serde.kt (SerdeKt.serializeValue at 16), airflow-core/src/airflow/ui/src/hooks/useResolvePassCoordinate.ts (useResolvePassCoordinate.useResolvePassCoordinate at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 436 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with task_instances.post_clear_task_instances (cyclomatic 69). — Refactoring it lifts Cyclomatic Complexity from 6.4 to about 6.5/10.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 982 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with dependencies.get_data_dependencies (cognitive 148), task_instances.post_clear_task_instances (cognitive 126). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 4.2 to about 4.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 178 FileTooLong finding(s) in God Classes — start with dataproc.py (3), bigquery.py (3), task_instances.py (3). — One of this dimension's main actionable groups (178 warning-level).
Resolve the 77 FunctionTooLong finding(s) in God Classes — start with Details.tsx (4), Header.tsx (2), filterConfigs.tsx. — One of this dimension's main actionable groups (77 warning-level).
Resolve the 36 TooManyMethods finding(s) in God Classes — start with override.py, parser.py, scheduler_job_runner.py. — One of this dimension's main actionable groups (36 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
852 duplicated block group(s) detected. A further 40 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 21 of the 892 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 224 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 46 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with configuration.py (2), providers_manager.py (2), cli_parser.py. — One of this dimension's main actionable groups (46 warning-level).
Resolve the 43 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with dataplex.py (3), diagram_coordinator_execution_sequence.py (2), es_task_handler.py (2). — One of this dimension's main actionable groups (43 warning-level).
Resolve the 39 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with ci_image_commands.py (2), eks.py (2), REDACTED (2). — One of this dimension's main actionable groups (39 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.7 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
144 production modules (Gradle+Maven+npm+Go+Python), 1 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 7 module(s) off the main sequence, with abstractness counted on 137 of the 144 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Circular dependency
Off the main sequence: apache-airflow-mypy · ×4
Off the main sequence: apache-airflow-providers-common-compat · ×3
What to do
Resolve the 1 Circular dependency finding(s) in Coupling. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 12 Low cohesion finding(s) in Cohesion (LCOM4) — start with configuration.py, dynamodb.py, fab_auth_manager.py. — One of this dimension's main actionable groups (12 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Resolve the 49 Classify ADR enforcement finding(s) in Architectural Integrity — start with 0001-mixed-lang-dag-interface.md (2), 0002-native-dag-interface.md (2), 0001-java-sdk-airflow-integration.md. — One of this dimension's main actionable groups (49 recommendation-level).
Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d7_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution9.9 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
40688 test methods: 40298 unit, 169 integration, 0 BDD, 221 e2e. The JavaScript/TypeScript suite contributes 2436 `it`/`test` case(s) across 324 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 37639 test function(s) across 2210 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only. The Go suite contributes 613 test case(s) across 47 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 2 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.8 / 10Stronggated by 38 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
1 skipped, 37 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2436 tests. Measured on the JavaScript/TypeScript suite only — at least 4,418 test source file(s) (.py, .go, .kt) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: does not let a task handler be wired the way a native task is · ×37ts-sdk/tests/public-api.test.ts:211
Mock-dominated test: fails with Airflow's reason when Airflow could not resume the task · ×9ts-sdk/tests/coordinator/operator-runner.test.ts:91
What to do
Resolve the 37 No assertions finding(s) in Test Quality — start with pools.spec.ts (7), dag-grid-view.spec.ts (5), public-api.test.ts (3). — One of this dimension's main actionable groups (37 warning-level).
Resolve the 9 Mock-dominated test finding(s) in Test Quality — start with useGridScrollRestore.test.ts (4), operator-runner.test.ts, ExtraLinks.test.tsx. — One of this dimension's main actionable groups (9 recommendation-level).
Resolve the 1 Skipped test finding(s) in Test Quality — start with home-dashboard.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
2 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Outdated: github.com/spf13/cobra · ×2
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 9 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 34 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 17 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. A further 8 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares a Python REDACTED/requirements.txt (pip/uv/Poetry), a Go module (REDACTED/go.sum) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: airflow-core/src/airflow/jobs/scheduler_job_runner.py (39×48=1872); airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py (32×51=1632); REDACTED (24×48=1152) Repeated repair below the complexity floor: airflow-core/src/airflow/serialization/definitions/taskgroup.py (3 of 4 changes were fixes); providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py (3 of 3 changes were fixes)
Resolve the 140 Hotspot finding(s) in Churn × Complexity Hotspots — start with task_instances.py (4), dag.py (2), manager.py (2). — One of this dimension's main actionable groups (140 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with taskgroup.py, dataproc.py. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
137 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is airflow-core/src/airflow/triggers/shared_stream.py. Counted over 2837 of the 4967 production source files in this repository: 2119 are under the ~2,400-byte size floor this dimension measures over, and the remaining 11 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×12
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
348 deducted task-comment markers across 813078 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment repeated across 10 filesproviders/ssh/tests/unit/ssh/hooks/test_ssh.py:222
What to do
Resolve the 324 TodoComment finding(s) in Explicit Debt — start with mappedoperator.py (15), dag.py (14), scheduler_job_runner.py (8). — One of this dimension's main actionable groups (324 warning-level).
Resolve the 8 HackComment finding(s) in Explicit Debt — start with conf.py (5), operator.py, provider_conf.py. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 6 FixmeComment finding(s) in Explicit Debt — start with serialized_objects.py (2), __init__.py, analyze_e2e_flaky_tests.py. — One of this dimension's main actionable groups (6 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
0 of 49 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question). How well each record argues its case is not measured.
What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.
Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.
16 of 156 build units (Go, Gradle, Python, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
32 finding(s): 0 critical, 32 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 17 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (17 issue-level).
Resolve the 15 High secret finding(s) in Secrets (history) — start with REDACTED (3), REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (15 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
153 finding(s): 0 critical, 30 high, 66 medium, 57 low. semgrep hit a parse error in 160 file(s) — `REDACTED`, `REDACTED`, `airflow-core/docs/templates/footer.html` (lines 1–22, line 29), `airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py` (line 736), `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py` (line 219), … (+155 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 14 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 34 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (6 issue-level).
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 30 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (16), REDACTED (8), REDACTED (6). — One of this dimension's main actionable groups (30 issue-level).
Resolve the 4 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 2 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 185 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (30), REDACTED (25), REDACTED (23). — One of this dimension's main actionable groups (185 warning-level).
Resolve the 40 High IaC finding(s) in IaC & Container Security — start with REDACTED (12), REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (40 issue-level).
Resolve the 6 Critical IaC finding(s) in IaC & Container Security — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
160 of 2848 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py. Counted over 2848 of the 4967 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 12 Orphaned knowledge finding(s) in Knowledge Freshness — start with alloy_db.py (2), tpt.py (2), dataform.py. — One of this dimension's main actionable groups (12 issue-level).
Resolve the 148 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (6), ssm.py (3), eventbridge.py (2). — One of this dimension's main actionable groups (148 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 14 Change coupling finding(s) in Change Coupling — start with worker.py (2), REDACTED, developer_commands.py. — One of this dimension's main actionable groups (14 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Build pipeline generates provenance, signs artifacts and produces an SBOM.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/6 workload(s) run every container under a seccomp profile; 0/6 declare an AppArmor/SELinux profile.
No seccomp profile · ×6REDACTED:27
What to do
Resolve the 6 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 11 platform declaration(s) and 341 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels5.8 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×7) — airflow-core/src/airflow/ui/src/components/MarkdownModal.tsx:115, airflow-core/src/airflow/ui/src/components/SearchSelect.tsx:100, airflow-core/src/airflow/ui/src/layouts/Nav/TimezoneSelector.tsx:71, …
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — REDACTED:113, REDACTED:122
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. — REDACTED:26
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — registry/src/_includes/base.njk:143
This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — registry/src/js/connection-builder.js:219
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×4) — devel-common/src/sphinx_exts/docs_build/dev_index_template.html.jinja2:20, providers/fab/src/airflow/providers/fab/www/templates/airflow/error.html:21, providers/fab/src/airflow/providers/fab/www/templates/airflow/traceback.html:21, …
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — providers/fab/src/airflow/providers/fab/www/templates/airflow/traceback.html:21
With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled. — registry/src/_includes/base.njk:2
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — registry/src/provider-detail.njk:10
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — registry/src/provider-version.njk:191
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×2) — devel-common/src/sphinx_exts/pagefind_search/templates/search-modal.html:24, registry/src/_includes/base.njk:137
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control` sets color: #cbcbcb on background-color: #eee — 1.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:1915
`.footer` sets color: #8e8e8d on background-color: #f5f5f5 — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — providers/fab/src/airflow/providers/fab/www/static/css/main.css:550
`#search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — registry/src/css/main.css:4410
`.dropdown-toggle:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2760
`.dropdown-menu > .active > a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2819
`.open > a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2838
`.btn-group.open .dropdown-toggle` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2962
`.navbar-toggle:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:3561
`.modal` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:5324
`.modal-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:5359
`.carousel-control:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:5793
`.search-modal__input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — devel-common/src/sphinx_exts/pagefind_search/static/css/pagefind.css:97
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 597 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Accessibility linting is already configured — assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The projects apache-airflow → apache-airflow-core → apache-airflow-providers-common-compat → apache-airflow (one cycle inside a mutually-dependent group of 8 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Do you agree with this assessment?
C3 · Audit Trail7.5 / 10Strong✓ Tool-verified
Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.
An audit mechanism is present, but the trail is not yet complete — missing: a write-side hook every change flows through (HistoricalRecords, auditlog.register, reversion.register, pghistory.track, SQLAlchemy-Continuum, a post_save / after_update listener recording each change, or an event-sourced store), per-model coverage (a change-history registration on each model that needs a who-changed-what trail, or an event-sourced aggregate).
What to do
Back the audit convention with a structural mechanism: HistoricalRecords or auditlog.register on the models that need a who-changed-what trail, or a post_save / after_update listener writing each sensitive change to an audit-log table, with the acting user and time on every entry.
Do you agree with this assessment?
C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (Django/SQLAlchemy) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 41 of 170 project(s) that lack one — worth up to 0.5 pts.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Only 125/130 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `airflow-core/src/airflow/ui`, `dev/breeze`, `providers/informatica/dev/informatica_simulator`, `ts-sdk`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Dependabot is configured but does not watch `maven` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×9) — dev/backport/update_backport_status.py:109, providers/amazon/src/airflow/providers/amazon/aws/fs/s3.py:118, providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py:145, …
`requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×18) — dev/breeze/src/airflow_breeze/commands/sbom_commands.py:887, dev/breeze/src/airflow_breeze/commands/sbom_commands.py:889, dev/breeze/src/airflow_breeze/utils/cdxgen.py:461, …
`urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:39
`urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:507
`requests.Session(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — devel-common/src/sphinx_exts/docs_build/fetch_inventories.py:168, providers/apache/hdfs/src/airflow/providers/apache/hdfs/hooks/webhdfs.py:113, providers/dingding/src/airflow/providers/dingding/hooks/dingding.py:103
`aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×6) — providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:183, providers/discord/src/airflow/providers/discord/hooks/discord_webhook.py:334, providers/http/src/airflow/providers/http/notifications/http.py:93, …
`requests.put(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — providers/google/src/airflow/providers/google/cloud/hooks/functions.py:162, providers/openfaas/src/airflow/providers/openfaas/hooks/openfaas.py:109
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Do you agree with this assessment?
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema. (×8) — providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:998, providers/fab/src/airflow/providers/fab/auth_manager/models/db.py:72, providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:45, …
What to do
Turn off SQLAlchemy create_all() in production and let the versioned migrations own the schema.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 34 use(s) across 22,378 production line(s) (~1.5/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
Kotlin: on hot paths, use primitive arrays (IntArray, LongArray …) and @JvmInline value classes instead of boxed values, primitive collections (androidx.collection, fastutil) instead of boxed ones, and presize collections and StringBuilders.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`fs.existsSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — airflow-core/src/airflow/ui/tests/e2e/global-setup.ts:49
`fs.mkdirSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — airflow-core/src/airflow/ui/tests/e2e/global-setup.ts:50
`realpathSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — ts-sdk/src/cli/pack.ts:351
`readFileSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — ts-sdk/src/cli/pack.ts:362
`writeFileSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — ts-sdk/src/cli/pack.ts:364
`rmSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — ts-sdk/src/cli/pack.ts:366
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
66 duplicated blocks under airflow-core/src/airflow/ui/src/pages/ have copies in at least two of the sibling directories Asset, AssetsList, Connections, Dag, DagBundle, DagBundles (+17 more sibling(s) not listed) — 49 of them are reported below, and 17 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 66 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 66 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 66 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:177
32 duplicated blocks under airflow-core/src/airflow/ui/src/ have copies in at least two of the sibling directories components, hooks, layouts, pages, queries — 26 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 32 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — airflow-core/src/airflow/ui/src/components/Clear/Run/ClearRunDialog.tsx:170
23 duplicated blocks under the repository root have copies in at least two of the sibling directories airflow-core, dev, providers, registry — 18 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:24
9 duplicated blocks under airflow-core/src/airflow/ui/src/components/ have copies in at least two of the sibling directories ActionAccordion, Clear, DagActions, MarkAs, TriggerDag — 6 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:270
7 duplicated blocks under airflow-core/src/airflow/ have copies in at least two of the sibling directories api_fastapi, ui — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:23
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:24 · airflow-core/src/airflow/ui/src/theme.ts:20 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts:20 — these 3 files are line-for-line copies of one another — 334 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:24
airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:177 · airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:220 — the two spans are one implementation copied and then locally edited — 1152 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:177
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:23 · airflow-core/src/airflow/ui/rules/typescript.js:22 — these 2 files are line-for-line copies of one another — 164 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:23
airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx:80 · airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx:71 — the two spans are one implementation copied and then locally edited — 753 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx:80
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/core.js:22 · airflow-core/src/airflow/ui/rules/core.js:22 — these 2 files are line-for-line copies of one another — 105 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/core.js:22
airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:82 · airflow-core/src/airflow/ui/src/pages/XCom/XCom.tsx:88 — the two spans are one implementation copied and then locally edited — 504 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:82
airflow-core/src/airflow/ui/src/pages/Run/CallbackLogs.tsx:51 · airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:75 — the two spans are one implementation copied and then locally edited — 636 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Run/CallbackLogs.tsx:51
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/RemoveQueueButton.tsx:35 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerConcurrencyButton.tsx:35 — the two spans are one implementation copied and then locally edited — 434 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/RemoveQueueButton.tsx:35
airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx:40 · airflow-core/src/airflow/ui/src/components/FilterBar/filters/RunStateFilter.tsx:48 — the two spans are one implementation copied and then locally edited — 390 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx:40
airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStoreModal.tsx:42 · airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStoreModal.tsx:55 — the two spans are one implementation copied and then locally edited — 469 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStoreModal.tsx:42
providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:145 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:155 — the two spans are one implementation copied and then locally edited — 472 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:145
airflow-core/src/airflow/ui/src/components/MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx:44 · airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsButton.tsx:44 — the two spans are one implementation copied and then locally edited — 402 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/components/MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx:44
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEditCommentButton.tsx:32 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEnterButton.tsx:29 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEditCommentButton.tsx:32
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/unicorn.js:22 · airflow-core/src/airflow/ui/rules/unicorn.js:22 — these 2 files are line-for-line copies of one another — 67 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/unicorn.js:22
airflow-core/src/airflow/ui/src/pages/DagRuns/BulkMarkDagRunsAsButton.tsx:58 · airflow-core/src/airflow/ui/src/pages/TaskInstances/BulkMarkTaskInstancesAsButton.tsx:86 — the two spans are one implementation copied and then locally edited — 345 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/DagRuns/BulkMarkDagRunsAsButton.tsx:58
airflow-core/src/airflow/ui/src/pages/DagBundle/BundleFiles.tsx:62 · airflow-core/src/airflow/ui/src/pages/DagBundles/DagBundles.tsx:77 — the two spans are one implementation copied and then locally edited — 332 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/DagBundle/BundleFiles.tsx:62
airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/DagImportErrorsModal.tsx:128 · airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/PluginImportErrorsModal.tsx:69 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/DagImportErrorsModal.tsx:128
airflow-core/src/airflow/ui/src/components/MarkAs/Run/MarkRunAsButton.tsx:19 · airflow-core/src/airflow/ui/src/components/MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx:19 — these 2 files are line-for-line copies of one another — 61 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — airflow-core/src/airflow/ui/src/components/MarkAs/Run/MarkRunAsButton.tsx:19
airflow-core/src/airflow/ui/src/layouts/Details/SearchDagRuns.tsx:58 · airflow-core/src/airflow/ui/src/layouts/Details/SearchMapIndexes.tsx:66 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/layouts/Details/SearchDagRuns.tsx:58
airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStore.tsx:58 · airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStore.tsx:57 — the two spans are one implementation copied and then locally edited — 368 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStore.tsx:58
airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx:114 · airflow-core/src/airflow/ui/src/pages/Jobs.tsx:115 — the two spans are one implementation copied and then locally edited — 375 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx:114
airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:154 · airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx:120 — the two spans are one implementation copied and then locally edited — 412 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:154
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/AirflowPin.tsx:21 · airflow-core/src/airflow/ui/src/assets/AirflowPin.tsx:21 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/AirflowPin.tsx:21
airflow-core/src/airflow/ui/src/queries/useBulkDeleteDagRuns.ts:35 · airflow-core/src/airflow/ui/src/queries/useBulkPatchDagRun.ts:40 — the two spans are one implementation copied and then locally edited — 415 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/queries/useBulkDeleteDagRuns.ts:35
airflow-core/src/airflow/ui/src/pages/Pools/PoolForm.tsx:47 · airflow-core/src/airflow/ui/src/pages/Variables/ManageVariable/VariableForm.tsx:54 — the two spans are one implementation copied and then locally edited — 421 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Pools/PoolForm.tsx:47
airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionButton.tsx:32 · airflow-core/src/airflow/ui/src/pages/Variables/ManageVariable/DeleteVariableButton.tsx:32 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionButton.tsx:32
airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionsButton.tsx:31 · airflow-core/src/airflow/ui/src/pages/Variables/DeleteVariablesButton.tsx:31 — the two spans are one implementation copied and then locally edited — 304 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionsButton.tsx:31
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceExitButton.tsx:25 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerDeleteButton.tsx:25 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerShutdownButton.tsx:25 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceExitButton.tsx:25
airflow-core/src/airflow/ui/src/pages/DagRuns/BulkDeleteDagRunsButton.tsx:126 · airflow-core/src/airflow/ui/src/pages/TaskInstances/BulkDeleteTaskInstancesButton.tsx:104 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — airflow-core/src/airflow/ui/src/pages/DagRuns/BulkDeleteDagRunsButton.tsx:126
airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:117 · airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:116 — the two spans are one implementation copied and then locally edited — 249 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:117
airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx:30 · airflow-core/src/airflow/ui/src/queries/useEditVariable.ts:30 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx:30
airflow-core/src/airflow/ui/src/pages/Dag/Overview/AllDeadlinesModal.tsx:59 · airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx:74 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — airflow-core/src/airflow/ui/src/pages/Dag/Overview/AllDeadlinesModal.tsx:59
airflow-core/src/airflow/ui/src/queries/useBulkSetDagSchedulingState.ts:33 · airflow-core/src/airflow/ui/src/queries/useBulkTaskInstances.ts:33 — the two spans are one implementation copied and then locally edited — 273 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/queries/useBulkSetDagSchedulingState.ts:33
airflow-core/src/airflow/ui/src/pages/Pools/Pools.tsx:63 · airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx:159 — the two spans are one implementation copied and then locally edited — 243 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/pages/Pools/Pools.tsx:63
airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:270 · airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:309 — the two spans are one implementation copied and then locally edited — 155 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:270
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts:27 imports elkjs/lib/elk-worker.min.js?raw, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts:27
airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:22 imports react-syntax-highlighter/dist/esm/languages/prism/bash, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:22
airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:23 imports react-syntax-highlighter/dist/esm/languages/prism/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:23
airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:24 imports react-syntax-highlighter/dist/esm/languages/prism/python, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:24
airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:25 imports react-syntax-highlighter/dist/esm/languages/prism/sql, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:25
airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:26 imports react-syntax-highlighter/dist/esm/languages/prism/yaml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:26
airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:37 imports react-syntax-highlighter/dist/esm/styles/prism, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:37
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
DagBreadcrumb has cyclomatic complexity 46 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx:127
ClearTaskInstanceDialog has cyclomatic complexity 45 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:135
TaskNode has cyclomatic complexity 44 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:42
(anonymous) has cyclomatic complexity 43 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:133
AssetSchedule has cyclomatic complexity 42 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx:72
Code has cyclomatic complexity 40 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx:53
TaskInstances has cyclomatic complexity 40 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:310
TaskInstanceTooltip has cyclomatic complexity 39 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx:50
(anonymous) has cyclomatic complexity 38 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:346
DagRuns has cyclomatic complexity 36 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:257
DagsList has cyclomatic complexity 36 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:138
(anonymous) has cyclomatic complexity 35 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx:192
DetailsLayout has cyclomatic complexity 35 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:87
DeadlineStatus has cyclomatic complexity 34 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:44
#addTask has cyclomatic complexity 33 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ts-sdk/src/sdk/dag.ts:982
AssetNode has cyclomatic complexity 33 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.tsx:38
Gantt has cyclomatic complexity 31 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx:61
CalendarCell has cyclomatic complexity 30 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarCell.tsx:44
TaskStreamFilter has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx:28
renderField has cyclomatic complexity 29 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — registry/src/js/connection-builder.js:194
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files9.1 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
ts-sdk/src/sdk/dag.ts has 1505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ts-sdk/src/sdk/dag.ts:1
airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx:1
ts-sdk/src/coordinator/serde.ts has 559 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ts-sdk/src/coordinator/serde.ts:1
airflow-core/src/airflow/ui/src/theme.ts has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/theme.ts:1
airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx has 496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:1
ts-sdk/src/coordinator/runtime.ts has 475 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ts-sdk/src/coordinator/runtime.ts:1
ts-sdk/src/coordinator/client.ts has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ts-sdk/src/coordinator/client.ts:1
airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:1
airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx has 429 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:1
airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx has 428 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:1
airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:1
providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts has 416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts:1
ts-sdk/src/hitl/spec.ts has 414 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ts-sdk/src/hitl/spec.ts:1
airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx has 411 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:1
airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts has 410 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts:1
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.0 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:1, airflow-core/src/airflow/ui/rules/typescript.js:1, airflow-core/src/airflow/ui/rules/core.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code8.7 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 142 application, 31 tooling and 388 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×28) — registry/src/js/connection-builder.js, registry/src/js/search.js, registry/src/js/provider-detail.js, …
no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (registry/src/_data/providerVersionPayloads.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — registry/src/_data/providerVersions.js
no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (registry/src/_data/exploreCategoryProviders.js, registry/src/_data/providerCategoryMap.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — registry/src/_data/exploreCategories.js, registry/src/_data/providerKeywordMatch.js
no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (registry/src/_data/latestVersionData.js, registry/src/_data/providerVersions.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — registry/src/_data/utils.js
Nothing ultimately consumes this binding: its only referrer is the re-export in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts in the same commit, or the barrel will import a name that no longer exists. (×5) — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queries.ts:29, airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queries.ts:51, airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queries.ts:96, …
Nothing imports this binding — it is safe to review for removal. (×2) — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:404, airflow-core/src/airflow/ui/src/components/FilterBar/filters/loopParams.ts:25
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
Declared in airflow-core/src/airflow/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
airflow-core/src/airflow/ui/src/utils/links.ts → airflow-core/src/airflow/ui/src/router.tsx → airflow-core/src/airflow/ui/src/layouts/BaseLayout.tsx → airflow-core/src/airflow/ui/src/layouts/Nav/index.ts → airflow-core/src/airflow/ui/src/layouts/Nav/Nav.tsx → airflow-core/src/airflow/ui/src/layouts/Nav/UserSettingsButton.tsx → airflow-core/src/airflow/ui/src/layouts/Nav/LogoutModal.tsx → airflow-core/src/airflow/ui/src/utils/links.ts (one verified cycle inside a mutually-dependent group of 83 files) — airflow-core/src/airflow/ui/src/utils/links.ts:29
airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx → airflow-core/src/airflow/ui/src/queries/useLoopFilterOptions.ts → airflow-core/src/airflow/ui/src/utils/index.ts → airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts → airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx → airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx (one verified cycle inside a mutually-dependent group of 6 files) — airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx:29
airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx → airflow-core/src/airflow/ui/src/components/Graph/graphTypes.ts → airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx (one verified cycle inside a mutually-dependent group of 4 files) — airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx:26
airflow-core/src/airflow/ui/src/system-components/ButtonGroupToggle.tsx → airflow-core/src/airflow/ui/src/system-components/index.ts → airflow-core/src/airflow/ui/src/system-components/ButtonGroupToggle.tsx (one verified cycle inside a mutually-dependent group of 7 files) — airflow-core/src/airflow/ui/src/system-components/ButtonGroupToggle.tsx:24
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`http://localhost:5174/@vite/client` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 4 such include(s) across the repository's markup. — airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/dev/index.html:8
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `REDACTED` builds the web-server image that serves this application, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — REDACTED:19
What to do
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.3 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`toPlainJson` is exported and takes `value: unknown` from its caller, and it calls itself at line 35 (`toPlainJson`) with a piece of `value` (and at line 38) — and nowhere in `toPlainJson` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `toPlainJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ts-sdk/src/sdk/plain-json.ts:35
`serializeValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 539 (`serializeValue`) with a piece of `value` (and at line 542) — and nowhere in `serializeValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `serializeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ts-sdk/src/coordinator/serde.ts:539
`ensure_xcomarg_return_value` is public and takes `arg: Any` from its caller, and it calls itself at line 128 (`ensure_xcomarg_return_value`) with a piece of `arg` (and at line 131) — and nowhere in `ensure_xcomarg_return_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `ensure_xcomarg_return_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — task-sdk/src/airflow/sdk/definitions/mappedoperator.py:128
`iter_xcom_references` is public and takes `arg: Any` from its caller, and it calls itself at line 112 (`self.iter_xcom_references`) with a piece of `arg` (and at line 115) — and nowhere in `iter_xcom_references` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `iter_xcom_references` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — task-sdk/src/airflow/sdk/definitions/xcom_arg.py:112
`add_mask` is public and takes `secret: JsonValue` from its caller, and it calls itself at line 608 (`self.add_mask`) with a piece of `secret` (and at line 645) — and nowhere in `add_mask` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `add_mask` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:608
`find_refs` is public and takes `props: dict` from its caller, and it calls itself at line 54 (`find_refs`) with a piece of `props` — and nowhere in `find_refs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `find_refs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — scripts/ci/prek/vendor_k8s_json_schema.py:54
`normalize_numbers` is public and takes `value: Any` from its caller, and it calls itself at line 170 (`normalize_numbers`) with a piece of `value` (and at line 172) — and nowhere in `normalize_numbers` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `normalize_numbers` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — scripts/ci/lang_sdk_serialization/compare.py:170
`find_differences` is public and takes `python: Any` from its caller, and it calls itself at line 190 (`find_differences`) with a piece of `python` (and at line 196) — and nowhere in `find_differences` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `find_differences` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — scripts/ci/lang_sdk_serialization/compare.py:190
`resolve_airflow_connection_auth` is public and takes `config: dict[str, Any] | None` from its caller, and it calls itself at line 131 (`resolve_airflow_connection_auth`) with a piece of `config` (and at line 133) — and nowhere in `resolve_airflow_connection_auth` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `resolve_airflow_connection_auth` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — providers/openlineage/src/airflow/providers/openlineage/token_provider.py:131
`get_bq_type` is public and takes `type_: Any` from its caller, and it calls itself at line 382 (`self.get_bq_type`) with a piece of `type_` — and nowhere in `get_bq_type` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_bq_type` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — providers/google/src/airflow/providers/google/cloud/transfers/cassandra_to_gcs.py:382
`serialize_value` is public and takes `value: Any` from its caller, and it calls itself at line 98 (`serialize_value`) with a piece of `value` (and at line 100, line 102) — and nowhere in `serialize_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/agent_engine.py:98
`mask_secrets` is public, takes a document from its caller (line 44) and hands it to `_mask`, which calls itself at line 100 (`_mask`) with a piece of `value` (and at line 109, line 111, line 113, line 115) — and nowhere in `_mask` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_mask` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — providers/common/ai/src/airflow/providers/common/ai/utils/masking.py:100
`build_args_validator` is public, takes a document from its caller (line 172) and hands it to `_fragment_to_core_schema`, which calls itself at line 110 (`_fragment_to_core_schema`) with a piece of `fragment` (and at line 137) — and nowhere in `_fragment_to_core_schema` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_fragment_to_core_schema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — providers/common/ai/src/airflow/providers/common/ai/utils/tool_definition.py:110
`get_lb_policy` is public and takes `policy_args: dict[str, Any]` from its caller, and it calls itself at line 170 (`self.get_lb_policy`) with a piece of `policy_args` — and nowhere in `get_lb_policy` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_lb_policy` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — providers/apache/cassandra/src/airflow/providers/apache/cassandra/hooks/cassandra.py:170
`dedent_help` is public and takes `dictionary: dict[str, Any]` from its caller, and it calls itself at line 303 (`dedent_help`) with a piece of `dictionary` — and nowhere in `dedent_help` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `dedent_help` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:303
`flatten_keys` is public and takes `d: dict` from its caller, and it calls itself at line 222 (`flatten_keys`) with a piece of `d` — and nowhere in `flatten_keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `flatten_keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — dev/breeze/src/airflow_breeze/commands/ui_commands.py:222
`flatten_keys_to_values` is public and takes `d: dict` from its caller, and it calls itself at line 234 (`flatten_keys_to_values`) with a piece of `d` — and nowhere in `flatten_keys_to_values` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `flatten_keys_to_values` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — dev/breeze/src/airflow_breeze/commands/ui_commands.py:234
`fill_missing_fields` is public and takes `data: dict` from its caller, and it calls itself at line 181 (`fill_missing_fields`) with a piece of `data` (and at line 185) — and nowhere in `fill_missing_fields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `fill_missing_fields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-ctl/src/airflowctl/api/operations.py:181
`merge_translations` is public and takes `base: dict[str, Any]` from its caller, and it calls itself at line 699 (`merge_translations`) with a piece of `base` — and nowhere in `merge_translations` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `merge_translations` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/plugins_manager.py:699
`merge_dicts` is public and takes `dict1: dict` from its caller, and it calls itself at line 178 (`merge_dicts`) with a piece of `dict1` — and nowhere in `merge_dicts` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `merge_dicts` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/utils/helpers.py:178
`prune_dict` is public and takes `val: Any` from its caller, and it calls itself at line 279 (`prune_dict`) with a piece of `val` (and at line 291) — and nowhere in `prune_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `prune_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/utils/helpers.py:279
`decode_asset_like` is public and takes `var: dict[str, Any]` from its caller, and it calls itself at line 168 (`decode_asset_like`) with a piece of `var` (and at line 170) — and nowhere in `decode_asset_like` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `decode_asset_like` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/decoders.py:168
`format_encoded_value_for_display` is public and takes `value: Any` from its caller, and it calls itself at line 293 (`format_encoded_value_for_display`) with a piece of `value` (and at line 298, line 304, line 317) — and nowhere in `format_encoded_value_for_display` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `format_encoded_value_for_display` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/decoders.py:293
`encode_stored_callback_kwargs` is public, takes a document from its caller (line 286) and hands it to `_encode`, which calls itself at line 304 (`_encode`) with a piece of `value` (and at line 306) — and nowhere in `_encode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/encoders.py:304
`stringify_encoding_keys` is public and takes `d: Any` from its caller, and it calls itself at line 46 (`stringify_encoding_keys`) with a piece of `d` (and at line 49, line 51) — and nowhere in `stringify_encoding_keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `stringify_encoding_keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/enums.py:46
`serialize` is public and takes `var: Any` from its caller, and it calls itself at line 537 (`self.serialize`) with a piece of `var` (and at line 541, line 615, line 620, line 626) — and nowhere in `serialize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/serialized_objects.py:537
`deserialize` is public and takes `encoded_var: Any` from its caller, and it calls itself at line 669 (`self.deserialize`) with a piece of `encoded_var` (and at line 676, line 705, line 721, line 723) — and nowhere in `deserialize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `deserialize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/serialized_objects.py:669
`deserialize_task_group` is public and takes `encoded_group: dict[str, Any]` from its caller, and it calls itself at line 2325 (`self.deserialize_task_group`) with a piece of `encoded_group` — and nowhere in `deserialize_task_group` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `deserialize_task_group` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/serialized_objects.py:2325
`iter_xcom_references` is public and takes `arg: Any` from its caller, and it calls itself at line 79 (`self.iter_xcom_references`) with a piece of `arg` (and at line 82) — and nowhere in `iter_xcom_references` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `iter_xcom_references` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/serialization/definitions/xcom_arg.py:79
`find_reserved_keys` is public, takes a document from its caller (line 39) and hands it to `walk`, which calls itself at line 69 (`walk`) with a piece of `obj` (and at line 75, line 79) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/api_fastapi/core_api/datamodels/common.py:69
`redact_asset_expression` is public, takes a document from its caller (line 26) and hands it to `_redact_node`, which calls itself at line 61 (`_redact_node`) with a piece of `node` — and nowhere in `_redact_node` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_redact_node` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — airflow-core/src/airflow/api_fastapi/common/asset_expression.py:61
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
`_airflow_parsing_context_manager` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `_AIRFLOW_PARSING_CONTEXT_DAG_ID` environment variable (set at line 30, put back at line 37) and the `_AIRFLOW_PARSING_CONTEXT_TASK_ID` environment variable (set at line 32, put back at line 35) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between — including one raised in the caller's `with` block, which a `@contextmanager` generator receives AT its `yield`, so the code after the `yield` never runs: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — task-sdk/src/airflow/sdk/definitions/_internal/dag_parsing_context.py:26
`copy_artifacts_to_svn` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 187, put back at line 207) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — dev/breeze/src/airflow_breeze/commands/release_command.py:163
`commit_release` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 218, put back at line 223) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — dev/breeze/src/airflow_breeze/commands/release_command.py:210
`remove_old_release` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 239, put back at line 297) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — dev/breeze/src/airflow_breeze/commands/release_command.py:226
What to do
Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In Java the same holds for a system property, the default `Locale` or `TimeZone` and `System.out`: pass the value to the operation (`String.format(Locale.ROOT, …)`, a `ZoneId`) rather than moving the global. In Python the same holds for `os.chdir`, `os.environ` and `sys.stdout`: pass `cwd=`/`env=` to `subprocess`, or use `contextlib.chdir`/`redirect_stdout`, rather than moving the global by hand. In Kotlin the same holds for a system property, the default `Locale` or `TimeZone` and `System.out`: pass the value to the operation (`"%.2f".format(Locale.ROOT, …)`, a `ZoneId`) rather than moving the global.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 2/4 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`queryFn` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — providers/edge3/src/airflow/providers/edge3/plugins/www/src/layouts/NavTabs.tsx:37
`fetchXComValue` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/model-api.ts:38
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
`debug` at line 505 is called with an argument built by `"…".join(sorted(_serializers))` (line 507), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — task-sdk/src/airflow/sdk/serde/__init__.py:505
`debug` at line 200 is called with an argument built by `"…".join("…" k "…" v "…" for k, v in airflow_context_vars.items())` (line 202), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/standard/src/airflow/providers/standard/operators/bash.py:200
`debug` at line 716 is called with an argument built by `tuple(facets)` (line 718), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:716
`debug` at line 526 is called with an argument built by `"…".join(download_logs)` (line 526), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:526
`debug` at line 402 is called with an argument built by `"…".join(current_objects - self.previous_objects)` (line 402), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/google/src/airflow/providers/google/cloud/triggers/gcs.py:402
`debug` at line 438 is called with an argument built by `"…".join(current_objects - self.previous_objects)` (line 438), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/google/src/airflow/providers/google/cloud/sensors/gcs.py:438
`debug` at line 366 is called with an argument built by `list(sql_list)` (line 366), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/exasol/src/airflow/providers/exasol/hooks/exasol.py:366
`debug` at line 187 is called with an argument built by `yaml.safe_dump(job_request_obj.to_dict())` (line 187), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:187
`debug` at line 781 is called with an argument built by `yaml.safe_dump(pod_request_obj.to_dict())` (line 781), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:781
`debug` at line 231 is called with an argument built by `sorted(dropped)` (line 233), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:231
`debug` at line 1859 is called with an argument built by `"…".join(download_logs)` (line 1859), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1859
`debug` at line 86 is called with an argument built by `list(columns)` (line 86), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — REDACTED:86
`debug` at line 818 is called with an argument built by `list(unique_dag_ids)` (line 821), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — airflow-core/src/airflow/jobs/scheduler_job_runner.py:818
`debug` at line 323 is called with an argument built by `"…".join(map(str, inspect.stack()))` (line 323), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — airflow-core/src/airflow/dag_processing/manager.py:323
What to do
In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.1 / 10Adequate✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`markup` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:163
`svg` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:256
`message` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:55
`result.url` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:151
`index` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:153
`result.meta?.title||'Untitled'` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:164
`result.url.replace(/^\/docs\//,'').replace(/\.html$/,'')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:165
`result.excerpt` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:166
`renderedForms[connType]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — registry/src/js/connection-builder.js:87
`origHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — registry/src/js/connection-builder.js:183
`escapeHtml(result.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — registry/src/js/search.js:145
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×30) — task-sdk/src/airflow/sdk/log.py:250, task-sdk/src/airflow/sdk/serde/serializers/kubernetes.py:54, task-sdk/src/airflow/sdk/coordinators/java/_dag_importer.py:66, …
`catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — registry/src/js/connection-builder.js:28
`.then(…, function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — registry/src/js/connection-builder.js:178
`.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — registry/src/js/provider-detail.js:123
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×5) — registry/src/js/search.js:39, providers/neo4j/src/airflow/providers/neo4j/sensors/neo4j.py:89, devel-common/src/sphinx_exts/removemarktransform.py:65, …
`if err := msgpack.Unmarshal(raw, &env); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — go-sdk/pkg/execution/messages.go:54
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — go-sdk/cmd/airflow-go-pack/sources.go:138
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
~0.3 `!` null assertions per 1k TypeScript source lines — 25 assertion(s) across the 94068 source line(s) of the 911 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: ts-sdk/src/sdk/dag.ts (8), ts-sdk/src/coordinator/client.ts (7), ts-sdk/src/coordinator/deferred.ts (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 24 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. A delete/anonymise identifier was seen but did not co-occur with GDPR vocabulary or a subject-id shape, so it was not credited (e.g. a save-slot DeleteAccount()). Implement erasure, data export/portability and consent tracking over the subject's records.
Not included — 29 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 15 — the compose project is invalid) — time="2026-10-25T17:36:38Z" level=warning msg="The \"AIRFLOW_IMAGE_NAME\" variable is not set. Defaulting to a blank string." time="2026-10-25T17:36:38Z" level=warning msg="The \"FERNET_KEY\" variable is not set. Defaulting to a blank string." service "airflow-scheduler" has neither an image nor a build context specified: invalid compose project; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# only; Go, Java, JavaScript, Kotlin, Python, Scala, TypeScript, html not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (airflow-core), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .go, .java, .kt, .py, .scala, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 32 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P9 Domain vs controller coverage — coverage data present for 800 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/hooks/alloy_db.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/operators/dataform.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/hooks/cloud_memorystore.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/hooks/dataproc_metastore.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/asb.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge dev/breeze/src/airflow_breeze/commands/kubernetes_kustomize_commands.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/teradata/src/airflow/providers/teradata/operators/tpt.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/hooks/tasks.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label REDACTED:113— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label REDACTED:122— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label registry/src/_includes/base.njk:143— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
Import cycle (2 files) airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx:26— airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx → airflow-core/src/airflow/ui/src/components/Graph/graphTypes.ts → airflow-core/src/airflow/ui/src/components/Graph/Edge.tsx (one verified cycle inside a mutually-dependent group of 4 files)
Import cycle (2 files) airflow-core/src/airflow/ui/src/system-components/ButtonGroupToggle.tsx:24— airflow-core/src/airflow/ui/src/system-components/ButtonGroupToggle.tsx → airflow-core/src/airflow/ui/src/system-components/index.ts → airflow-core/src/airflow/ui/src/system-components/ButtonGroupToggle.tsx (one verified cycle inside a mutually-dependent group of 7 files)
AC2 · Forms & labels· Link with no accessible name · ×1
Link with no accessible name REDACTED:26— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels· <label> that labels no control · ×1
<label> that labels no control registry/src/js/connection-builder.js:219— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> providers/fab/src/airflow/providers/fab/www/templates/airflow/traceback.html:21— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
<html> without a lang registry/src/provider-detail.njk:10— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
Project dependency cycle — The projects apache-airflow → apache-airflow-core → apache-airflow-providers-common-compat → apache-airflow (one cycle inside a mutually-dependent group of 8 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
TodoComment ts-sdk/src/coordinator/serde.ts:407— // TODO: honour [scheduler] create_cron_data_intervals, which switches Python — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/tests/task_sdk/definitions/test_mappedoperator.py:74— # TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/bases/operator.py:1175— # TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/configuration.py:43— # TODO: Task SDK will have its own REDACTED — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/comms.py:711— # TODO: Create a convert api_response to result classes so we don't need to do this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:496— # TODO: This should probably be moved to a separate module like `airflow.sdk.execution_time.comms` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:549— # TODO: This should probably be moved to a separate module like `airflow.sdk.execution_time.comms` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:597— # TODO: This should probably be moved to a separate module like `airflow.sdk.execution_time.comms` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:614— # TODO: This should probably be moved to a separate module like `airflow.sdk.execution_time.comms` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:726— # TODO: ``__getattr__`` for jinja template access like ``{{ task_store.job_id }}`` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:1217— # TODO: This is temporary to avoid code duplication between here & REDACTED — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/coordinator.py:189— # TODO: Importing this at the top causes circular imports. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:1506— # TODO: Store in the SecretsCache if its enabled - see #48858
TodoComment REDACTED:2930— # TODO: convert the dict back to a pretty stack trace — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment airflow-core/src/airflow/jobs/triggerer_job_runner.py:1169— # TODO: convert the dict back to a pretty stack trace — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:3170— # TODO: Use logging providers to handle the chunked upload for us etc. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:225— # TODO: Move this entire class into a separate file: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:323— # TODO: Move this to `airflow.sdk.execution_time.context` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:356— # TODO: Make this go through Public API longer term. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:389— # TODO: Assess if we need to pass these through timezone.coerce_datetime — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:1137— # TODO: Task-SDK: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/definitions/_internal/contextmanager.py:54— # TODO: Task-SDK: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:1528— # TODO: Call pre execute etc. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/task_runner.py:2342— # TODO: handle timeout in case of deferral — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment task-sdk/src/airflow/sdk/execution_time/schema/migrator.py:154— # TODO: Cadwyn is tightly coupled to Startlette request and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FileTooLong: REDACTED REDACTED— FileTooLong — 3309 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2809 over it, 6.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: jobs/scheduler_job_runner.py airflow-core/src/airflow/jobs/scheduler_job_runner.py— FileTooLong — 2995 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2495 over it, 5.99× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2516 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2016 over it, 5.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: operators/dataplex.py providers/google/src/airflow/providers/google/cloud/operators/dataplex.py— FileTooLong — 2367 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1867 over it, 4.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: models/dagrun.py airflow-core/src/airflow/models/dagrun.py— FileTooLong — 2089 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1589 over it, 4.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/kubernetes_commands.py dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py— FileTooLong — 2041 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1541 over it, 4.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: security_manager/override.py providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py— FileTooLong — 2017 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1517 over it, 4.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 2005 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1505 over it, 4.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: utils/selective_checks.py dev/breeze/src/airflow_breeze/utils/selective_checks.py— FileTooLong — 1968 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1468 over it, 3.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: operators/dataproc.py providers/google/src/airflow/providers/google/cloud/operators/dataproc.py— FileTooLong — 1921 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1421 over it, 3.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cli/cli_config.py airflow-core/src/airflow/cli/cli_config.py— FileTooLong — 1879 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1379 over it, 3.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: operators/bigquery.py providers/google/src/airflow/providers/google/cloud/operators/bigquery.py— FileTooLong — 1854 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1354 over it, 3.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: execution_time/task_runner.py task-sdk/src/airflow/sdk/execution_time/task_runner.py— FileTooLong — 1721 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1221 over it, 3.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/testing_commands.py dev/breeze/src/airflow_breeze/commands/testing_commands.py— FileTooLong — 1717 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1217 over it, 3.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: serialization/serialized_objects.py airflow-core/src/airflow/serialization/serialized_objects.py— FileTooLong — 1606 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1106 over it, 3.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hooks/bigquery.py providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py— FileTooLong — 1599 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1099 over it, 3.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: operators/dlp.py providers/google/src/airflow/providers/google/cloud/operators/dlp.py— FileTooLong — 1591 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1091 over it, 3.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1466 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 966 over it, 2.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: utils/utils.py providers/openlineage/src/airflow/providers/openlineage/utils/utils.py— FileTooLong — 1431 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 931 over it, 2.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: configuration/parser.py shared/configuration/src/airflow_shared/configuration/parser.py— FileTooLong — 1399 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 899 over it, 2.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: vertex_ai/custom_job.py providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py— FileTooLong — 1396 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 896 over it, 2.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: routes/task_instances.py airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py— FileTooLong — 1381 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 881 over it, 2.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: operators/sagemaker.py providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py— FileTooLong — 1368 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 868 over it, 2.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: operators/emr.py providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py— FileTooLong — 1342 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 842 over it, 2.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: public/task_instances.py airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py— FileTooLong — 1310 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 810 over it, 2.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Hotspot: airflow-core/src/airflow/jobs/scheduler_job_runner.py airflow-core/src/airflow/jobs/scheduler_job_runner.py:1469— airflow-core/src/airflow/jobs/scheduler_job_runner.py changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in SchedulerJobRunner.process_executor_events at line 1469. 5 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/jobs/scheduler_job_runner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:452— airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in task_instances.ti_update_state at line 452. 2 of those changes were fix/bug commits, and the other 30 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:431— REDACTED changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in taskinstance.clear_task_instances at line 431. 4 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1044— airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in task_instances.post_clear_task_instances at line 1044. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: providers/common/ai/src/airflow/providers/common/ai/operators/agent.py providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:518— providers/common/ai/src/airflow/providers/common/ai/operators/agent.py changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AgentOperator.__init__ at line 518. 2 of those changes were fix/bug commits, and the other 35 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- providers/common/ai/src/airflow/providers/common/ai/operators/agent.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:133— airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in DataTable.DataTable at line 133. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:138— airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in DagsList.DagsList at line 138. 1 of those changes was a fix/bug commit, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: dev/breeze/src/airflow_breeze/utils/selective_checks.py dev/breeze/src/airflow_breeze/utils/selective_checks.py:1981— dev/breeze/src/airflow_breeze/utils/selective_checks.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in SelectiveChecks.skip_prek_hooks at line 1981. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- dev/breeze/src/airflow_breeze/utils/selective_checks.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:3085— REDACTED changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in supervisor.supervise_task at line 3085. 5 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: task-sdk/src/airflow/sdk/execution_time/task_runner.py task-sdk/src/airflow/sdk/execution_time/task_runner.py:1613— task-sdk/src/airflow/sdk/execution_time/task_runner.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in task_runner._run_task_and_map_outcome at line 1613. 4 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- task-sdk/src/airflow/sdk/execution_time/task_runner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: ts-sdk/src/sdk/dag.ts ts-sdk/src/sdk/dag.ts:982— ts-sdk/src/sdk/dag.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Dag.#addTask at line 982. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- ts-sdk/src/sdk/dag.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:135— airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in ClearTaskInstanceDialog.ClearTaskInstanceDialog at line 135. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: providers/common/ai/src/airflow/providers/common/ai/operators/llm.py providers/common/ai/src/airflow/providers/common/ai/operators/llm.py:241— providers/common/ai/src/airflow/providers/common/ai/operators/llm.py changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in LLMOperator.__init__ at line 241. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- providers/common/ai/src/airflow/providers/common/ai/operators/llm.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/jobs/triggerer_job_runner.py airflow-core/src/airflow/jobs/triggerer_job_runner.py:1731— airflow-core/src/airflow/jobs/triggerer_job_runner.py changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in TriggerRunner.run_trigger at line 1731. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/jobs/triggerer_job_runner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:77— airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in TaskLogContent.TaskLogContent at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/models/dagrun.py airflow-core/src/airflow/models/dagrun.py:2652— airflow-core/src/airflow/models/dagrun.py changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in DagRun.schedule_tis at line 2652. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/models/dagrun.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:838— REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ci_commands.upgrade at line 838. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: go-sdk/airflow/dag.go go-sdk/airflow/dag.go:243— go-sdk/airflow/dag.go changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in DagRef.addTask at line 243. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- go-sdk/airflow/dag.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: task-sdk/src/airflow/sdk/definitions/dag.py task-sdk/src/airflow/sdk/definitions/dag.py:1257— task-sdk/src/airflow/sdk/definitions/dag.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in DAG.test at line 1257. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- task-sdk/src/airflow/sdk/definitions/dag.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:87— airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in DetailsLayout.DetailsLayout at line 87. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: dev/breeze/src/airflow_breeze/params/shell_params.py dev/breeze/src/airflow_breeze/params/shell_params.py:368— dev/breeze/src/airflow_breeze/params/shell_params.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ShellParams.compose_file at line 368. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- dev/breeze/src/airflow_breeze/params/shell_params.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:113— airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in GanttTimeline.GanttTimeline at line 113. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py:211— providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in LLMBranchOperator.execute at line 211. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:310— airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in TaskInstances.TaskInstances at line 310. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: airflow-core/src/airflow/dag_processing/manager.py airflow-core/src/airflow/dag_processing/manager.py:880— airflow-core/src/airflow/dag_processing/manager.py changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in DagFileProcessorManager._refresh_dag_bundles at line 880. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/dag_processing/manager.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FunctionTooLong: filterConfigs.useFilterConfigs airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx:95— FunctionTooLong — useFilterConfigs runs 404 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 304 over it, 4.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: DetailsLayout.DetailsLayout airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:87— FunctionTooLong — DetailsLayout runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TaskLogContent.TaskLogContent airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:77— FunctionTooLong — TaskLogContent runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: GanttTimeline.GanttTimeline airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:113— FunctionTooLong — GanttTimeline runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ClearTaskInstanceDialog.ClearTaskInstanceDialog airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:135— FunctionTooLong — ClearTaskInstanceDialog runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: BulkWorkerOperations.BulkWorkerOperations providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/BulkWorkerOperations.tsx:35— FunctionTooLong — BulkWorkerOperations runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: Code.Code airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx:53— FunctionTooLong — Code runs 248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 148 over it, 2.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: Details.Details airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:47— FunctionTooLong — Details runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ChatPage.ChatPage providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/components/ChatPage.tsx:70— FunctionTooLong — ChatPage runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TriggerDAGForm.TriggerDAGForm airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:72— FunctionTooLong — TriggerDAGForm runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: RunBackfillForm.RunBackfillForm airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:54— FunctionTooLong — RunBackfillForm runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: WorkerPage.WorkerPage providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:49— FunctionTooLong — WorkerPage runs 222 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 122 over it, 2.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: Calendar.Calendar airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx:54— FunctionTooLong — Calendar runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: Logs.Logs airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:48— FunctionTooLong — Logs runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TaskStreamFilter.TaskStreamFilter airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx:28— FunctionTooLong — TaskStreamFilter runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: DagsList.DagsList airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:138— FunctionTooLong — DagsList runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: JobsPage.JobsPage providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:33— FunctionTooLong — JobsPage runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: DataTable.DataTable airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:133— FunctionTooLong — DataTable runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: GraphTaskFilters.GraphTaskFilters airflow-core/src/airflow/ui/src/components/GraphTaskFilters.tsx:46— FunctionTooLong — GraphTaskFilters runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ConnectionForm.ConnectionForm airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx:49— FunctionTooLong — ConnectionForm runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TaskNode.TaskNode airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:42— FunctionTooLong — TaskNode runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: client.createCoordinatorClient ts-sdk/src/coordinator/client.ts:210— FunctionTooLong — createCoordinatorClient runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TaskLogHeader.TaskLogHeader airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogHeader.tsx:68— FunctionTooLong — TaskLogHeader runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: PresetFiltersMenu.PresetFiltersMenu airflow-core/src/airflow/ui/src/components/PresetFiltersMenu.tsx:50— FunctionTooLong — PresetFiltersMenu runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TaskInstances.TaskInstances airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:310— FunctionTooLong — TaskInstances runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (13 lines × 2) airflow-core/src/airflow/cli/cli_parser.py:199— airflow-core/src/airflow/cli/cli_parser.py:199-211 | airflow-ctl/src/airflowctl/ctl/cli_parser.py:77-89 — before extracting anything, compare `airflow-core/src/airflow/cli/cli_parser.py` and `airflow-ctl/src/airflowctl/ctl/cli_parser.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/cli/cli_parser.py:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) airflow-core/src/airflow/configuration.py:123— airflow-core/src/airflow/configuration.py:123-135 | shared/configuration/src/airflow_shared/configuration/parser.py:156-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) airflow-core/src/airflow/migrations/versions/0048_3_0_0_add_trigger_asset_reference.py:47— airflow-core/src/airflow/migrations/versions/0048_3_0_0_add_trigger_asset_reference.py:47-59 | airflow-core/src/airflow/migrations/versions/0088_3_2_0_replace_asset_trigger_table_with_asset.py:90-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0048_3_0_0_add_trigger_asset_reference.py:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:47— airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:47-59 | airflow-core/src/airflow/migrations/versions/0091_3_2_0_add_human_in_the_loop_detail_history.py:47-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) airflow-core/src/airflow/migrations/versions/0083_3_1_0_add_teams.py:60— airflow-core/src/airflow/migrations/versions/0083_3_1_0_add_teams.py:60-72 | airflow-core/src/airflow/migrations/versions/0137_3_4_0_add_job_team_association_table.py:56-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) airflow-core/src/airflow/migrations/versions/0122_3_3_0_add_indexes_on_dag_run_created_dag_.py:51— airflow-core/src/airflow/migrations/versions/0122_3_3_0_add_indexes_on_dag_run_created_dag_.py:51-63 | airflow-core/src/airflow/migrations/versions/0122_3_3_0_add_indexes_on_dag_run_created_dag_.py:65-77 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) airflow-core/src/airflow/providers_manager.py:1359— airflow-core/src/airflow/providers_manager.py:1359-1371 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:613-625 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) airflow-core/src/airflow/utils/net.py:32— airflow-core/src/airflow/utils/net.py:32-44 | task-sdk/src/airflow/sdk/api/client.py:140-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `task-sdk/src/airflow/sdk/api/client.py:136` calls `getfqdn` and `airflow-core/src/airflow/utils/net.py:30` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) REDACTED:208— REDACTED:208-220 | REDACTED:3134-3146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) dev/registry/extract_connections.py:257— dev/registry/extract_connections.py:257-269 | dev/registry/extract_parameters.py:1186-1198 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:204— providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:204-216 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:252-264 — `providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py` and `providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:649— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:649-661 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:826-838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:649` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:778— providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:778-790 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:959-971 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:177— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:177-189 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:309-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:161— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:161-173 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:726-738 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:724` calls `get` and `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:159` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:833— providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:833-845 | providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:941-953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:833` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py:159— providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py:159-171 | providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py:313-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/sensors/mwaa.py:159` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/transfers/http_to_s3.py:130— providers/amazon/src/airflow/providers/amazon/aws/transfers/http_to_s3.py:130-142 | providers/google/src/airflow/providers/google/cloud/transfers/http_to_gcs.py:128-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: `BaseOperator` names `airflow.providers.common.compat.sdk` in one and `airflow.providers.google.version_compat` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) providers/common/ai/src/airflow/providers/common/ai/decorators/llm.py:91— providers/common/ai/src/airflow/providers/common/ai/decorators/llm.py:91-103 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_branch.py:90-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) providers/common/ai/src/airflow/providers/common/ai/decorators/llm_schema_compare.py:90— providers/common/ai/src/airflow/providers/common/ai/decorators/llm_schema_compare.py:90-102 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_sql.py:89-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) providers/common/compat/src/airflow/providers/common/compat/_retry_policy.py:85— providers/common/compat/src/airflow/providers/common/compat/_retry_policy.py:85-97 | task-sdk/src/airflow/sdk/definitions/retry_policy.py:469-481 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:1025— providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:1025-1037 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:943-955 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) providers/edge3/src/airflow/providers/edge3/models/edge_worker.py:399— providers/edge3/src/airflow/providers/edge3/models/edge_worker.py:399-411 | providers/edge3/src/airflow/providers/edge3/models/edge_worker.py:419-431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:799— providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:799-811 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:928-940 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:319— providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:319-331 | providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:1102-1114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:65— airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:65-75 | airflow-core/src/airflow/migrations/versions/0091_3_2_0_add_human_in_the_loop_detail_history.py:65-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) airflow-core/src/airflow/utils/code_utils.py:64— airflow-core/src/airflow/utils/code_utils.py:64-74 | dev/breeze/src/airflow_breeze/utils/publish_docs_helpers.py:58-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) airflow-core/src/airflow/utils/helpers.py:280— airflow-core/src/airflow/utils/helpers.py:280-290 | task-sdk/src/airflow/sdk/definitions/connection.py:76-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:793— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:793-803 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:924-934 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:804` calls `console_print` and `dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:935` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) dev/breeze/src/airflow_breeze/commands/ui_commands.py:659— dev/breeze/src/airflow_breeze/commands/ui_commands.py:659-669 | dev/breeze/src/airflow_breeze/commands/ui_commands.py:675-685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ui_commands.py:659` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:382— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:382-392 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:490-500 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:382` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:626— providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:626-636 | providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:1145-1155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:626` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:896— providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:896-906 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:91-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:896` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/apache/spark/src/airflow/providers/apache/spark/decorators/pyspark.py:50— providers/apache/spark/src/airflow/providers/apache/spark/decorators/pyspark.py:50-60 | providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_pyspark.py:45-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/apache/spark/src/airflow/providers/apache/spark/decorators/pyspark.py:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:750— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:750-760 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:785-795 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) REDACTED:1170— REDACTED:1170-1180 | REDACTED:1233-1243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:1296— providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:1296-1306 | providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:1448-1458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:1296` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:256— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:256-266 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:440-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1010— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1010-1020 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1605-1615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1179— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1179-1189 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1743-1753 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/datastore.py:128— providers/google/src/airflow/providers/google/cloud/operators/datastore.py:128-138 | providers/google/src/airflow/providers/google/cloud/operators/datastore.py:231-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/datastore.py:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:328— providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:328-338 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:628-638 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/managed_kafka.py:615— providers/google/src/airflow/providers/google/cloud/operators/managed_kafka.py:615-625 | providers/google/src/airflow/providers/google/cloud/operators/managed_kafka.py:889-899 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/managed_kafka.py:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/translate.py:563— providers/google/src/airflow/providers/google/cloud/operators/translate.py:563-573 | providers/google/src/airflow/providers/google/cloud/operators/translate.py:933-943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/translate.py:563` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/cassandra_to_gcs.py:172— providers/google/src/airflow/providers/google/cloud/transfers/cassandra_to_gcs.py:172-182 | providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py:185-195 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/mysql_to_gcs.py:93— providers/google/src/airflow/providers/google/cloud/transfers/mysql_to_gcs.py:93-103 | providers/google/src/airflow/providers/google/cloud/transfers/oracle_to_gcs.py:78-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:297— providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:297-307 | providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:392-403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/compute.py:89— providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/compute.py:89-99 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_instance.py:111-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/compute.py:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) providers/mysql/src/airflow/providers/mysql/transfers/presto_to_mysql.py:82— providers/mysql/src/airflow/providers/mysql/transfers/presto_to_mysql.py:82-92 | providers/mysql/src/airflow/providers/mysql/transfers/trino_to_mysql.py:82-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:526— providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:526-536 | providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:547-560 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Outbound HTTP without resilience dev/backport/update_backport_status.py:109— `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/commands/sbom_commands.py:887— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/commands/sbom_commands.py:889— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:39— `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/utils/cdxgen.py:461— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/utils/cdxgen.py:515— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/utils/cdxgen.py:627— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/utils/cdxgen.py:658— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:507— `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/utils/github.py:365— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:206— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:444— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/breeze/src/airflow_breeze/utils/run_utils.py:403— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/validate_version_added_fields_in_config.py:49— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience dev/validate_version_added_fields_in_config.py:94— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devel-common/src/sphinx_exts/docs_build/fetch_inventories.py:168— `requests.Session(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devel-common/src/sphinx_exts/extra_provider_files_with_substitutions.py:30— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devel-common/src/sphinx_exts/sphinx_script_update.py:79— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience devel-common/src/sphinx_exts/sphinx_script_update.py:84— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience providers/amazon/src/airflow/providers/amazon/aws/fs/s3.py:118— `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py:145— `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py:168— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py:174— `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience providers/apache/hdfs/src/airflow/providers/apache/hdfs/hooks/webhdfs.py:113— `requests.Session(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py:183— `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/ui/rules/typescript.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/ui/rules/core.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/core.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/unicorn.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/ui/rules/unicorn.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file registry/src/js/connection-builder.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file registry/src/js/search.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/BulkWorkerOperations.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file registry/src/js/provider-detail.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/hooks/useBulkWorkerActions.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ts-sdk/example/src/ai-approval.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file registry/src/js/provider-filters.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/ui/rules/i18n.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerConcurrencyButton.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/RemoveQueueButton.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/ui/rules/perfectionist.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/ui/rules/rem.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerSysinfoBadge.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/perfectionist.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Duplicated block (14 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:73— airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:73-86 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:135-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:483— airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:483-496 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:807-820 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:483` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:250— airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:250-263 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:308-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) REDACTED:151— REDACTED:151-164 | REDACTED:189-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `BulkUpdateAction[ConnectionBody]` in one and `BulkDeleteAction[ConnectionBody]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 2) airflow-core/src/airflow/cli/commands/config_command.py:131— airflow-core/src/airflow/cli/commands/config_command.py:131-144 | airflow-ctl/src/airflowctl/ctl/commands/config_command.py:78-91 — before extracting anything, compare `airflow-core/src/airflow/cli/commands/config_command.py` and `airflow-ctl/src/airflowctl/ctl/commands/config_command.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/cli/commands/config_command.py:131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) REDACTED:490— REDACTED:490-503 | REDACTED:800-813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) airflow-core/src/airflow/utils/email.py:279— airflow-core/src/airflow/utils/email.py:279-292 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:278-291 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) airflow-ctl/src/airflowctl/ctl/commands/task_command.py:92— airflow-ctl/src/airflowctl/ctl/commands/task_command.py:92-105 | airflow-ctl/src/airflowctl/ctl/commands/task_command.py:143-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:377— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:377-390 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:455-468 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:708— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:708-721 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:680-693 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:708` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:671— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:671-684 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:693-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:671` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) dev/breeze/src/airflow_breeze/commands/sbom_commands.py:969— dev/breeze/src/airflow_breeze/commands/sbom_commands.py:969-982 | dev/breeze/src/airflow_breeze/commands/sbom_commands.py:993-1006 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/sbom_commands.py:969` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 2) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:338— dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:338-351 | devel-common/src/sphinx_exts/providers_commits.py:112-125 — before extracting anything, compare `dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py` and `devel-common/src/sphinx_exts/providers_commits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) REDACTED:426— REDACTED:426-439 | REDACTED:451-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:635— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:635-648 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:997-1010 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:635` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:751— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:751-764 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1094-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:751` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) REDACTED:386— REDACTED:386-399 | REDACTED:1131-1144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) providers/databricks/src/airflow/providers/databricks/triggers/databricks.py:259— providers/databricks/src/airflow/providers/databricks/triggers/databricks.py:259-272 | providers/databricks/src/airflow/providers/databricks/triggers/databricks.py:382-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) providers/databricks/src/airflow/providers/databricks/utils/databricks.py:79— providers/databricks/src/airflow/providers/databricks/utils/databricks.py:79-92 | providers/databricks/src/airflow/providers/databricks/utils/databricks.py:105-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:426— providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:426-439 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:850-863 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:426` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:530— providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:530-543 | providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:721-734 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:607— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:607-620 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:517-530 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:607` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3133— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3133-3146 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3304-3317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:795— providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:795-808 | providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:1624-1637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:795` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/compute.py:416— providers/google/src/airflow/providers/google/cloud/operators/compute.py:416-430 | providers/google/src/airflow/providers/google/cloud/operators/compute.py:1546-1559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
No assertions: does not let a task handler be wired the way a native task is ts-sdk/tests/public-api.test.ts:211— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: uses idiomatic TypeScript names for public client types ts-sdk/tests/public-api.test.ts:403— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: rejects wire-format names and non-JSON XCom values ts-sdk/tests/public-api.test.ts:465— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: keeps the handler's own type, so the wrapped value is still registrable ts-sdk/tests/sdk/arg-names.test.ts:46— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: checks the map's keys against the handler's own parameter type ts-sdk/tests/sdk/arg-names.test.ts:93— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: are the subject's, for the body too, when only the subject reads them ts-sdk/tests/sdk/hitl-inference.test.ts:55— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: are the body's when only the body reads them ts-sdk/tests/sdk/hitl-inference.test.ts:66— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: are given by an explicit type argument for each text of a hitl ts-sdk/tests/sdk/hitl-inference.test.ts:92— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Verify Dag source code is displayed airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts:31— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Verify code is scrollable for long files airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts:35— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: navigate to Dag detail page and display grid view airflow-core/src/airflow/ui/tests/e2e/specs/dag-grid-view.spec.ts:24— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: render grid with task instances airflow-core/src/airflow/ui/tests/e2e/specs/dag-grid-view.spec.ts:30— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: display task states with color coding airflow-core/src/airflow/ui/tests/e2e/specs/dag-grid-view.spec.ts:36— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: show task details when clicking a grid cell airflow-core/src/airflow/ui/tests/e2e/specs/dag-grid-view.spec.ts:42— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: show tooltip on grid cell hover airflow-core/src/airflow/ui/tests/e2e/specs/dag-grid-view.spec.ts:48— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify HITL review modal opens from the required actions route airflow-core/src/airflow/ui/tests/e2e/specs/dag-run.spec.ts:22— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: click on a run and verify run details page airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs-tab.spec.ts:35— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: search for dag run by run ID pattern airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs-tab.spec.ts:41— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify Dag runs table displays data airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts:28— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify filtering by failed state airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts:33— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify filtering by Dag ID airflow-core/src/airflow/ui/tests/e2e/specs/dag-runs.spec.ts:38— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should successfully verify details tab airflow-core/src/airflow/ui/tests/e2e/specs/dags-list.spec.ts:60— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify pools list displays with default_pool airflow-core/src/airflow/ui/tests/e2e/specs/pools.spec.ts:57— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify test pool exists in list airflow-core/src/airflow/ui/tests/e2e/specs/pools.spec.ts:62— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: verify pool slots display correctly airflow-core/src/airflow/ui/tests/e2e/specs/pools.spec.ts:67— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
TooManyMethods: FabAirflowSecurityManagerOverride providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:189— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AirflowConfigParser shared/configuration/src/airflow_shared/configuration/parser.py:240— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SchedulerJobRunner airflow-core/src/airflow/jobs/scheduler_job_runner.py:328— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TaskInstance REDACTED:1063— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OpenAIHook providers/openai/src/airflow/providers/openai/hooks/openai.py:163— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ProvidersManager airflow-core/src/airflow/providers_manager.py:417— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DagRun airflow-core/src/airflow/models/dagrun.py:263— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DatabricksHook providers/databricks/src/airflow/providers/databricks/hooks/databricks.py:331— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BaseAuthManager airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:120— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BaseDatabricksHook REDACTED:114— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BigQueryHook providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:126— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: S3Hook providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:164— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DataplexHook providers/google/src/airflow/providers/google/cloud/hooks/dataplex.py:81— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AzureDataFactoryHook providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/data_factory.py:150— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DbApiHook providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py:151— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KeycloakAuthManager providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:110— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SageMakerHook providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker.py:139— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DbtCloudHook providers/dbt/cloud/src/airflow/providers/dbt/cloud/hooks/dbt.py:193— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BaseExecutor airflow-core/src/airflow/executors/base_executor.py:201— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FabAuthManager providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:204— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KubernetesPodOperator providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:142— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GCSHook providers/google/src/airflow/providers/google/cloud/hooks/gcs.py:148— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KubernetesExecutor providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:113— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CloudDLPHook providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:68— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SambaHook providers/samba/src/airflow/providers/samba/hooks/samba.py:33— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (12 lines × 2) airflow-core/src/airflow/api_fastapi/common/http_access_log.py:82— airflow-core/src/airflow/api_fastapi/common/http_access_log.py:82-93 | airflow-core/src/airflow/api_fastapi/common/http_metrics.py:96-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:548— airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:548-559 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:635-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:548` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:126— airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:126-137 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:200-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:138` calls `join`, `options`, `joinedload` and `airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py:213` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) airflow-core/src/airflow/cli/commands/dag_command.py:572— airflow-core/src/airflow/cli/commands/dag_command.py:572-583 | airflow-core/src/airflow/cli/commands/dag_command.py:677-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) airflow-core/src/airflow/cli/simple_table.py:64— airflow-core/src/airflow/cli/simple_table.py:64-75 | airflow-ctl/src/airflowctl/ctl/console_formatting.py:70-81 — before extracting anything, compare `airflow-core/src/airflow/cli/simple_table.py` and `airflow-ctl/src/airflowctl/ctl/console_formatting.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:618— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:618-629 | airflow-core/src/airflow/migrations/versions/0044_3_0_0__drop_task_fail_table.py:58-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) airflow-core/src/airflow/models/trigger.py:382— airflow-core/src/airflow/models/trigger.py:382-393 | airflow-core/src/airflow/models/trigger.py:521-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) airflow-core/src/airflow/serialization/serialized_objects.py:1331— airflow-core/src/airflow/serialization/serialized_objects.py:1331-1342 | airflow-core/src/airflow/serialization/serialized_objects.py:1967-1978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) REDACTED:155— REDACTED:155-166 | REDACTED:3177-3188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker.py:612— providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker.py:612-623 | providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker.py:1360-1371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/notifications/ses.py:94— providers/amazon/src/airflow/providers/amazon/aws/notifications/ses.py:94-105 | providers/amazon/src/airflow/providers/amazon/aws/operators/ses.py:100-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:976— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:976-988 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1072-1083 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1239— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1239-1250 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1086-1097 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:650— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:650-661 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:352-363 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:650` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:803— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:803-814 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:951-962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:803` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/triggers/batch.py:97— providers/amazon/src/airflow/providers/amazon/aws/triggers/batch.py:97-108 | providers/amazon/src/airflow/providers/amazon/aws/triggers/ecs.py:113-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/batch.py:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) REDACTED:701— REDACTED:701-712 | REDACTED:742-753 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) REDACTED:1216— REDACTED:1216-1227 | REDACTED:1258-1269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:242— providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:242-253 | providers/snowflake/src/airflow/providers/snowflake/utils/openlineage.py:282-293 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `counter` to `"success") else default_state for` in one and `"state") else "" ) default_state = "success" if default_state == "running" else default_state for` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/snowflake/src/airflow/providers/snowflake/utils/openlineage.py:296` calls `get` and `providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:255` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:202— providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:202-213 | providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:600-611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_monitoring.py:108— providers/google/src/airflow/providers/google/cloud/operators/cloud_monitoring.py:108-119 | providers/google/src/airflow/providers/google/cloud/operators/cloud_monitoring.py:546-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/compute.py:246— providers/google/src/airflow/providers/google/cloud/operators/compute.py:246-261 | providers/google/src/airflow/providers/google/cloud/operators/compute.py:491-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/compute.py:246` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:745— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:745-756 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1350-1361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:311— providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:311-322 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:612-623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1601— providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1601-1612 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1684-1695 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:184— airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:184-192 | providers/fab/docs/img/diagram_fab_auth_manager_airflow_architecture.py:57-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:184` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/fab/docs/img/diagram_fab_auth_manager_airflow_architecture.py:63` calls `Edge` and `airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:192` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:711— airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:711-717 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:779-784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:711` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:205— airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:205-210 | airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:563-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:205` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:202` calls `column` and `airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:560` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) airflow-core/src/airflow/cli/commands/asset_command.py:100— airflow-core/src/airflow/cli/commands/asset_command.py:100-105 | airflow-core/src/airflow/cli/commands/asset_command.py:151-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:70— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:70-75 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:334-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:136— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:136-141 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:314-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:134` calls `Column`, `Boolean` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:313` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:253— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:253-258 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:325-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:315— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:315-320 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:334-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:315` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:373— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:373-378 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:429-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:373` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:524— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:524-529 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:636-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:531` calls `Column`, `Integer`, `StringID` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:643` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:815— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:815-820 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:845-850 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:618— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:618-623 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:796-801 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/production_image_commands.py:796` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) REDACTED:907— REDACTED:907-912 | dev/registry/extract_parameters.py:1386-1391 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) dev/registry/extract_parameters.py:1091— dev/registry/extract_parameters.py:1091-1096 | dev/registry/extract_parameters.py:1099-1104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) dev/verify_release_calendar.py:104— dev/verify_release_calendar.py:104-109 | dev/verify_release_calendar.py:394-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:219— providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:219-224 | providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:260-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) scripts/ci/prek/check_connection_doc_labels.py:121— scripts/ci/prek/check_connection_doc_labels.py:121-126 | scripts/ci/prek/check_connection_doc_labels.py:129-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:336— scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:336-341 | scripts/ci/prek/check_window_in_sync.py:204-209 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) task-sdk/dev/datamodel_code_formatter.py:49— task-sdk/dev/datamodel_code_formatter.py:49-54 | task-sdk/dev/datamodel_code_formatter.py:87-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) airflow-core/src/airflow/cli/simple_table.py:46— airflow-core/src/airflow/cli/simple_table.py:46-51 | airflow-ctl/src/airflowctl/ctl/console_formatting.py:52-57 — before extracting anything, compare `airflow-core/src/airflow/cli/simple_table.py` and `airflow-ctl/src/airflowctl/ctl/console_formatting.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) airflow-core/src/airflow/migrations/versions/0057_3_0_0_add_new_task_instance_field_scheduled_.py:53— airflow-core/src/airflow/migrations/versions/0057_3_0_0_add_new_task_instance_field_scheduled_.py:53-58 | airflow-core/src/airflow/migrations/versions/0074_3_1_0_add_triggering_user_to_dag_run.py:51-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) airflow-core/src/airflow/models/crypto.py:59— airflow-core/src/airflow/models/crypto.py:59-64 | task-sdk/src/airflow/sdk/crypto.py:64-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) airflow-core/src/airflow/serialization/definitions/dag.py:288— airflow-core/src/airflow/serialization/definitions/dag.py:288-293 | task-sdk/src/airflow/sdk/definitions/dag.py:1076-1081 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) airflow-core/src/airflow/serialization/definitions/taskgroup.py:133— airflow-core/src/airflow/serialization/definitions/taskgroup.py:133-138 | task-sdk/src/airflow/sdk/definitions/taskgroup.py:427-432 — before extracting anything, compare `airflow-core/src/airflow/serialization/definitions/taskgroup.py` and `task-sdk/src/airflow/sdk/definitions/taskgroup.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) airflow-core/src/airflow/timetables/simple.py:334— airflow-core/src/airflow/timetables/simple.py:334-339 | task-sdk/src/airflow/sdk/definitions/timetables/assets.py:87-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Swallowed exception (caught, then discarded) task-sdk/src/airflow/sdk/log.py:250— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) task-sdk/src/airflow/sdk/serde/serializers/kubernetes.py:54— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) task-sdk/src/airflow/sdk/coordinators/java/_dag_importer.py:66— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) task-sdk/src/airflow/sdk/coordinators/java/_dag_importer.py:72— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) scripts/in_container/run_provider_yaml_files_check.py:837— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) scripts/ci/prek/check_version_consistency.py:165— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) scripts/ci/prek/update_airflow_pyproject_toml.py:140— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) registry/src/js/connection-builder.js:28— `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/pagerduty/src/airflow/providers/pagerduty/hooks/pagerduty.py:114— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/pagerduty/src/airflow/providers/pagerduty/hooks/pagerduty_events.py:238— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:173— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/openlineage/src/airflow/providers/openlineage/extractors/manager.py:376— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_sql.py:234— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py:320— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:889— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/common/io/src/airflow/providers/common/io/state_store/backend.py:121— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/common/ai/src/airflow/providers/common/ai/toolsets/sandbox.py:599— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/common/ai/src/airflow/providers/common/ai/managed_agents/failover.py:144— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/pod_generator.py:399— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py:350— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:440— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:849— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/apache/cassandra/src/airflow/providers/apache/cassandra/hooks/cassandra.py:213— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:337— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) go-sdk/pkg/execution/messages.go:54— `if err := msgpack.Unmarshal(raw, &env); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated block (15 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py:449— airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py:449-463 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py:478-492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:692— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:692-706 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:656-670 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) REDACTED:234— REDACTED:234-248 | REDACTED:684-698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:251` calls `max` and `REDACTED:699` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:389— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:389-403 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:443-457 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:463` calls `extend` and `providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:405` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:805— providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:805-819 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:962-976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:805` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1261— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1261-1275 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1109-1126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1749— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1749-1763 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1783-1797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:2008— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:2008-2022 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:2160-2174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:2008` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_data.py:161— providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_data.py:161-175 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_data.py:264-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:384— providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:384-398 | providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:430-444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:209— providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:209-223 | providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:232-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc.py:143— providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc.py:143-157 | providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_jdbc.py:122-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (15 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:849— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:849-863 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:997-1011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) REDACTED:354— REDACTED:354-368 | REDACTED:395-409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:1027— providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:1027-1041 | providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py:303-317 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/openlineage/utils.py:492— providers/google/src/airflow/providers/google/cloud/openlineage/utils.py:492-506 | providers/google/src/airflow/providers/google/cloud/openlineage/utils.py:717-731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/openlineage/utils.py:492` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:308— providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:308-322 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:468-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:308` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:353— providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:353-367 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:1025-1039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:353` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:800— providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:800-814 | providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:892-906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_memorystore.py:800` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_sql.py:997— providers/google/src/airflow/providers/google/cloud/operators/cloud_sql.py:997-1011 | providers/google/src/airflow/providers/google/cloud/operators/cloud_sql.py:1138-1152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:565— providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:565-579 | providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:1037-1051 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:188— providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:188-202 | providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:526-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/asb.py:135— providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/asb.py:135-149 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/asb.py:449-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/asb.py:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/powerbi.py:177— providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/powerbi.py:177-191 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/powerbi.py:237-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/powerbi.py:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:586— providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:586-600 | providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:467-481 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: `AzureBaseHook` names `airflow.providers.microsoft.azure.hooks.azure_base` in one and `airflow.providers.microsoft.azure.hooks.base_azure` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:585` calls `get` and `providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:465` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:395— airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:395-404 | airflow-core/src/airflow/cli/commands/dag_command.py:173-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) REDACTED:770— REDACTED:770-779 | REDACTED:923-932 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:770` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) airflow-core/src/airflow/models/crypto.py:166— airflow-core/src/airflow/models/crypto.py:166-175 | task-sdk/src/airflow/sdk/crypto.py:118-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `AirflowException` names `airflow.exceptions` in one and `airflow.sdk.exceptions` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) airflow-core/src/airflow/state/metastore.py:248— airflow-core/src/airflow/state/metastore.py:248-257 | airflow-core/src/airflow/state/metastore.py:475-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/state/metastore.py:248` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) airflow-core/src/airflow/utils/helpers.py:54— airflow-core/src/airflow/utils/helpers.py:54-63 | task-sdk/src/airflow/sdk/definitions/_internal/node.py:43-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/utils/helpers.py:49` calls `TypeVar` and `task-sdk/src/airflow/sdk/definitions/_internal/node.py:39` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/base_aws.py:92— providers/amazon/src/airflow/providers/amazon/aws/operators/base_aws.py:92-101 | providers/amazon/src/airflow/providers/amazon/aws/sensors/base_aws.py:92-101 — `providers/amazon/src/airflow/providers/amazon/aws/operators/base_aws.py` and `providers/amazon/src/airflow/providers/amazon/aws/sensors/base_aws.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 10 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:413— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:413-422 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:454-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1202— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1202-1211 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1728-1737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1728— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1728-1737 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1895-1904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1728` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1765— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1765-1774 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1907-1917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:73— providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:73-82 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:302-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:73` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:120— providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:120-129 | providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:211-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:117` calls `error`, `_LazyStatusFormatter` and `providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:208` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/job.py:136— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/job.py:136-145 | providers/google/src/airflow/providers/google/cloud/triggers/kubernetes_engine.py:393-402 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/job.py:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `V1Job` names `kubernetes.client` in one and `kubernetes_asyncio.client` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:499— providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:499-508 | providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:1216-1225 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2606— providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2606-2615 | providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2641-2650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataproc_metastore.py:429— providers/google/src/airflow/providers/google/cloud/operators/dataproc_metastore.py:429-438 | providers/google/src/airflow/providers/google/cloud/operators/dataproc_metastore.py:796-805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/translate.py:684— providers/google/src/airflow/providers/google/cloud/operators/translate.py:684-693 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/dataset.py:462-471 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/translate.py:684` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:710— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:710-719 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:793-802 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:141— providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:141-150 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:166-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:163` calls `_create_scopes`, `_create_resources`, `_create_group_membership_mapper` and `providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:140` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) providers/presto/src/airflow/providers/presto/transfers/gcs_to_presto.py:100— providers/presto/src/airflow/providers/presto/transfers/gcs_to_presto.py:100-109 | providers/trino/src/airflow/providers/trino/transfers/gcs_to_trino.py:103-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: `Context` names `airflow.providers.common.compat.sdk` in one and `airflow.sdk` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) providers/snowflake/src/airflow/providers/snowflake/operators/cortex_agent.py:234— providers/snowflake/src/airflow/providers/snowflake/operators/cortex_agent.py:234-243 | providers/snowflake/src/airflow/providers/snowflake/operators/cortex_agent.py:337-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) scripts/ci/prek/check_http_exception_import_from_fastapi.py:63— scripts/ci/prek/check_http_exception_import_from_fastapi.py:63-72 | scripts/ci/prek/check_test_only_imports_in_src.py:68-77 — before extracting anything, compare `scripts/ci/prek/check_http_exception_import_from_fastapi.py` and `scripts/ci/prek/check_test_only_imports_in_src.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) scripts/ci/prek/compile_provider_assets.py:133— scripts/ci/prek/compile_provider_assets.py:133-142 | scripts/ci/prek/compile_ui_assets.py:77-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/compile_provider_assets.py:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) scripts/ci/prek/sync_go_sdk_schemas.py:103— scripts/ci/prek/sync_go_sdk_schemas.py:103-112 | scripts/ci/prek/sync_ts_sdk_schemas.py:87-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) shared/configuration/src/airflow_shared/configuration/parser.py:797— shared/configuration/src/airflow_shared/configuration/parser.py:797-806 | shared/configuration/src/airflow_shared/configuration/parser.py:813-822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) airflow-core/src/airflow/cli/cli_parser.py:254— airflow-core/src/airflow/cli/cli_parser.py:254-258 | airflow-ctl/src/airflowctl/ctl/cli_parser.py:143-147 — before extracting anything, compare `airflow-core/src/airflow/cli/cli_parser.py` and `airflow-ctl/src/airflowctl/ctl/cli_parser.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-ctl/src/airflowctl/ctl/cli_parser.py:148` calls `add_preview_action` and `airflow-core/src/airflow/cli/cli_parser.py:259` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:246— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:246-251 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:272-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:246` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:98— airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:98-102 | airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:209-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) airflow-core/src/airflow/migrations/versions/0033_3_0_0_add_tables_for_backfill.py:57— airflow-core/src/airflow/migrations/versions/0033_3_0_0_add_tables_for_backfill.py:57-61 | airflow-core/src/airflow/migrations/versions/0095_3_2_0_update_orm_asset_partitioning.py:55-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0033_3_0_0_add_tables_for_backfill.py:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) airflow-core/src/airflow/observability/metrics/datadog_logger.py:29— airflow-core/src/airflow/observability/metrics/datadog_logger.py:29-33 | task-sdk/src/airflow/sdk/observability/metrics/datadog_logger.py:29-33 — before extracting anything, compare `airflow-core/src/airflow/observability/metrics/datadog_logger.py` and `task-sdk/src/airflow/sdk/observability/metrics/datadog_logger.py` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/observability/metrics/datadog_logger.py:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `SafeDogStatsdLogger` names `airflow._shared.observability.metrics.datadog_logger` in one and `airflow.sdk._shared.observability.metrics.datadog_logger` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) airflow-core/src/airflow/observability/metrics/datadog_logger.py:37— airflow-core/src/airflow/observability/metrics/datadog_logger.py:37-41 | task-sdk/src/airflow/sdk/observability/metrics/datadog_logger.py:37-41 — before extracting anything, compare `airflow-core/src/airflow/observability/metrics/datadog_logger.py` and `task-sdk/src/airflow/sdk/observability/metrics/datadog_logger.py` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/observability/metrics/datadog_logger.py:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `SafeDogStatsdLogger` names `airflow._shared.observability.metrics.datadog_logger` in one and `airflow.sdk._shared.observability.metrics.datadog_logger` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) airflow-core/src/airflow/providers_manager.py:452— airflow-core/src/airflow/providers_manager.py:452-456 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:147-152 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `task-sdk/src/airflow/sdk/providers_manager_runtime.py:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) airflow-core/src/airflow/providers_manager.py:457— airflow-core/src/airflow/providers_manager.py:457-461 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:153-157 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) airflow-core/src/airflow/providers_manager.py:867— airflow-core/src/airflow/providers_manager.py:867-871 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:558-562 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:696— providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:696-700 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:813-817 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:696` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) REDACTED:1059— REDACTED:1059-1063 | REDACTED:1560-1564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) providers/google/src/airflow/providers/google/cloud/openlineage/mixins.py:374— providers/google/src/airflow/providers/google/cloud/openlineage/mixins.py:374-378 | providers/google/src/airflow/providers/google/cloud/openlineage/mixins.py:390-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:289— providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:289-293 | providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:297-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:289` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) task-sdk/src/airflow/sdk/bases/sensor.py:289— task-sdk/src/airflow/sdk/bases/sensor.py:289-294 | task-sdk/src/airflow/sdk/bases/sensor.py:311-315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `task-sdk/src/airflow/sdk/bases/sensor.py:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) airflow-core/src/airflow/api_fastapi/execution_api/datamodels/asset_state_store.py:41— airflow-core/src/airflow/api_fastapi/execution_api/datamodels/asset_state_store.py:41-45 | airflow-core/src/airflow/api_fastapi/execution_api/datamodels/task_state_store.py:43-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) airflow-core/src/airflow/cli/cli_config.py:92— airflow-core/src/airflow/cli/cli_config.py:92-96 | airflow-ctl/src/airflowctl/ctl/cli_config.py:151-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) airflow-core/src/airflow/cli/cli_parser.py:276— airflow-core/src/airflow/cli/cli_parser.py:276-280 | airflow-ctl/src/airflowctl/ctl/cli_parser.py:166-170 — before extracting anything, compare `airflow-core/src/airflow/cli/cli_parser.py` and `airflow-ctl/src/airflowctl/ctl/cli_parser.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `sub` to `GroupCommand` in one and `GroupCommandParser` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) airflow-core/src/airflow/cli/commands/config_command.py:159— airflow-core/src/airflow/cli/commands/config_command.py:159-163 | airflow-ctl/src/airflowctl/ctl/commands/config_command.py:115-119 — before extracting anything, compare `airflow-core/src/airflow/cli/commands/config_command.py` and `airflow-ctl/src/airflowctl/ctl/commands/config_command.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) airflow-core/src/airflow/providers_manager.py:922— airflow-core/src/airflow/providers_manager.py:922-926 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:653-657 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) airflow-core/src/airflow/serialization/definitions/dag.py:1402— airflow-core/src/airflow/serialization/definitions/dag.py:1402-1407 | task-sdk/src/airflow/sdk/definitions/dag.py:1225-1229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) contributing-docs/images/diagram_coordinator_execution_sequence.py:180— contributing-docs/images/diagram_coordinator_execution_sequence.py:180-184 | contributing-docs/images/diagram_task_sdk_execution_sequence.py:157-161 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_sequence.py` and `contributing-docs/images/diagram_task_sdk_execution_sequence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) dev/breeze/src/airflow_breeze/utils/publish_docs_helpers.py:37— dev/breeze/src/airflow_breeze/utils/publish_docs_helpers.py:37-41 | devel-common/src/sphinx_exts/docs_build/code_utils.py:83-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py:84— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py:84-88 | providers/opensearch/src/airflow/providers/opensearch/log/os_response.py:59-63 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_response.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) providers/microsoft/mssql/src/airflow/providers/microsoft/mssql/hooks/mssql.py:65— providers/microsoft/mssql/src/airflow/providers/microsoft/mssql/hooks/mssql.py:65-69 | providers/odbc/src/airflow/providers/odbc/hooks/odbc.py:90-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) scripts/ci/prek/check_cli_definition_imports.py:115— scripts/ci/prek/check_cli_definition_imports.py:115-119 | scripts/ci/prek/check_conf_import_in_providers.py:76-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
+ 6 more in this group — see findings.md.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×31
Recursive walk over a caller-supplied document has no depth cap ts-sdk/src/sdk/plain-json.ts:35— `toPlainJson` is exported and takes `value: unknown` from its caller, and it calls itself at line 35 (`toPlainJson`) with a piece of `value` (and at line 38) — and nowhere in `toPlainJson` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `toPlainJson` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap ts-sdk/src/coordinator/serde.ts:539— `serializeValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 539 (`serializeValue`) with a piece of `value` (and at line 542) — and nowhere in `serializeValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `serializeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap task-sdk/src/airflow/sdk/definitions/mappedoperator.py:128— `ensure_xcomarg_return_value` is public and takes `arg: Any` from its caller, and it calls itself at line 128 (`ensure_xcomarg_return_value`) with a piece of `arg` (and at line 131) — and nowhere in `ensure_xcomarg_return_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `ensure_xcomarg_return_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap task-sdk/src/airflow/sdk/definitions/xcom_arg.py:112— `iter_xcom_references` is public and takes `arg: Any` from its caller, and it calls itself at line 112 (`self.iter_xcom_references`) with a piece of `arg` (and at line 115) — and nowhere in `iter_xcom_references` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `iter_xcom_references` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:608— `add_mask` is public and takes `secret: JsonValue` from its caller, and it calls itself at line 608 (`self.add_mask`) with a piece of `secret` (and at line 645) — and nowhere in `add_mask` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `add_mask` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap scripts/ci/prek/vendor_k8s_json_schema.py:54— `find_refs` is public and takes `props: dict` from its caller, and it calls itself at line 54 (`find_refs`) with a piece of `props` — and nowhere in `find_refs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `find_refs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap scripts/ci/lang_sdk_serialization/compare.py:170— `normalize_numbers` is public and takes `value: Any` from its caller, and it calls itself at line 170 (`normalize_numbers`) with a piece of `value` (and at line 172) — and nowhere in `normalize_numbers` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `normalize_numbers` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap scripts/ci/lang_sdk_serialization/compare.py:190— `find_differences` is public and takes `python: Any` from its caller, and it calls itself at line 190 (`find_differences`) with a piece of `python` (and at line 196) — and nowhere in `find_differences` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `find_differences` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap providers/openlineage/src/airflow/providers/openlineage/token_provider.py:131— `resolve_airflow_connection_auth` is public and takes `config: dict[str, Any] | None` from its caller, and it calls itself at line 131 (`resolve_airflow_connection_auth`) with a piece of `config` (and at line 133) — and nowhere in `resolve_airflow_connection_auth` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `resolve_airflow_connection_auth` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap providers/google/src/airflow/providers/google/cloud/transfers/cassandra_to_gcs.py:382— `get_bq_type` is public and takes `type_: Any` from its caller, and it calls itself at line 382 (`self.get_bq_type`) with a piece of `type_` — and nowhere in `get_bq_type` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_bq_type` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/agent_engine.py:98— `serialize_value` is public and takes `value: Any` from its caller, and it calls itself at line 98 (`serialize_value`) with a piece of `value` (and at line 100, line 102) — and nowhere in `serialize_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `serialize_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap providers/common/ai/src/airflow/providers/common/ai/utils/masking.py:100— `mask_secrets` is public, takes a document from its caller (line 44) and hands it to `_mask`, which calls itself at line 100 (`_mask`) with a piece of `value` (and at line 109, line 111, line 113, line 115) — and nowhere in `_mask` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_mask` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap providers/common/ai/src/airflow/providers/common/ai/utils/tool_definition.py:110— `build_args_validator` is public, takes a document from its caller (line 172) and hands it to `_fragment_to_core_schema`, which calls itself at line 110 (`_fragment_to_core_schema`) with a piece of `fragment` (and at line 137) — and nowhere in `_fragment_to_core_schema` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_fragment_to_core_schema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap providers/apache/cassandra/src/airflow/providers/apache/cassandra/hooks/cassandra.py:170— `get_lb_policy` is public and takes `policy_args: dict[str, Any]` from its caller, and it calls itself at line 170 (`self.get_lb_policy`) with a piece of `policy_args` — and nowhere in `get_lb_policy` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `get_lb_policy` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap REDACTED:303— `dedent_help` is public and takes `dictionary: dict[str, Any]` from its caller, and it calls itself at line 303 (`dedent_help`) with a piece of `dictionary` — and nowhere in `dedent_help` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `dedent_help` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap dev/breeze/src/airflow_breeze/commands/ui_commands.py:222— `flatten_keys` is public and takes `d: dict` from its caller, and it calls itself at line 222 (`flatten_keys`) with a piece of `d` — and nowhere in `flatten_keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `flatten_keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap dev/breeze/src/airflow_breeze/commands/ui_commands.py:234— `flatten_keys_to_values` is public and takes `d: dict` from its caller, and it calls itself at line 234 (`flatten_keys_to_values`) with a piece of `d` — and nowhere in `flatten_keys_to_values` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `flatten_keys_to_values` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-ctl/src/airflowctl/api/operations.py:181— `fill_missing_fields` is public and takes `data: dict` from its caller, and it calls itself at line 181 (`fill_missing_fields`) with a piece of `data` (and at line 185) — and nowhere in `fill_missing_fields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `fill_missing_fields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/plugins_manager.py:699— `merge_translations` is public and takes `base: dict[str, Any]` from its caller, and it calls itself at line 699 (`merge_translations`) with a piece of `base` — and nowhere in `merge_translations` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `merge_translations` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/utils/helpers.py:178— `merge_dicts` is public and takes `dict1: dict` from its caller, and it calls itself at line 178 (`merge_dicts`) with a piece of `dict1` — and nowhere in `merge_dicts` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `merge_dicts` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/utils/helpers.py:279— `prune_dict` is public and takes `val: Any` from its caller, and it calls itself at line 279 (`prune_dict`) with a piece of `val` (and at line 291) — and nowhere in `prune_dict` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `prune_dict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/serialization/decoders.py:168— `decode_asset_like` is public and takes `var: dict[str, Any]` from its caller, and it calls itself at line 168 (`decode_asset_like`) with a piece of `var` (and at line 170) — and nowhere in `decode_asset_like` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `decode_asset_like` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/serialization/decoders.py:293— `format_encoded_value_for_display` is public and takes `value: Any` from its caller, and it calls itself at line 293 (`format_encoded_value_for_display`) with a piece of `value` (and at line 298, line 304, line 317) — and nowhere in `format_encoded_value_for_display` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `format_encoded_value_for_display` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/serialization/encoders.py:304— `encode_stored_callback_kwargs` is public, takes a document from its caller (line 286) and hands it to `_encode`, which calls itself at line 304 (`_encode`) with a piece of `value` (and at line 306) — and nowhere in `_encode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap airflow-core/src/airflow/serialization/enums.py:46— `stringify_encoding_keys` is public and takes `d: Any` from its caller, and it calls itself at line 46 (`stringify_encoding_keys`) with a piece of `d` (and at line 49, line 51) — and nowhere in `stringify_encoding_keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `stringify_encoding_keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Duplicated block (7 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:190— airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:190-196 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:216-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_state_store.py:132— airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_state_store.py:132-138 | airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_state_store.py:224-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) airflow-core/src/airflow/cli/commands/asset_command.py:92— airflow-core/src/airflow/cli/commands/asset_command.py:92-98 | airflow-core/src/airflow/cli/commands/asset_command.py:143-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:53— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:53-59 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:77-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:60— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:60-66 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:84-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:71— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:71-77 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:104-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:423— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:423-429 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:430-436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:423` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:437` calls `Column`, `Text`, `UtcDateTime` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:430` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) REDACTED:41— REDACTED:41-47 | REDACTED:100-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:592— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:592-598 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:787-793 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:592` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/rds.py:165— providers/amazon/src/airflow/providers/amazon/aws/hooks/rds.py:165-171 | providers/amazon/src/airflow/providers/amazon/aws/hooks/rds.py:209-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:44— providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:44-50 | providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:57-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:66` calls `downgrade` and `providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:52` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:69— providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:69-75 | providers/edge3/src/airflow/providers/edge3/migrations/versions/0003_3_2_0_fix_migration_file_orm_inconsistencies.py:82-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:903— providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:903-909 | providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:917-924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:77— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:77-83 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:103-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:110` calls `Column`, `Boolean` and `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:84` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/compute.py:472— providers/google/src/airflow/providers/google/cloud/hooks/compute.py:472-478 | providers/google/src/airflow/providers/google/cloud/hooks/compute.py:498-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/compute.py:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:99— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:99-105 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:184-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) providers/presto/src/airflow/providers/presto/hooks/presto.py:239— providers/presto/src/airflow/providers/presto/hooks/presto.py:239-245 | providers/trino/src/airflow/providers/trino/hooks/trino.py:272-278 — before extracting anything, compare `providers/presto/src/airflow/providers/presto/hooks/presto.py` and `providers/trino/src/airflow/providers/trino/hooks/trino.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) scripts/ci/prek/compile_provider_assets.py:89— scripts/ci/prek/compile_provider_assets.py:89-95 | scripts/ci/prek/compile_ui_assets.py:46-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) scripts/in_container/install_airflow_and_providers.py:63— scripts/in_container/install_airflow_and_providers.py:63-69 | scripts/in_container/install_airflow_python_client.py:29-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) scripts/tools/initialize_virtualenv.py:179— scripts/tools/initialize_virtualenv.py:179-185 | scripts/tools/initialize_virtualenv.py:188-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) providers/common/ai/src/airflow/providers/common/ai/hooks/langchain.py:148— providers/common/ai/src/airflow/providers/common/ai/hooks/langchain.py:148-154 | providers/common/ai/src/airflow/providers/common/ai/hooks/llamaindex.py:165-171 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:2266— providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:2266-2272 | providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:864-871 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/pubsub.py:921— providers/google/src/airflow/providers/google/cloud/operators/pubsub.py:921-927 | providers/google/src/airflow/providers/google/cloud/sensors/pubsub.py:209-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/presto_to_gcs.py:197— providers/google/src/airflow/providers/google/cloud/transfers/presto_to_gcs.py:197-203 | providers/google/src/airflow/providers/google/cloud/transfers/trino_to_gcs.py:203-209 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) scripts/ci/prek/check_airflow_imports_in_shared.py:36— scripts/ci/prek/check_airflow_imports_in_shared.py:36-42 | scripts/ci/prek/check_shared_distributions_structure.py:190-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:667— airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:667-674 | airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:905-912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:667` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) airflow-core/src/airflow/api_fastapi/common/parameters/dag.py:110— airflow-core/src/airflow/api_fastapi/common/parameters/dag.py:110-117 | airflow-core/src/airflow/api_fastapi/common/parameters/dag.py:269-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) airflow-core/src/airflow/cli/cli_parser.py:241— airflow-core/src/airflow/cli/cli_parser.py:241-248 | airflow-ctl/src/airflowctl/ctl/cli_parser.py:130-137 — before extracting anything, compare `airflow-core/src/airflow/cli/cli_parser.py` and `airflow-ctl/src/airflowctl/ctl/cli_parser.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) airflow-core/src/airflow/cli/simple_table.py:130— airflow-core/src/airflow/cli/simple_table.py:130-137 | airflow-ctl/src/airflowctl/ctl/console_formatting.py:134-141 — before extracting anything, compare `airflow-core/src/airflow/cli/simple_table.py` and `airflow-ctl/src/airflowctl/ctl/console_formatting.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) airflow-core/src/airflow/dag_processing/bundles/manifest.py:132— airflow-core/src/airflow/dag_processing/bundles/manifest.py:132-141 | airflow-core/src/airflow/dag_processing/bundles/manifest.py:149-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:800— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:800-807 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:816-823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:808` calls `drop_index` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:824` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) REDACTED:641— REDACTED:641-648 | task-sdk/src/airflow/sdk/definitions/connection.py:421-428 — before extracting anything, compare `REDACTED` and `task-sdk/src/airflow/sdk/definitions/connection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/transfers/redshift_to_s3.py:234— providers/amazon/src/airflow/providers/amazon/aws/transfers/redshift_to_s3.py:234-241 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_redshift.py:235-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:355— providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:355-362 | providers/apache/pig/src/airflow/providers/apache/pig/hooks/pig.py:84-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_pipelines.py:117— providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_pipelines.py:117-124 | providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:443-450 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:224— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:224-231 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:263-270 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `ti` to `TaskInstance | TaskInstanceKey` in one and `TaskInstance | TaskInstanceKey | RuntimeTI` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) REDACTED:1401— REDACTED:1401-1408 | providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py:311-318 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:627— providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:627-634 | providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:1098-1105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:110— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:110-117 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:866-873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:1252— providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:1252-1259 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:1310-1317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) scripts/ci/prek/check_airflow_imports_in_shared.py:107— scripts/ci/prek/check_airflow_imports_in_shared.py:107-114 | scripts/ci/prek/common_prek_utils.py:846-853 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) airflow-core/src/airflow/providers_manager.py:141— airflow-core/src/airflow/providers_manager.py:141-148 | shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py:144-151 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) airflow-core/src/airflow/utils/log/logging_mixin.py:111— airflow-core/src/airflow/utils/log/logging_mixin.py:111-118 | task-sdk/src/airflow/sdk/definitions/_internal/logging_mixin.py:70-77 — before extracting anything, compare `airflow-core/src/airflow/utils/log/logging_mixin.py` and `task-sdk/src/airflow/sdk/definitions/_internal/logging_mixin.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `Logger` names `airflow._shared.logging.types` in one and `airflow.sdk.types` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/bundles/s3.py:106— providers/amazon/src/airflow/providers/amazon/aws/bundles/s3.py:106-113 | providers/google/src/airflow/providers/google/cloud/bundles/gcs.py:104-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:88— providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:88-95 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2230-2237 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/data_lake.py:329— providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/data_lake.py:329-336 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:149-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) providers/presto/src/airflow/providers/presto/hooks/presto.py:79— providers/presto/src/airflow/providers/presto/hooks/presto.py:79-86 | providers/trino/src/airflow/providers/trino/hooks/trino.py:81-88 — before extracting anything, compare `providers/presto/src/airflow/providers/presto/hooks/presto.py` and `providers/trino/src/airflow/providers/trino/hooks/trino.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) providers/slack/src/airflow/providers/slack/notifications/slack.py:98— providers/slack/src/airflow/providers/slack/notifications/slack.py:98-105 | providers/slack/src/airflow/providers/slack/operators/slack.py:78-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) providers/standard/src/airflow/providers/standard/operators/branch.py:39— providers/standard/src/airflow/providers/standard/operators/branch.py:39-47 | task-sdk/src/airflow/sdk/bases/branch.py:39-46 — before extracting anything, compare `providers/standard/src/airflow/providers/standard/operators/branch.py` and `task-sdk/src/airflow/sdk/bases/branch.py` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `Context` names `airflow.providers.common.compat.sdk` in one and `airflow.sdk.definitions.context` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:570— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:570-577 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1755-1762 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:102— airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:102-117 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:160-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state_store.py:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) airflow-core/src/airflow/api_fastapi/execution_api/routes/dag_runs.py:107— airflow-core/src/airflow/api_fastapi/execution_api/routes/dag_runs.py:107-122 | airflow-core/src/airflow/api_fastapi/execution_api/routes/dag_runs.py:196-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) airflow-core/src/airflow/migrations/versions/0032_3_0_0_rename_execution_date_to_logical_date_and_nullable.py:54— airflow-core/src/airflow/migrations/versions/0032_3_0_0_rename_execution_date_to_logical_date_and_nullable.py:54-69 | airflow-core/src/airflow/migrations/versions/0032_3_0_0_rename_execution_date_to_logical_date_and_nullable.py:114-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0032_3_0_0_rename_execution_date_to_logical_date_and_nullable.py:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:252— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:252-267 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:541-556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) airflow-core/src/airflow/plugins_manager.py:72— airflow-core/src/airflow/plugins_manager.py:72-87 | task-sdk/src/airflow/sdk/plugins_manager.py:51-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) dev/breeze/src/airflow_breeze/commands/production_image_commands.py:428— dev/breeze/src/airflow_breeze/commands/production_image_commands.py:428-443 | scripts/in_container/install_airflow_and_providers.py:1006-1021 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/production_image_commands.py:428` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) REDACTED:63— REDACTED:63-78 | devel-common/src/tests_common/pytest_plugin.py:170-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1834— providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1834-1849 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:497-512 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (16 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:243— providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:243-258 | providers/google/src/airflow/providers/google/cloud/log/cloud_logging_task_handler.py:247-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py:272— providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py:272-287 | providers/amazon/src/airflow/providers/amazon/aws/operators/appflow.py:338-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/sensors/kinesis_analytics.py:147— providers/amazon/src/airflow/providers/amazon/aws/sensors/kinesis_analytics.py:147-162 | providers/amazon/src/airflow/providers/amazon/aws/sensors/kinesis_analytics.py:216-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1847— providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1847-1862 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2121-2136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/compute.py:566— providers/google/src/airflow/providers/google/cloud/operators/compute.py:566-581 | providers/google/src/airflow/providers/google/cloud/operators/compute.py:1703-1718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:608— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:608-623 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1802-1817 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:608` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:139— providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:139-154 | providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:422-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py:70— providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py:70-86 | providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_mysql.py:65-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py:274— providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py:274-289 | providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py:327-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/marketing_platform/hooks/campaign_manager.py:255— providers/google/src/airflow/providers/google/marketing_platform/hooks/campaign_manager.py:255-270 | providers/google/src/airflow/providers/google/marketing_platform/hooks/campaign_manager.py:299-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/marketing_platform/hooks/campaign_manager.py:255` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) scripts/ci/prek/check_shared_distributions_structure.py:421— scripts/ci/prek/check_shared_distributions_structure.py:421-436 | scripts/ci/prek/check_shared_distributions_structure.py:461-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_shared_distributions_structure.py:421` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) scripts/in_container/install_airflow_and_providers.py:1124— scripts/in_container/install_airflow_and_providers.py:1124-1139 | scripts/in_container/install_airflow_and_providers.py:1225-1240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/in_container/install_airflow_and_providers.py:1124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 2) airflow-core/src/airflow/migrations/versions/0114_3_3_0_add_access_control_columns_to_dag_schedule_asset_reference.py:41— airflow-core/src/airflow/migrations/versions/0114_3_3_0_add_access_control_columns_to_dag_schedule_asset_reference.py:41-56 | airflow-core/src/airflow/migrations/versions/0119_3_3_0_add_allow_consumer_teams_to_task_outlet_asset_reference.py:41-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16 lines × 2) airflow-core/src/airflow/partition_mappers/temporal.py:513— airflow-core/src/airflow/partition_mappers/temporal.py:513-528 | task-sdk/src/airflow/sdk/definitions/partition_mappers/temporal.py:198-213 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `PartitionMapper` names `airflow.partition_mappers.base` in one and `airflow.sdk.definitions.partition_mappers.base` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (16 lines × 2) airflow-core/src/airflow/utils/log/logging_mixin.py:92— airflow-core/src/airflow/utils/log/logging_mixin.py:92-107 | task-sdk/src/airflow/sdk/definitions/_internal/logging_mixin.py:51-66 — before extracting anything, compare `airflow-core/src/airflow/utils/log/logging_mixin.py` and `task-sdk/src/airflow/sdk/definitions/_internal/logging_mixin.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/presto_to_gcs.py:114— providers/google/src/airflow/providers/google/cloud/transfers/presto_to_gcs.py:114-129 | providers/google/src/airflow/providers/google/cloud/transfers/trino_to_gcs.py:117-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) devel-common/src/tests_common/test_utils/logging_command_executor.py:35— devel-common/src/tests_common/test_utils/logging_command_executor.py:35-50 | devel-common/src/tests_common/test_utils/logging_command_executor.py:84-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D30 · Dependency Vulnerabilities· Medium CVE · ×20
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×19
Members sharing a duplicated core (4 members, 50+ identical tokens) airflow-core/docs/img/diagram_basic_airflow_architecture.py:57— airflow-core/docs/img/diagram_basic_airflow_architecture.py:57-101 | airflow-core/docs/img/diagram_dag_processor_airflow_architecture.py:56-121 | airflow-core/docs/img/diagram_distributed_airflow_architecture.py:56-124 | airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:57-235 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:45— airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:45-71 | airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:96-159 | airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:163-238 | airflow-core/src/airflow/migrations/versions/0088_3_2_0_replace_asset_trigger_table_with_asset.py:47-78 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:207— REDACTED:207-220 | REDACTED:3133-3146 | dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:337-351 | devel-common/src/sphinx_exts/providers_commits.py:111-125 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:408— dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:408-456 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:925-977 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:1279-1332 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:1594-1653 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:420— providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:420-442 | providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:452-474 | providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:484-506 | providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:516-538 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:78— providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:78-103 | providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:76-88 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:101-126 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:83-108 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:751— providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:751-797 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:800-820 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:946-1027 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:1093-1131 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1186— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1186-1237 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1715-1775 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1778-1797 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1885-1919 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:139— providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:139-193 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:117-172 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py:141-209 | providers/amazon/src/airflow/providers/amazon/aws/transfers/sftp_to_s3.py:178-236 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:56— providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:56-71 | providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:101-116 | providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:191-206 | providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:236-251 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:47— providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:47-59 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:178-190 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:220-232 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:262-274 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/apache/hive/src/airflow/providers/apache/hive/assets/hive.py:45— providers/apache/hive/src/airflow/providers/apache/hive/assets/hive.py:45-52 | providers/mongo/src/airflow/providers/mongo/assets/mongo.py:48-55 | providers/mysql/src/airflow/providers/mysql/assets/mysql.py:48-55 | providers/teradata/src/airflow/providers/teradata/assets/teradata.py:48-55 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:662— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:662-697 | providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:972-1007 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:765-829 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1129-1146 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:136— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:136-159 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:185-209 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:235-259 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:97-113 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:347— providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:347-375 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:671-700 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:989-1017 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1282-1310 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:504— providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:504-528 | providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:592-610 | providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:797-861 | providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:969-1009 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/operators/tasks.py:307— providers/google/src/airflow/providers/google/cloud/operators/tasks.py:307-323 | providers/google/src/airflow/providers/google/cloud/operators/tasks.py:550-566 | providers/google/src/airflow/providers/google/cloud/operators/tasks.py:632-648 | providers/google/src/airflow/providers/google/cloud/operators/tasks.py:714-730 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:564— providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:564-591 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:726-749 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:759-782 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:792-815 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:234— providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:234-362 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:403-525 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:581-703 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:735-856 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (9 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:124— airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:124-132 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:469-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/xcom.py:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_events.py:148— airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_events.py:148-156 | airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_events.py:184-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/execution_api/routes/asset_events.py:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) REDACTED:379— REDACTED:379-387 | REDACTED:432-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) REDACTED:217— REDACTED:217-225 | REDACTED:319-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:331— providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:331-339 | providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/oss.py:370-378 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:368— providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:368-376 | providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:398-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/hooks/eks.py:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:616— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:616-624 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:734-742 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:616` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:319— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:319-327 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:942-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:233— providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:233-241 | providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:592-600 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:265— providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:265-273 | providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:681-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:1092— providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:1092-1100 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:1192-1200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:230— providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:230-238 | providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:427-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) shared/observability/src/airflow_shared/observability/metrics/datadog_logger.py:163— shared/observability/src/airflow_shared/observability/metrics/datadog_logger.py:163-173 | task-sdk/src/airflow/sdk/definitions/asset/__init__.py:355-363 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) airflow-core/src/airflow/migrations/versions/0034_3_0_0_remove_redundant_index.py:41— airflow-core/src/airflow/migrations/versions/0034_3_0_0_remove_redundant_index.py:41-49 | airflow-core/src/airflow/migrations/versions/0126_3_4_0_add_index_on_asset_uri.py:39-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) airflow-core/src/airflow/migrations/versions/0056_3_0_0_add_relative_fileloc_column.py:41— airflow-core/src/airflow/migrations/versions/0056_3_0_0_add_relative_fileloc_column.py:41-49 | airflow-core/src/airflow/migrations/versions/0139_3_4_0_add_source_reference_to_import_error.py:42-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) providers/common/ai/src/airflow/providers/common/ai/hooks/langchain.py:136— providers/common/ai/src/airflow/providers/common/ai/hooks/langchain.py:136-144 | providers/common/ai/src/airflow/providers/common/ai/hooks/llamaindex.py:153-161 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) airflow-core/src/airflow/partition_mappers/product.py:86— airflow-core/src/airflow/partition_mappers/product.py:86-94 | airflow-core/src/airflow/partition_mappers/temporal.py:235-244 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) go-sdk/airflow/if.go:153— go-sdk/airflow/if.go:153-161 | go-sdk/airflow/switch.go:170-178 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `go-sdk/airflow/if.go:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) REDACTED:193— REDACTED:193-201 | REDACTED:165-173 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1440— airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1440-1456 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1512-1528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1440` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:668— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:668-684 | airflow-core/src/airflow/migrations/versions/0136_3_4_0_fold_task_map_into_xcom_mapped_length.py:135-151 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:668` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) REDACTED:96— REDACTED:96-112 | task-sdk/src/airflow/sdk/definitions/connection.py:35-51 — before extracting anything, compare `REDACTED` and `task-sdk/src/airflow/sdk/definitions/connection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 2) airflow-core/src/airflow/observability/metrics/otel_logger.py:32— airflow-core/src/airflow/observability/metrics/otel_logger.py:32-48 | task-sdk/src/airflow/sdk/observability/metrics/otel_logger.py:32-48 — before extracting anything, compare `airflow-core/src/airflow/observability/metrics/otel_logger.py` and `task-sdk/src/airflow/sdk/observability/metrics/otel_logger.py` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/observability/metrics/otel_logger.py:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `SafeOtelLogger` names `airflow._shared.observability.metrics.otel_logger` in one and `airflow.sdk._shared.observability.metrics.otel_logger` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) airflow-core/src/airflow/serialization/definitions/baseoperator.py:278— airflow-core/src/airflow/serialization/definitions/baseoperator.py:278-294 | airflow-core/src/airflow/serialization/definitions/mappedoperator.py:414-430 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `TaskInstance` names `airflow.models` in one and `airflow.models.taskinstance` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:180— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:180-196 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:543-559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:679— providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:679-695 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:789-805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:679` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:858— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:858-874 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1458-1474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:2542— providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:2542-2558 | providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:2693-2709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataproc_metastore.py:700— providers/google/src/airflow/providers/google/cloud/operators/dataproc_metastore.py:700-716 | providers/google/src/airflow/providers/google/cloud/operators/dataproc_metastore.py:1017-1033 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:534— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:534-550 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1680-1696 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:534` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:555— providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:555-571 | providers/google/src/airflow/providers/google/cloud/triggers/cloud_composer.py:425-441 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:555` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 2) providers/presto/src/airflow/providers/presto/hooks/presto.py:55— providers/presto/src/airflow/providers/presto/hooks/presto.py:55-71 | providers/trino/src/airflow/providers/trino/hooks/trino.py:57-73 — before extracting anything, compare `providers/presto/src/airflow/providers/presto/hooks/presto.py` and `providers/trino/src/airflow/providers/trino/hooks/trino.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `AIRFLOW_V_3_0_PLUS` names `airflow.providers.presto.version_compat` in one and `airflow.providers.trino.version_compat` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) task-sdk/src/airflow/sdk/bases/xcom.py:633— task-sdk/src/airflow/sdk/bases/xcom.py:633-649 | task-sdk/src/airflow/sdk/bases/xcom.py:684-700 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `task-sdk/src/airflow/sdk/bases/xcom.py:633` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 2) airflow-core/src/airflow/utils/email.py:296— airflow-core/src/airflow/utils/email.py:296-312 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:295-311 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) devel-common/src/tests_common/test_utils/api_fastapi.py:51— devel-common/src/tests_common/test_utils/api_fastapi.py:51-67 | devel-common/src/tests_common/test_utils/logs.py:58-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (17 lines × 2) providers/common/ai/src/airflow/providers/common/ai/example_dags/example_llamaindex_hook.py:34— providers/common/ai/src/airflow/providers/common/ai/example_dags/example_llamaindex_hook.py:34-50 | providers/common/ai/src/airflow/providers/common/ai/example_dags/example_llamaindex_rag.py:48-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (20 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:526— airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:526-545 | airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:550-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) airflow-core/src/airflow/models/backfill.py:488— airflow-core/src/airflow/models/backfill.py:488-507 | airflow-core/src/airflow/models/backfill.py:574-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/models/backfill.py:488` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) airflow-core/src/airflow/utils/email.py:229— airflow-core/src/airflow/utils/email.py:229-248 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:230-249 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) contributing-docs/images/diagram_coordinator_execution_sequence.py:253— contributing-docs/images/diagram_coordinator_execution_sequence.py:253-272 | contributing-docs/images/diagram_task_sdk_execution_sequence.py:230-249 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_sequence.py` and `contributing-docs/images/diagram_task_sdk_execution_sequence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) dev/breeze/src/airflow_breeze/commands/developer_commands.py:468— dev/breeze/src/airflow_breeze/commands/developer_commands.py:468-487 | dev/breeze/src/airflow_breeze/commands/developer_commands.py:713-732 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/utils/transfer.py:23— providers/amazon/src/airflow/providers/amazon/aws/utils/transfer.py:23-42 | providers/google/src/airflow/providers/google/cloud/transfers/s3_to_gcs.py:213-232 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/utils/transfer.py` and `providers/google/src/airflow/providers/google/cloud/transfers/s3_to_gcs.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) REDACTED:547— REDACTED:547-566 | REDACTED:594-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:547` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:510— providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:510-529 | providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:1227-1246 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:510` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) REDACTED:179— REDACTED:179-201 | REDACTED:224-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:177` calls `execute`, `text` and `REDACTED:221` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:219— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:219-238 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:373-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:117— providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:117-136 | providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:405-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:953— providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:953-972 | providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:674-693 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `conn` to `Connection` in one and `Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (20 lines × 2) providers/standard/src/airflow/providers/standard/operators/branch.py:52— providers/standard/src/airflow/providers/standard/operators/branch.py:52-71 | task-sdk/src/airflow/sdk/bases/branch.py:51-70 — before extracting anything, compare `providers/standard/src/airflow/providers/standard/operators/branch.py` and `task-sdk/src/airflow/sdk/bases/branch.py` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) providers/standard/src/airflow/providers/standard/triggers/hitl.py:135— providers/standard/src/airflow/providers/standard/triggers/hitl.py:135-154 | providers/standard/src/airflow/providers/standard/triggers/hitl.py:216-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/standard/src/airflow/providers/standard/triggers/hitl.py:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) scripts/ci/prek/common_prek_utils.py:466— scripts/ci/prek/common_prek_utils.py:466-485 | scripts/ci/prek/common_prek_utils.py:539-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:149— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:149-168 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:128-147 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Change coupling: REDACTED ↔ ci_commands_config.py REDACTED:1— `REDACTED` and `dev/breeze/src/airflow_breeze/commands/ci_commands_config.py` change together 100% of the time (15 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `06771a97` Let the fork CI monitor gate pull requests and stop repeating Slack a…; `ce044584` Add breeze ci audit for the fork CI setup (#74823); `bad9f9c8` Add the fork CI reconciler and its scheduled monitor (#74822) — run `git show` on any of them.
Change coupling: developer_commands.py ↔ developer_commands_config.py dev/breeze/src/airflow_breeze/commands/developer_commands.py:1— `dev/breeze/src/airflow_breeze/commands/developer_commands.py` and `dev/breeze/src/airflow_breeze/commands/developer_commands_config.py` change together 89% of the time (17 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `602e150a` Allow building docs with a local sphinx_airflow_theme checkout (#75001); `8843de3e` Speed up breeze start by caching Python bytecode in a docker volume (…; `a88aaff4` Fix breeze --include-mypy-volume not mounting the mypy cache volume (… — run `git show` on any of them.
Change coupling: Connections.tsx ↔ Variables.tsx airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx:1— `airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx` and `airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0f8d6f88` UI: Keep unnamed columns out of the table columns menu (#74774); `1559dae9` UI: Use TeamName component for all team name displays (#73910); `493312b9` Show the current page name in the browser tab title (#69622) — run `git show` on any of them.
Change coupling: check_imports_in_providers.py ↔ ruff_format.py scripts/ci/prek/check_imports_in_providers.py:1— `scripts/ci/prek/check_imports_in_providers.py` and `scripts/ci/prek/ruff_format.py` change together 75% of the time (33 of the 44 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 33 shared commits counted here, the most recent 3 are `858df999` Bump ruff to 0.16.0 and pin the base lint rule set (#70725); `707e3168` [main] Upgrade important CI environment (#67860); `d53a7ad5` CI: Upgrade important CI environment (#64813) — run `git show` on any of them.
Change coupling: Events.tsx ↔ XCom.tsx airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:1— `airflow-core/src/airflow/ui/src/pages/Events/Events.tsx` and `airflow-core/src/airflow/ui/src/pages/XCom/XCom.tsx` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `493312b9` Show the current page name in the browser tab title (#69622); `3e33d2c6` Add isExpanded prop on JSON expand/collapse buttons (#66340); `d748835d` UI: Add per-searchbar 'Match anywhere' toggle for substring search (#… — run `git show` on any of them.
Change coupling: worker.py ↔ worker.py providers/edge3/src/airflow/providers/edge3/cli/worker.py:1— `providers/edge3/src/airflow/providers/edge3/cli/worker.py` and `providers/edge3/src/airflow/providers/edge3/worker_api/routes/worker.py` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `558765d1` Allow automated edge worker maintenance (#66310); `9a917eca` Relax version checks for remote Edge Workers (#66292); `80281f29` Add extended sysinfo for Edge worker (#65472) — run `git show` on any of them.
Change coupling: runtime.ts ↔ index.ts ts-sdk/src/coordinator/runtime.ts:1— `ts-sdk/src/coordinator/runtime.ts` and `ts-sdk/src/index.ts` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `8533cc40` TS SDK: add the task state store to the task client (#73618); `202fe706` TS SDK: Add triggerDagRun to native Dags (#74071); `b6538c32` TS SDK: declare task dependencies by calling tasks (#73435) — run `git show` on any of them.
Change coupling: DagRuns.tsx ↔ TaskInstances.tsx airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:1— `airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx` and `airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx` change together 60% of the time (12 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `0f8d6f88` UI: Keep unnamed columns out of the table columns menu (#74774); `e4d0382f` Restore count to Dag Run and Task Instance lists (#71252); `493312b9` Show the current page name in the browser tab title (#69622) — run `git show` on any of them.
Change coupling: AssetsList.tsx ↔ Events.tsx airflow-core/src/airflow/ui/src/pages/AssetsList/AssetsList.tsx:1— `airflow-core/src/airflow/ui/src/pages/AssetsList/AssetsList.tsx` and `airflow-core/src/airflow/ui/src/pages/Events/Events.tsx` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `493312b9` Show the current page name in the browser tab title (#69622); `3e33d2c6` Add isExpanded prop on JSON expand/collapse buttons (#66340); `d748835d` UI: Add per-searchbar 'Match anywhere' toggle for substring search (#… — run `git show` on any of them.
Change coupling: common_options.py ↔ shell_params.py dev/breeze/src/airflow_breeze/commands/common_options.py:1— `dev/breeze/src/airflow_breeze/commands/common_options.py` and `dev/breeze/src/airflow_breeze/params/shell_params.py` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `b7f03406` Move JDK installation to image-build time (#68485); `c9d7f367` Final wire up for Java SDK (#67826); `eff66653` Adds support for go worker in breeze start (#52156) — run `git show` on any of them.
Change coupling: cli_config.py ↔ team_command.py airflow-core/src/airflow/cli/cli_config.py:1— `airflow-core/src/airflow/cli/cli_config.py` and `airflow-core/src/airflow/cli/commands/team_command.py` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `6ae21331` Add dry-run mode to teams sync (#72494); `69b72e39` Multi-Team: Add teams inspect CLI command to display team resources (…; `98eaca0e` Add teams verify CLI command (#70947) — run `git show` on any of them.
Change coupling: TriggerDAGForm.tsx ↔ useTrigger.ts airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:1— `airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx` and `airflow-core/src/airflow/ui/src/queries/useTrigger.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `b7674773` Fix partition key display and input handling (#69702); `f924024a` Revert "Feat: Support URL params for pre-filling Trigger and Backfill…; `907b4ef5` Feat: Support URL params for pre-filling Trigger and Backfill forms (… — run `git show` on any of them.
Change coupling: worker.py ↔ jobs.py providers/edge3/src/airflow/providers/edge3/cli/worker.py:1— `providers/edge3/src/airflow/providers/edge3/cli/worker.py` and `providers/edge3/src/airflow/providers/edge3/worker_api/routes/jobs.py` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `855a2ce9` Isolate Edge job state by task attempt UUID (#73918); `8607e946` Fix edge executor to support handling execute callback workload (#67679); `80281f29` Add extended sysinfo for Edge worker (#65472) — run `git show` on any of them.
Change coupling: developer_commands_config.py ↔ shell_params.py dev/breeze/src/airflow_breeze/commands/developer_commands_config.py:1— `dev/breeze/src/airflow_breeze/commands/developer_commands_config.py` and `dev/breeze/src/airflow_breeze/params/shell_params.py` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `602e150a` Allow building docs with a local sphinx_airflow_theme checkout (#75001); `8843de3e` Speed up breeze start by caching Python bytecode in a docker volume (…; `b7f03406` Move JDK installation to image-build time (#68485) — run `git show` on any of them.
Duplicated block (19 lines × 2) airflow-core/src/airflow/cli/simple_table.py:105— airflow-core/src/airflow/cli/simple_table.py:105-123 | airflow-ctl/src/airflowctl/ctl/console_formatting.py:109-127 — before extracting anything, compare `airflow-core/src/airflow/cli/simple_table.py` and `airflow-ctl/src/airflowctl/ctl/console_formatting.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) airflow-core/src/airflow/migrations/versions/0023_2_10_0_dataset_alias_dataset_event.py:42— airflow-core/src/airflow/migrations/versions/0023_2_10_0_dataset_alias_dataset_event.py:42-60 | airflow-core/src/airflow/migrations/versions/0025_2_10_0_dataset_alias_dataset.py:42-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (19 lines × 2) airflow-core/src/airflow/migrations/versions/0054_3_0_0_add_asset_reference_models.py:49— airflow-core/src/airflow/migrations/versions/0054_3_0_0_add_asset_reference_models.py:49-67 | airflow-core/src/airflow/migrations/versions/0054_3_0_0_add_asset_reference_models.py:69-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) airflow-core/src/airflow/providers_manager.py:929— airflow-core/src/airflow/providers_manager.py:929-947 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:660-678 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:531— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:531-549 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:718-736 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:531` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:425— providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:425-443 | providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:914-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:132— providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:132-150 | providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:223-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_json_formatter.py:31— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_json_formatter.py:31-49 | providers/opensearch/src/airflow/providers/opensearch/log/os_json_formatter.py:31-49 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_json_formatter.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_json_formatter.py` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `AIRFLOW_V_3_3_PLUS` names `airflow.providers.elasticsearch.version_compat` in one and `airflow.providers.opensearch.version_compat` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:127— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:127-145 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:106-124 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (19 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:202— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:202-220 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:239-257 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) providers/ftp/src/airflow/providers/ftp/operators/ftp.py:168— providers/ftp/src/airflow/providers/ftp/operators/ftp.py:168-186 | providers/sftp/src/airflow/providers/sftp/operators/sftp.py:269-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:528— providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:528-546 | providers/google/src/airflow/providers/google/cloud/operators/gen_ai.py:1000-1018 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/msgraph.py:208— providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/msgraph.py:208-226 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/msgraph.py:111-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19 lines × 2) scripts/ci/prek/check_new_airflow_exception_usage.py:124— scripts/ci/prek/check_new_airflow_exception_usage.py:124-142 | scripts/ci/prek/check_sdk_imports_in_core.py:192-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_new_airflow_exception_usage.py:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:441— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:441-458 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:519-536 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:441` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) REDACTED:2039— REDACTED:2039-2056 | REDACTED:2190-2207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) dev/registry/extract_parameters.py:869— dev/registry/extract_parameters.py:869-886 | dev/registry/extract_parameters.py:906-923 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/registry/extract_parameters.py:869` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:371— providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:371-388 | providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:1340-1357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/secrets/secrets_manager.py:162— providers/amazon/src/airflow/providers/amazon/aws/secrets/secrets_manager.py:162-179 | providers/amazon/src/airflow/providers/amazon/aws/secrets/systems_manager.py:120-137 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/secrets/secrets_manager.py` and `providers/amazon/src/airflow/providers/amazon/aws/secrets/systems_manager.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:500— providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:500-517 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:539-556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:893— providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:893-910 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py:932-949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:931— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:931-948 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1530-1547 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1050— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1050-1067 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1644-1661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1050` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3711— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3711-3728 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:4022-4039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3711` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/workflows.py:580— providers/google/src/airflow/providers/google/cloud/operators/workflows.py:580-597 | providers/google/src/airflow/providers/google/cloud/operators/workflows.py:733-750 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/workflows.py:580` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 2) providers/teradata/src/airflow/providers/teradata/utils/bteq_util.py:200— providers/teradata/src/airflow/providers/teradata/utils/bteq_util.py:200-217 | providers/teradata/src/airflow/providers/teradata/utils/tpt_util.py:556-573 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) scripts/ci/prek/check_version_consistency.py:219— scripts/ci/prek/check_version_consistency.py:219-236 | scripts/ci/prek/check_version_consistency.py:239-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_version_consistency.py:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) devel-common/src/tests_common/pytest_plugin.py:304— devel-common/src/tests_common/pytest_plugin.py:304-321 | devel-common/src/tests_common/pytest_plugin.py:329-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devel-common/src/tests_common/pytest_plugin.py:304` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Low cohesion: AirflowConfigParser (LCOM4 8) airflow-core/src/airflow/configuration.py:169— AirflowConfigParser's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DynamoDBHook (LCOM4 7) providers/amazon/src/airflow/providers/amazon/aws/hooks/dynamodb.py:35— DynamoDBHook's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: FabAuthManager (LCOM4 7) providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:204— FabAuthManager's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DataSyncHook (LCOM4 5) providers/amazon/src/airflow/providers/amazon/aws/hooks/datasync.py:29— DataSyncHook's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AbstractOperator (LCOM4 5) task-sdk/src/airflow/sdk/definitions/_internal/abstractoperator.py:84— AbstractOperator's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SerializedBaseOperator (LCOM4 4) airflow-core/src/airflow/serialization/definitions/baseoperator.py:61— SerializedBaseOperator's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AthenaHook (LCOM4 4) providers/amazon/src/airflow/providers/amazon/aws/hooks/athena.py:58— AthenaHook's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SparkKubernetesOperator (LCOM4 4) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:43— SparkKubernetesOperator's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SandboxBackend (LCOM4 4) providers/common/ai/src/airflow/providers/common/ai/sandbox/base.py:293— SandboxBackend's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DataprocAsyncHook (LCOM4 4) providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py:1282— DataprocAsyncHook's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: OracleHook (LCOM4 4) providers/oracle/src/airflow/providers/oracle/hooks/oracle.py:69— OracleHook's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ObjectStoragePath (LCOM4 4) task-sdk/src/airflow/sdk/io/path.py:83— ObjectStoragePath's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×11
Untrusted text written into markup unescaped REDACTED:163— `markup` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:256— `svg` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:55— `message` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:151— `result.url` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
Untrusted text written into markup unescaped devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:153— `index` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:164— `result.meta?.title||'Untitled'` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:165— `result.url.replace(/^\/docs\//,'').replace(/\.html$/,'')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:166— `result.excerpt` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped registry/src/js/connection-builder.js:87— `renderedForms[connType]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped registry/src/js/connection-builder.js:183— `origHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped registry/src/js/search.js:145— `escapeHtml(result.url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×10
Focus outline removed in CSS without a :focus replacement registry/src/css/main.css:4410— `#search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2760— `.dropdown-toggle:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2819— `.dropdown-menu > .active > a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2838— `.open > a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:2962— `.btn-group.open .dropdown-toggle` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:3561— `.navbar-toggle:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:5324— `.modal` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:5359— `.modal-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:5793— `.carousel-control:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement devel-common/src/sphinx_exts/pagefind_search/static/css/pagefind.css:97— `.search-modal__input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Duplicated block (25 lines × 2) airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:103— airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:103-127 | airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:214-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:291— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:291-315 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:357-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:291` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:382` calls `batch_alter_table`, `create_foreign_key` and `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:317` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (25 lines × 2) airflow-core/src/airflow/plugins_manager.py:551— airflow-core/src/airflow/plugins_manager.py:551-575 | airflow-core/src/airflow/plugins_manager.py:578-602 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 2) airflow-core/src/airflow/providers_manager.py:523— airflow-core/src/airflow/providers_manager.py:523-547 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:169-193 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 2) providers/common/compat/src/airflow/providers/common/compat/_retry_policy.py:106— providers/common/compat/src/airflow/providers/common/compat/_retry_policy.py:106-130 | task-sdk/src/airflow/sdk/definitions/retry_policy.py:490-514 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 2) providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:280— providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:280-304 | providers/google/src/airflow/providers/google/cloud/openlineage/utils.py:376-400 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (25 lines × 2) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2686— providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2686-2710 | providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2739-2763 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (25 lines × 2) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:922— providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:922-946 | providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:647-671 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `conn` to `Connection` in one and `Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (25 lines × 2) providers/edge3/src/airflow/providers/edge3/migrations/env.py:58— providers/edge3/src/airflow/providers/edge3/migrations/env.py:58-82 | providers/fab/src/airflow/providers/fab/migrations/env.py:58-82 — before extracting anything, compare `providers/edge3/src/airflow/providers/edge3/migrations/env.py` and `providers/fab/src/airflow/providers/fab/migrations/env.py` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/dataset.py:442— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/dataset.py:442-466 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py:347-371 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 3) airflow-core/docs/img/diagram_task_execution_architecture.py:90— airflow-core/docs/img/diagram_task_execution_architecture.py:90-102 | contributing-docs/images/diagram_coordinator_execution_architecture.py:96-108 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:86-98 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_architecture.py` and `contributing-docs/images/diagram_task_sdk_execution_architecture.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/docs/img/diagram_task_execution_architecture.py:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) airflow-core/src/airflow/api_fastapi/core_api/datamodels/asset_state_store.py:69— airflow-core/src/airflow/api_fastapi/core_api/datamodels/asset_state_store.py:69-81 | airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_state_store.py:62-74 | airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_state_store.py:85-97 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 3) dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:408— dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:408-420 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:925-937 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:1279-1291 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:623— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:623-635 | providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:609-621 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:679-691 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1071— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1071-1083 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:509-521 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:640-652 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1071` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:107— providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:107-119 | providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:207-219 | providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:230-242 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/apache/kafka/src/airflow/providers/apache/kafka/sensors/kafka.py:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:231— providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:231-243 | providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:405-417 | providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:615-627 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:244` calls `_raise_if_environment_not_running`, `info` and `providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:628` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2550— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2550-2562 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2970-2982 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3323-3335 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2550` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/dataset.py:520— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/dataset.py:520-532 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:458-470 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:354-366 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (13 lines × 3) providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:298— providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:298-310 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:509-521 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:678-690 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 3) REDACTED:116— REDACTED:116-128 | airflow-core/src/airflow/api_fastapi/core_api/services/public/pools.py:129-141 | airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:96-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `BulkCreateAction[ConnectionBody]` in one and `BulkCreateAction[PoolBody]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 3) REDACTED:153— REDACTED:153-166 | airflow-core/src/airflow/api_fastapi/core_api/services/public/pools.py:168-179 | airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:125-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `BulkUpdateAction[ConnectionBody]` in one and `BulkUpdateAction[PoolBody]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 3) airflow-core/src/airflow/migrations/versions/0023_2_10_0_dataset_alias_dataset_event.py:47— airflow-core/src/airflow/migrations/versions/0023_2_10_0_dataset_alias_dataset_event.py:47-58 | airflow-core/src/airflow/migrations/versions/0025_2_10_0_dataset_alias_dataset.py:47-58 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:219-230 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:216` calls `Column`, `Integer` and `airflow-core/src/airflow/migrations/versions/0023_2_10_0_dataset_alias_dataset_event.py:44` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:256— providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:256-267 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:577-588 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1193-1204 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:359— providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:359-370 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:684-695 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1294-1305 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:449— providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:449-460 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:774-785 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1373-1384 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:587— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:587-598 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1781-1792 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py:486-497 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 3) scripts/ci/prek/check_version_consistency.py:79— scripts/ci/prek/check_version_consistency.py:79-90 | scripts/ci/prek/check_version_consistency.py:108-119 | scripts/ci/prek/check_version_consistency.py:126-137 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:301— providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:301-312 | providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:428-440 | providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:743-755 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/tasks.py:473— providers/google/src/airflow/providers/google/cloud/operators/tasks.py:473-484 | providers/google/src/airflow/providers/google/cloud/operators/vision.py:395-406 | providers/google/src/airflow/providers/google/cloud/operators/vision.py:775-786 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:336— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:336-341 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:357-363 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:461-466 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:376— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:376-381 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:415-420 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:441-446 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:376` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:421` calls `Column`, `UtcDateTime` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:447` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) airflow-core/src/airflow/migrations/versions/0138_3_4_0_allocate_pending_task_attempt_numbers.py:151— airflow-core/src/airflow/migrations/versions/0138_3_4_0_allocate_pending_task_attempt_numbers.py:151-156 | airflow-core/src/airflow/migrations/versions/0142_3_4_0_unify_task_attempt_ownership.py:297-302 | airflow-core/src/airflow/migrations/versions/0142_3_4_0_unify_task_attempt_ownership.py:551-556 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0138_3_4_0_allocate_pending_task_attempt_numbers.py:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) REDACTED:381— REDACTED:381-386 | REDACTED:406-411 | REDACTED:434-439 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) task-sdk/src/airflow/sdk/bases/decorator.py:638— task-sdk/src/airflow/sdk/bases/decorator.py:638-643 | task-sdk/src/airflow/sdk/definitions/decorators/task_group.py:180-185 | task-sdk/src/airflow/sdk/definitions/mappedoperator.py:208-213 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (6 lines × 3) airflow-core/src/airflow/migrations/versions/0099_3_2_0_add_exceeds_max_runs_flag_to_dag_model.py:54— airflow-core/src/airflow/migrations/versions/0099_3_2_0_add_exceeds_max_runs_flag_to_dag_model.py:54-59 | airflow-core/src/airflow/migrations/versions/0100_3_2_0_add_timetable_type_to_dag_table_for_.py:56-61 | airflow-core/src/airflow/migrations/versions/0105_3_2_0_add_allowed_run_types_to_dag.py:48-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (6 lines × 3) airflow-core/src/airflow/utils/db_manager.py:159— airflow-core/src/airflow/utils/db_manager.py:159-164 | providers/edge3/src/airflow/providers/edge3/models/db.py:82-87 | providers/fab/src/airflow/providers/fab/auth_manager/models/db.py:90-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sql.py:126— providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sql.py:126-133 | providers/amazon/src/airflow/providers/amazon/aws/transfers/sql_to_s3.py:342-347 | providers/slack/src/airflow/providers/slack/transfers/base_sql_to_slack.py:70-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:964— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:964-969 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:832-837 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1121-1126 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `response` to `ElasticSearchResponse` in one and `OpensearchResponse` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
HackComment task-sdk/src/airflow/sdk/bases/operator.py:1327— # Hack sorting double chained task lists by task_id to avoid hitting — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment providers-summary-docs/conf.py:72— # Hack to allow changing for piece of the code to behave differently while — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment docker-stack-docs/conf.py:69— # Hack to allow changing for piece of the code to behave differently while — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment devel-common/src/docs/provider_conf.py:88— # Hack to allow changing for piece of the code to behave differently while — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment chart/docs/conf.py:82— # Hack to allow changing for piece of the code to behave differently while — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment airflow-ctl/docs/conf.py:67— # Hack to allow changing for piece of the code to behave differently while — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment airflow-core/docs/conf.py:71— # Hack to allow changing for piece of the code to behave differently while — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment airflow-core/src/airflow/providers_manager.py:498— # Hacky but does the trick for now — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
Duplicated block (22 lines × 2) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:527— dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:527-548 | dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:549-570 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (22 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:408— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:408-429 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:468-489 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (22 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1027— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1027-1048 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1621-1642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1027` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1197— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1197-1218 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1758-1779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 2) REDACTED:514— REDACTED:514-535 | REDACTED:567-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 2) providers/ftp/src/airflow/providers/ftp/assets/ftp.py:31— providers/ftp/src/airflow/providers/ftp/assets/ftp.py:31-52 | providers/sftp/src/airflow/providers/sftp/assets/sftp.py:31-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (22 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:978— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:978-999 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2919-2940 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (22 lines × 2) scripts/ci/prek/check_supervisor_schemas_versions.py:80— scripts/ci/prek/check_supervisor_schemas_versions.py:80-101 | scripts/ci/prek/generate_supervisor_schemas_snapshot.py:60-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (21 lines × 2) airflow-core/src/airflow/models/deadline.py:477— airflow-core/src/airflow/models/deadline.py:477-497 | airflow-core/src/airflow/serialization/definitions/deadline.py:188-208 — before extracting anything, compare `airflow-core/src/airflow/models/deadline.py` and `airflow-core/src/airflow/serialization/definitions/deadline.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/models/deadline.py:477` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `ColumnElement` names `sqlalchemy` in one and `sqlalchemy.sql` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (21 lines × 2) airflow-core/src/airflow/partition_mappers/window.py:254— airflow-core/src/airflow/partition_mappers/window.py:254-274 | task-sdk/src/airflow/sdk/definitions/partition_mappers/window.py:125-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/partition_mappers/window.py:248` calls `to_upstream`, `_require_day_one`, `_build_directional_steps` and `task-sdk/src/airflow/sdk/definitions/partition_mappers/window.py:121` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) airflow-core/src/airflow/serialization/definitions/taskgroup.py:275— airflow-core/src/airflow/serialization/definitions/taskgroup.py:275-295 | task-sdk/src/airflow/sdk/definitions/taskgroup.py:607-627 — before extracting anything, compare `airflow-core/src/airflow/serialization/definitions/taskgroup.py` and `task-sdk/src/airflow/sdk/definitions/taskgroup.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `group_dict` to `dict[str | None, SerializedTaskGroup] | None = None` in one and `dict[str, TaskGroup] | None = None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (21 lines × 2) contributing-docs/images/diagram_coordinator_execution_sequence.py:313— contributing-docs/images/diagram_coordinator_execution_sequence.py:313-333 | contributing-docs/images/diagram_task_sdk_execution_sequence.py:289-309 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_sequence.py` and `contributing-docs/images/diagram_task_sdk_execution_sequence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:609— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:609-629 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:526-546 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:710— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:710-730 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:912-932 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:710` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:448— providers/google/src/airflow/providers/google/cloud/sensors/cloud_composer.py:448-468 | providers/standard/src/airflow/providers/standard/sensors/external_task.py:225-248 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:317— providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:317-337 | providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:387-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:317` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11–12 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:198— airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:198-209 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:245-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_state_store.py:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:124— airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:124-134 | airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:154-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `BulkUpdateAction` in one and `BulkDeleteAction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–12 lines × 2) airflow-core/src/airflow/api_fastapi/execution_api/app.py:81— airflow-core/src/airflow/api_fastapi/execution_api/app.py:81-91 | airflow-core/src/airflow/executors/base_executor.py:240-251 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11–12 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:819— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:819-830 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:832-842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–12 lines × 2) contributing-docs/images/diagram_coordinator_execution_architecture.py:262— contributing-docs/images/diagram_coordinator_execution_architecture.py:262-273 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:216-226 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_architecture.py` and `contributing-docs/images/diagram_task_sdk_execution_architecture.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `contributing-docs/images/diagram_coordinator_execution_architecture.py:262` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py:529— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py:529-539 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py:576-587 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py:576` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11–12 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py:38— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py:38-48 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:307-318 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11–12 lines × 2) providers/keycloak/src/airflow/providers/keycloak/auth_manager/routes/login.py:117— providers/keycloak/src/airflow/providers/keycloak/auth_manager/routes/login.py:117-127 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/services/token.py:60-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/keycloak/src/airflow/providers/keycloak/auth_manager/routes/login.py:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
P8 · Schema migrations· Schema created by SQLAlchemy create_all() outside the migrations · ×8
Schema created by SQLAlchemy create_all() outside the migrations providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:998— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations providers/fab/src/airflow/providers/fab/auth_manager/models/db.py:72— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:45— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:46— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py:47— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations airflow-core/src/airflow/utils/db.py:713— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations airflow-core/src/airflow/utils/db.py:738— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
Schema created by SQLAlchemy create_all() outside the migrations airflow-core/src/airflow/utils/db_manager.py:140— This repository versions its schema (Alembic), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let Alembic own the schema.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:149— REDACTED:149-182 | REDACTED:187-211 | airflow-core/src/airflow/api_fastapi/core_api/services/public/pools.py:164-190 | airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:122-149 | airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:152-174 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:365— REDACTED:365-387 | REDACTED:390-412 | REDACTED:415-440 | REDACTED:443-454 | REDACTED:457-464 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:103— providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:103-118 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:350-365 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:395-410 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:440-455 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:749-764 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:58— providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:58-71 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:108-121 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:158-171 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:208-221 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:255-268 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) providers/common/ai/src/airflow/providers/common/ai/decorators/agent.py:88— providers/common/ai/src/airflow/providers/common/ai/decorators/agent.py:88-102 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm.py:90-104 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_branch.py:89-103 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_schema_compare.py:89-103 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_sql.py:88-105 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:117— providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:117-135 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:351-372 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:845-864 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:935-954 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:1022-1040 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/transfers/mssql_to_gcs.py:124— providers/google/src/airflow/providers/google/cloud/transfers/mssql_to_gcs.py:124-138 | providers/google/src/airflow/providers/google/cloud/transfers/mysql_to_gcs.py:156-170 | providers/google/src/airflow/providers/google/cloud/transfers/oracle_to_gcs.py:137-151 | providers/google/src/airflow/providers/google/cloud/transfers/postgres_to_gcs.py:222-236 | providers/google/src/airflow/providers/google/cloud/transfers/trino_to_gcs.py:221-235 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (26 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:168— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:168-193 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:462-487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:148— providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:148-173 | providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:229-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (26 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:123— providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:123-148 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py:151-176 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py` and `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py:166— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py:166-191 | providers/opensearch/src/airflow/providers/opensearch/log/os_response.py:141-166 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_response.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (26 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py:1062— providers/google/src/airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py:1062-1087 | providers/google/src/airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py:1308-1333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26 lines × 2) providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:168— providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:168-193 | providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:343-368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26 lines × 2) REDACTED:600— REDACTED:600-625 | devel-common/src/tests_common/test_utils/compat.py:153-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:649— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:649-659 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:826-836 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:954-965 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:649` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2475— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2475-2485 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2895-2905 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3495-3505 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2475` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/translate.py:1426— providers/google/src/airflow/providers/google/cloud/operators/translate.py:1426-1436 | providers/google/src/airflow/providers/google/cloud/operators/translate.py:1534-1544 | providers/google/src/airflow/providers/google/cloud/operators/translate.py:1733-1743 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/translate.py:1426` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/dataset.py:546— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/dataset.py:546-556 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:484-494 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/model_service.py:380-390 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/dataset.py:546` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:316— providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:316-326 | providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:444-455 | providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:759-770 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) providers/asana/src/airflow/providers/asana/hooks/asana.py:50— providers/asana/src/airflow/providers/asana/hooks/asana.py:50-60 | providers/google/src/airflow/providers/google/cloud/hooks/dataprep.py:35-45 | providers/salesforce/src/airflow/providers/salesforce/hooks/salesforce.py:85-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/asana/src/airflow/providers/asana/hooks/asana.py:62` calls `get_conn` and `providers/salesforce/src/airflow/providers/salesforce/hooks/salesforce.py:97` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/compute.py:104— providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/compute.py:104-114 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/wasb.py:97-107 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/sensors/wasb.py:176-186 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 3) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:489— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:489-498 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:523-532 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:691-702 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:489` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:486` calls `batch_alter_table`, `alter_column`, `Integer` and `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:691` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:539— dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:539-548 | dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:561-570 | dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:584-593 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:539` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 3) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:790— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:790-799 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:823-832 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:846-855 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:790` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:229— providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:229-238 | providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:362-371 | providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:495-504 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py:370— providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py:370-379 | providers/snowflake/src/airflow/providers/snowflake/hooks/cortex_agent.py:163-176 | providers/snowflake/src/airflow/providers/snowflake/hooks/cortex_agent.py:245-258 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:533— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:533-542 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3183-3192 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:447-459 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 3) scripts/ci/prek/check_execution_api_versions.py:45— scripts/ci/prek/check_execution_api_versions.py:45-54 | scripts/ci/prek/check_supervisor_schemas_versions.py:67-76 | scripts/ci/prek/check_yaml_importer_schema_versions.py:62-71 — before extracting anything, compare `scripts/ci/prek/check_execution_api_versions.py` and `scripts/ci/prek/check_supervisor_schemas_versions.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/ci/prek/check_supervisor_schemas_versions.py:57` calls `Path` and `scripts/ci/prek/check_execution_api_versions.py:36` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:374— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:374-380 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:439-445 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:448-454 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:437` calls `Column`, `Text`, `UtcDateTime` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:373` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:76— providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:76-82 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:101-107 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:83-89 — before extracting anything, compare `providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py` and `providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `os.PathLike | str` in one and `str | os.PathLike` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1092— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1092-1098 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1276-1282 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1679-1685 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:669— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:669-677 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:969-976 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1262-1268 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:256— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:256-262 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:933-939 | providers/amazon/src/airflow/providers/amazon/aws/operators/step_function.py:147-153 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) providers/apache/flink/src/airflow/providers/apache/flink/operators/flink_kubernetes.py:90— providers/apache/flink/src/airflow/providers/apache/flink/operators/flink_kubernetes.py:90-96 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:174-180 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:653-659 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) devel-common/src/tests_common/test_utils/azure_system_helpers.py:58— devel-common/src/tests_common/test_utils/azure_system_helpers.py:58-64 | devel-common/src/tests_common/test_utils/azure_system_helpers.py:87-93 | devel-common/src/tests_common/test_utils/sftp_system_helpers.py:45-51 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `devel-common/src/tests_common/test_utils/azure_system_helpers.py:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `devel-common/src/tests_common/test_utils/sftp_system_helpers.py:44` calls `get` and `devel-common/src/tests_common/test_utils/azure_system_helpers.py:57` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts:27— airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts:27 imports elkjs/lib/elk-worker.min.js?raw, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:22— airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:22 imports react-syntax-highlighter/dist/esm/languages/prism/bash, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:23— airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:23 imports react-syntax-highlighter/dist/esm/languages/prism/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:24— airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:24 imports react-syntax-highlighter/dist/esm/languages/prism/python, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:25— airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:25 imports react-syntax-highlighter/dist/esm/languages/prism/sql, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:26— airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:26 imports react-syntax-highlighter/dist/esm/languages/prism/yaml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:37— airflow-core/src/airflow/ui/src/utils/syntaxHighlighter.ts:37 imports react-syntax-highlighter/dist/esm/styles/prism, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Swallowed exception (empty catch) registry/src/js/connection-builder.js:178— `.then(…, function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) registry/src/js/provider-detail.js:123— `.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) registry/src/js/search.js:39— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) providers/neo4j/src/airflow/providers/neo4j/sensors/neo4j.py:89— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) devel-common/src/sphinx_exts/removemarktransform.py:65— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:160— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) airflow-core/src/airflow/utils/log/file_task_handler.py:972— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
FixmeComment task-sdk/src/airflow/sdk/serde/__init__.py:272— # fixme: unfortunately using asdict with nested dataclasses it looses information — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment scripts/ci/analyze_e2e_flaky_tests.py:402— # Fixme tests section — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment providers/standard/tests/unit/standard/operators/test_python.py:2322— # FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment airflow-core/src/airflow/serialization/serialized_objects.py:612— # FIXME: casts set to list in customized serialization in future. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment airflow-core/src/airflow/serialization/serialized_objects.py:624— # FIXME: casts tuple to list in customized serialization in future. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment airflow-core/src/airflow/dag_processing/collection.py:839— # FIXME: STORE NEW REFERENCES. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (27 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:490— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:490-516 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:524-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:490` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) airflow-core/src/airflow/serialization/definitions/dag.py:316— airflow-core/src/airflow/serialization/definitions/dag.py:316-342 | task-sdk/src/airflow/sdk/definitions/dag.py:960-986 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (27 lines × 2) airflow-core/src/airflow/utils/helpers.py:204— airflow-core/src/airflow/utils/helpers.py:204-230 | task-sdk/src/airflow/sdk/definitions/context.py:178-204 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (27 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:651— providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:651-677 | providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:745-771 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/rds.py:651` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (27 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:619— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:619-645 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:194-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:193` calls `cast` and `providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:617` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (27 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/dataplex.py:86— providers/google/src/airflow/providers/google/cloud/triggers/dataplex.py:86-112 | providers/google/src/airflow/providers/google/cloud/triggers/dataplex.py:174-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:485— providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:485-498 | providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:536-548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:485` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2605— providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2605-2618 | providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_gcs.py:245-257 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–14 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:190— providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:190-202 | providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:234-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_composer.py:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13–14 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:789— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:789-801 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1384-1397 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/base_azure.py:129— providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/base_azure.py:129-141 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_instance.py:83-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/base_azure.py:128` calls `ValueError` and `providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_instance.py:81` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–14 lines × 2) scripts/ci/prek/check_execution_api_versions.py:149— scripts/ci/prek/check_execution_api_versions.py:149-162 | scripts/ci/prek/check_supervisor_schemas_versions.py:188-200 — before extracting anything, compare `scripts/ci/prek/check_execution_api_versions.py` and `scripts/ci/prek/check_supervisor_schemas_versions.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_execution_api_versions.py:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) airflow-core/src/airflow/utils/db_manager.py:148— airflow-core/src/airflow/utils/db_manager.py:148-156 | providers/edge3/src/airflow/providers/edge3/models/db.py:70-78 | providers/fab/src/airflow/providers/fab/auth_manager/models/db.py:78-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:260— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:260-268 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:176-184 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:443-451 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (9 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:120— providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:120-129 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:354-362 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:1026-1034 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2322— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2322-2330 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2742-2750 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3162-3170 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:541— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:541-549 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1687-1695 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1701-1709 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:541` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:653— providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:653-661 | providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:664-672 | providers/google/src/airflow/providers/google/cloud/hooks/gdm.py:36-44 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Sync-over-async blocking airflow-core/src/airflow/ui/tests/e2e/global-setup.ts:49— `fs.existsSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking airflow-core/src/airflow/ui/tests/e2e/global-setup.ts:50— `fs.mkdirSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking ts-sdk/src/cli/pack.ts:351— `realpathSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking ts-sdk/src/cli/pack.ts:362— `readFileSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking ts-sdk/src/cli/pack.ts:364— `writeFileSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking ts-sdk/src/cli/pack.ts:366— `rmSync` in `runPack` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
AC2 · Forms & labels· <Textarea> field component without a label · ×5
<Textarea> field component without a label airflow-core/src/airflow/ui/src/components/MarkdownModal.tsx:115— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/components/ChatPage.tsx:290— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/BulkWorkerOperations.tsx:169— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEditCommentButton.tsx:80— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEnterButton.tsx:76— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
Duplicated block (24 lines × 2) airflow-core/src/airflow/providers_manager.py:89— airflow-core/src/airflow/providers_manager.py:89-112 | shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py:219-242 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (24 lines × 2) airflow-core/src/airflow/utils/email.py:252— airflow-core/src/airflow/utils/email.py:252-275 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:251-274 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (24 lines × 2) contributing-docs/images/diagram_coordinator_execution_sequence.py:229— contributing-docs/images/diagram_coordinator_execution_sequence.py:229-252 | contributing-docs/images/diagram_task_sdk_execution_sequence.py:206-229 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_sequence.py` and `contributing-docs/images/diagram_task_sdk_execution_sequence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (24 lines × 2) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:310— dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:310-333 | devel-common/src/sphinx_exts/providers_commits.py:84-107 — before extracting anything, compare `dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py` and `devel-common/src/sphinx_exts/providers_commits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (24 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:201— providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:201-224 | providers/amazon/src/airflow/providers/amazon/aws/triggers/quicksight.py:56-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (18–19 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:340— airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:340-358 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:406-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py:340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:587— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:587-605 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:622-639 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:587` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:737— providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:737-755 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:890-907 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:737` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:655— providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:655-673 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:766-783 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:655` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1233— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1233-1251 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1780-1797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17–18 lines × 2) contributing-docs/images/diagram_coordinator_execution_architecture.py:128— contributing-docs/images/diagram_coordinator_execution_architecture.py:128-145 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:150-166 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_architecture.py` and `contributing-docs/images/diagram_task_sdk_execution_architecture.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `contributing-docs/images/diagram_coordinator_execution_architecture.py:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–18 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:143— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:143-159 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:267-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:264` calls `info` and `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune.py:141` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:847— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:847-864 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1017-1033 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–18 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2458— providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2458-2475 | providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:472-488 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `Any` in one and `Context` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17–18 lines × 2) task-sdk/src/airflow/sdk/api/client.py:420— task-sdk/src/airflow/sdk/api/client.py:420-437 | task-sdk/src/airflow/sdk/api/client.py:475-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) airflow-core/src/airflow/models/deadline.py:514— airflow-core/src/airflow/models/deadline.py:514-528 | airflow-core/src/airflow/serialization/definitions/deadline.py:227-242 — before extracting anything, compare `airflow-core/src/airflow/models/deadline.py` and `airflow-core/src/airflow/serialization/definitions/deadline.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/models/deadline.py:514` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–16 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:173— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:173-188 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:756-770 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:467— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:467-481 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:636-651 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1619— providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1619-1633 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1702-1717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1619` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–16 lines × 2) providers/snowflake/src/airflow/providers/snowflake/hooks/cortex_agent.py:164— providers/snowflake/src/airflow/providers/snowflake/hooks/cortex_agent.py:164-178 | providers/snowflake/src/airflow/providers/snowflake/hooks/cortex_agent.py:243-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–15 lines × 2) dev/breeze/src/airflow_breeze/commands/registry_commands.py:333— dev/breeze/src/airflow_breeze/commands/registry_commands.py:333-347 | dev/breeze/src/airflow_breeze/commands/registry_commands.py:351-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:227— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:227-240 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:288-302 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–15 lines × 2) REDACTED:344— REDACTED:344-358 | REDACTED:1086-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–15 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:374— providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:374-388 | providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:507-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/sensors/dataflow.py:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–15 lines × 2) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:516— providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:516-530 | providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:607-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:516` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 3) airflow-core/src/airflow/api_fastapi/core_api/security.py:766— airflow-core/src/airflow/api_fastapi/core_api/security.py:766-779 | airflow-core/src/airflow/api_fastapi/core_api/security.py:880-893 | airflow-core/src/airflow/api_fastapi/core_api/security.py:1029-1042 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/security.py:766` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:52— airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:52-65 | airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:105-118 | airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:216-229 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0027_2_10_3_fix_dag_schedule_dataset_alias_reference_naming.py:119` calls `execute`, `drop_table`, `rename_table` and `airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:66` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:50— providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:50-63 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:96-109 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:378-391 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2653— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2653-2666 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3073-3086 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3426-3439 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:2653` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) providers/microsoft/azure/src/airflow/providers/microsoft/azure/secrets/key_vault.py:152— providers/microsoft/azure/src/airflow/providers/microsoft/azure/secrets/key_vault.py:152-165 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/secrets/key_vault.py:168-182 | providers/yandex/src/airflow/providers/yandex/secrets/lockbox.py:172-186 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–14 lines × 2) dev/breeze/src/airflow_breeze/commands/release_command.py:255— dev/breeze/src/airflow_breeze/commands/release_command.py:255-266 | dev/breeze/src/airflow_breeze/commands/release_command.py:278-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–14 lines × 2) providers/apache/flink/src/airflow/providers/apache/flink/sensors/flink_kubernetes.py:127— providers/apache/flink/src/airflow/providers/apache/flink/sensors/flink_kubernetes.py:127-138 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/sensors/spark_kubernetes.py:121-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `Context` names `airflow.providers.common.compat.sdk` in one and `airflow.sdk` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–14 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3340— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3340-3351 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:628-641 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–14 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1831— providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1831-1844 | providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2238-2249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1831` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12–14 lines × 2) providers/keycloak/src/airflow/providers/keycloak/auth_manager/services/token.py:56— providers/keycloak/src/airflow/providers/keycloak/auth_manager/services/token.py:56-67 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/services/token.py:191-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/keycloak/src/airflow/providers/keycloak/auth_manager/services/token.py:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC3 · Page structure· Page without a main landmark · ×4
Page without a main landmark devel-common/src/sphinx_exts/docs_build/dev_index_template.html.jinja2:20— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark providers/fab/src/airflow/providers/fab/www/templates/airflow/error.html:21— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark providers/fab/src/airflow/providers/fab/www/templates/airflow/traceback.html:21— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark registry/src/provider-detail.njk:10— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Duplicated block (30 lines × 2) airflow-core/src/airflow/plugins_manager.py:109— airflow-core/src/airflow/plugins_manager.py:109-138 | task-sdk/src/airflow/sdk/plugins_manager.py:76-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/plugins_manager.py:139` calls `get_mandatory_value` and `task-sdk/src/airflow/sdk/plugins_manager.py:106` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (30 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:710— providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:710-739 | providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:1367-1398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (30 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:797— providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:797-826 | providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:1422-1452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (30 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:884— providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:884-913 | providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:1524-1556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:453— providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:453-465 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:551-562 — `providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py` and `providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 6 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (12–13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1017— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1017-1028 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:954-966 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1017` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:594— providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:594-606 | providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:695-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) devel-common/src/tests_common/pytest_plugin.py:2318— devel-common/src/tests_common/pytest_plugin.py:2318-2329 | devel-common/src/tests_common/pytest_plugin.py:2351-2363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–13 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:587— providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:587-599 | providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:669-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–13 lines × 2) providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:328— providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:328-340 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:285-295 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py` and `providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–13 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/gcs.py:719— providers/google/src/airflow/providers/google/cloud/operators/gcs.py:719-729 | providers/google/src/airflow/providers/google/cloud/operators/gcs.py:1045-1057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/gcs.py:1045` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) scripts/ci/prek/check_http_exception_import_from_fastapi.py:89— scripts/ci/prek/check_http_exception_import_from_fastapi.py:89-99 | scripts/ci/prek/check_test_only_imports_in_src.py:95-107 — before extracting anything, compare `scripts/ci/prek/check_http_exception_import_from_fastapi.py` and `scripts/ci/prek/check_test_only_imports_in_src.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–12 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:505— airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:505-514 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:835-846 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:835` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py:504` calls `validate_context` and `airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:835` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–12 lines × 2) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1072— providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1072-1083 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:936-945 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: `Context` names `airflow.providers.common.compat.sdk` in one and `airflow.sdk` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10–12 lines × 2) providers/standard/src/airflow/providers/standard/operators/python.py:1116— providers/standard/src/airflow/providers/standard/operators/python.py:1116-1125 | providers/standard/src/airflow/providers/standard/operators/python.py:1161-1172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–12 lines × 2) scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:356— scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:356-365 | scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:369-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–11 lines × 2) REDACTED:363— REDACTED:363-373 | task-sdk/src/airflow/sdk/definitions/connection.py:198-206 — before extracting anything, compare `REDACTED` and `task-sdk/src/airflow/sdk/definitions/connection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–11 lines × 2) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:117— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:117-125 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:162-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–11 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py:473— providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py:473-483 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py:524-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py:473` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py:522` calls `info`, `_get_build_id_from_operation` and `providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py:473` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–11 lines × 2) providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:134— providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:134-144 | providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:312-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Off the main sequence: apache-airflow-mypy — apache-airflow-mypy: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: airflow-java-sdk:sdk — airflow-java-sdk:sdk: abstractness 0.14, instability 0.00, distance 0.86 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: apache-airflow — apache-airflow: abstractness 0.14, instability 0.02, distance 0.84 — zone of pain — concrete and depended on by 110 project(s), so it's rigid to change.
Off the main sequence: apache-airflow-providers-http — apache-airflow-providers-http: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
X19 · Unrestored process-global state· Process-global state is restored only on the happy path · ×4
Process-global state is restored only on the happy path task-sdk/src/airflow/sdk/definitions/_internal/dag_parsing_context.py:26— `_airflow_parsing_context_manager` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `_AIRFLOW_PARSING_CONTEXT_DAG_ID` environment variable (set at line 30, put back at line 37) and the `_AIRFLOW_PARSING_CONTEXT_TASK_ID` environment variable (set at line 32, put back at line 35) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between — including one raised in the caller's `with` block, which a `@contextmanager` generator receives AT its `yield`, so the code after the `yield` never runs: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
Process-global state is restored only on the happy path dev/breeze/src/airflow_breeze/commands/release_command.py:163— `copy_artifacts_to_svn` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 187, put back at line 207) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
Process-global state is restored only on the happy path dev/breeze/src/airflow_breeze/commands/release_command.py:210— `commit_release` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 218, put back at line 223) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
Process-global state is restored only on the happy path dev/breeze/src/airflow_breeze/commands/release_command.py:226— `remove_old_release` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 239, put back at line 297) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (6 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:590— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:590-620 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3108-3147 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3287-3318 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3330-3351 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:504-530 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:620-641 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:201— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:201-263 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:318-361 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:432-490 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:544-614 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1007-1078 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1477-1548 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:544— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:544-614 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:617-684 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1007-1078 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1081-1149 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1477-1548 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1551-1619 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Duplicated block (39 lines × 2) contributing-docs/images/diagram_coordinator_execution_architecture.py:97— contributing-docs/images/diagram_coordinator_execution_architecture.py:97-135 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:87-125 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_architecture.py` and `contributing-docs/images/diagram_task_sdk_execution_architecture.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `contributing-docs/images/diagram_coordinator_execution_architecture.py:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39 lines × 2) providers/google/src/airflow/providers/google/cloud/sensors/dataplex.py:198— providers/google/src/airflow/providers/google/cloud/sensors/dataplex.py:198-236 | providers/google/src/airflow/providers/google/cloud/sensors/dataplex.py:311-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (39 lines × 2) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:1210— providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:1210-1248 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:1262-1300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:1210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (36 lines × 2) airflow-core/src/airflow/providers_manager.py:1159— airflow-core/src/airflow/providers_manager.py:1159-1194 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:520-555 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (36 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:662— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:662-697 | providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:972-1007 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (36 lines × 2) REDACTED:223— REDACTED:223-258 | REDACTED:195-230 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) airflow-core/src/airflow/providers_manager.py:1294— airflow-core/src/airflow/providers_manager.py:1294-1316 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:628-650 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:101— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:101-123 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:80-102 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/cloud_monitoring.py:265— providers/google/src/airflow/providers/google/cloud/hooks/cloud_monitoring.py:265-287 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_monitoring.py:533-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 3) REDACTED:2411— REDACTED:2411-2426 | REDACTED:2561-2576 | providers/hashicorp/src/airflow/providers/hashicorp/secrets/vault.py:179-194 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2411` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:443— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:443-458 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:716-731 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:918-933 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:443` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3716— providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3716-3731 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:4027-4042 | providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:4230-4245 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:3716` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14–15 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:781— providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:781-795 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:1008-1022 | providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:1118-1131 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py:781` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:230— providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:230-244 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:797-810 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:71-84 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:121— providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:121-135 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:850-864 | providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:941-954 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/cloud_build.py:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 4) dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:412— dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:412-423 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:929-940 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:1283-1294 | dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:1594-1605 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:412` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:504— providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:504-515 | providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:592-603 | providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:797-808 | providers/google/src/airflow/providers/google/cloud/operators/datafusion.py:969-980 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 4) providers/google/src/airflow/providers/google/cloud/operators/tasks.py:312— providers/google/src/airflow/providers/google/cloud/operators/tasks.py:312-323 | providers/google/src/airflow/providers/google/cloud/operators/tasks.py:555-566 | providers/google/src/airflow/providers/google/cloud/operators/tasks.py:637-648 | providers/google/src/airflow/providers/google/cloud/operators/tasks.py:719-730 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/tasks.py:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10–12 lines × 3) dev/breeze/src/airflow_breeze/commands/developer_commands.py:939— dev/breeze/src/airflow_breeze/commands/developer_commands.py:939-948 | REDACTED:1347-1357 | REDACTED:2150-2161 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 3) providers/jdbc/src/airflow/providers/jdbc/hooks/jdbc.py:252— providers/jdbc/src/airflow/providers/jdbc/hooks/jdbc.py:252-261 | providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:399-408 | providers/trino/src/airflow/providers/trino/hooks/trino.py:432-443 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–12 lines × 3) scripts/ci/prek/check_shared_distributions_usage.py:513— scripts/ci/prek/check_shared_distributions_usage.py:513-522 | scripts/ci/prek/check_shared_distributions_usage.py:536-547 | scripts/ci/prek/check_shared_distributions_usage.py:553-562 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) airflow-core/src/airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py:72— airflow-core/src/airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py:72-80 | airflow-core/src/airflow/migrations/versions/0053_3_0_0_remove_processor_subdir.py:41-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:1006— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:1006-1014 | dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:1077-1086 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:1006` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1819— providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1819-1828 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:481-489 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7–9 lines × 2) dev/airflow_perf/dags/elastic_dag.py:110— dev/airflow_perf/dags/elastic_dag.py:110-118 | performance/src/performance_dags/performance_dag/performance_dag.py:169-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7–9 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/compute.py:82— providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/compute.py:82-88 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/container_instance.py:101-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/compute.py:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–9 lines × 2) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:555— providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:555-561 | providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:596-604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 4) REDACTED:365— REDACTED:365-372 | REDACTED:390-397 | REDACTED:443-450 | REDACTED:457-464 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 4) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:98— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:98-105 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:66-73 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:104-111 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:72-79 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 4) providers/google/src/airflow/providers/google/cloud/hooks/cloud_batch.py:70— providers/google/src/airflow/providers/google/cloud/hooks/cloud_batch.py:70-81 | providers/google/src/airflow/providers/google/cloud/hooks/kubernetes_engine.py:139-146 | providers/google/src/airflow/providers/google/cloud/hooks/tasks.py:72-83 | providers/google/src/airflow/providers/google/cloud/hooks/translate.py:182-193 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 5) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:62— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:62-68 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:70-76 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:88-94 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:96-102 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:127-133 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:85` calls `Column`, `DateTime` and `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:59` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 5) providers/google/src/airflow/providers/google/cloud/transfers/mssql_to_gcs.py:124— providers/google/src/airflow/providers/google/cloud/transfers/mssql_to_gcs.py:124-130 | providers/google/src/airflow/providers/google/cloud/transfers/mysql_to_gcs.py:156-162 | providers/google/src/airflow/providers/google/cloud/transfers/oracle_to_gcs.py:137-143 | providers/google/src/airflow/providers/google/cloud/transfers/postgres_to_gcs.py:222-228 | providers/google/src/airflow/providers/google/cloud/transfers/trino_to_gcs.py:221-227 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/transfers/mssql_to_gcs.py:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 5) REDACTED:923— REDACTED:923-929 | REDACTED:1418-1424 | REDACTED:1705-1711 | REDACTED:1888-1894 | providers/databricks/src/airflow/providers/databricks/sensors/databricks.py:103-109 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 4) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:54— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:54-59 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:71-76 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:78-83 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:104-109 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:80— providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:80-85 | providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:78-83 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:103-108 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:85-90 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py` and `providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `os.PathLike | str` in one and `str | os.PathLike` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 4) providers/presto/src/airflow/providers/presto/hooks/presto.py:208— providers/presto/src/airflow/providers/presto/hooks/presto.py:208-213 | providers/presto/src/airflow/providers/presto/hooks/presto.py:218-223 | providers/trino/src/airflow/providers/trino/hooks/trino.py:241-246 | providers/trino/src/airflow/providers/trino/hooks/trino.py:251-256 — before extracting anything, compare `providers/presto/src/airflow/providers/presto/hooks/presto.py` and `providers/trino/src/airflow/providers/trino/hooks/trino.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `DatabaseError` names `prestodb.exceptions` in one and `trino.exceptions` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
AC2 · Forms & labels· <Select> field component without a label · ×2
<Select> field component without a label airflow-core/src/airflow/ui/src/components/SearchSelect.tsx:100— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label airflow-core/src/airflow/ui/src/layouts/Nav/TimezoneSelector.tsx:71— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×2
Modal dialog does not manage focus devel-common/src/sphinx_exts/pagefind_search/templates/search-modal.html:24— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus registry/src/_includes/base.njk:137— This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
serde.serialize (cyclomatic 18) task-sdk/src/airflow/sdk/serde/__init__.py:178— serde.serialize has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (serde.serialize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
serde.serialize (cyclomatic 18) task-sdk/src/airflow/sdk/serde/__init__.py:181— serde.serialize has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (serde.serialize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Repeated repair: airflow-core/src/airflow/serialization/definitions/taskgroup.py airflow-core/src/airflow/serialization/definitions/taskgroup.py:297— airflow-core/src/airflow/serialization/definitions/taskgroup.py changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is SerializedTaskGroup._sweep_projection at line 297), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix Grid and Graph 500 errors for cyclic TaskGroup dependencies (#73724)”; “Fix hierarchical_alphabetical sort order breaking the graph and grid (#72137)”; “Fix grid/graph view topological sort for group-level and cross-group dependencies (#69933)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- airflow-core/src/airflow/serialization/definitions/taskgroup.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:380— providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is DataprocSubmitJobDirectTrigger.run at line 380), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix Dataproc triggers swallowing task cancellation (#74192)”; “Fix duplicate Dataproc job submission after a triggerer restart (#72685)”; “Fix unformatted Google trigger error messages (#72697)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-27..2026-10-25, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-27 17:45:33 +01:00' --until='2026-10-25 17:45:33 +01:00' --full-history --no-merges -- providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
exports (cognitive 22) registry/src/_data/providerVersions.js:55— exports has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
exports (cognitive 22) registry/src/_data/statsData.js:24— exports has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, ternaries 4, if/else 2 (3 pts), loops 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 96, 38, 71, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
serde.serialize (cognitive 21) task-sdk/src/airflow/sdk/serde/__init__.py:178— serde.serialize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (serde.serialize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
serde.serialize (cognitive 21) task-sdk/src/airflow/sdk/serde/__init__.py:181— serde.serialize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (serde.serialize) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Connection.get_hook (cognitive 18) REDACTED:413— Connection.get_hook has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.get_hook (cognitive 18) task-sdk/src/airflow/sdk/definitions/connection.py:232— Connection.get_hook has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SkipMixin.skip_all_except (cognitive 17) providers/standard/src/airflow/providers/standard/utils/skipmixin.py:105— SkipMixin.skip_all_except has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SkipMixin.skip_all_except (cognitive 17) task-sdk/src/airflow/sdk/bases/skipmixin.py:84— SkipMixin.skip_all_except has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassTooLong: AirflowProcessor java-sdk/processor/src/main/kotlin/org/apache/airflow/sdk/AirflowProcessor.kt:110— ClassTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 198 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Dag ts-sdk/src/sdk/dag.ts:679— ClassTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 106 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: AirflowSdkPlugin.apply java-sdk/plugin/src/main/kotlin/org/apache/airflow/sdk/plugin/AirflowSdkPlugin.kt:128— MethodTooLong — apply runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DagRef.addTask go-sdk/airflow/dag.go:243— MethodTooLong — addTask runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (8 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:31— providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:31-38 | providers/mongo/src/airflow/providers/mongo/assets/mongo.py:31-38 | providers/mysql/src/airflow/providers/mysql/assets/mysql.py:31-38 | providers/oracle/src/airflow/providers/oracle/assets/oracle.py:31-38 | providers/presto/src/airflow/providers/presto/assets/presto.py:31-38 | providers/teradata/src/airflow/providers/teradata/assets/teradata.py:31-38 | providers/trino/src/airflow/providers/trino/assets/trino.py:31-38 | providers/vertica/src/airflow/providers/vertica/assets/vertica.py:31-38 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:48— providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:48-55 | providers/databricks/src/airflow/providers/databricks/assets/databricks.py:83-90 | providers/oracle/src/airflow/providers/oracle/assets/oracle.py:54-63 | providers/postgres/src/airflow/providers/postgres/assets/postgres.py:51-58 | providers/presto/src/airflow/providers/presto/assets/presto.py:48-55 | providers/snowflake/src/airflow/providers/snowflake/assets/snowflake.py:43-50 | providers/trino/src/airflow/providers/trino/assets/trino.py:48-55 | providers/vertica/src/airflow/providers/vertica/assets/vertica.py:48-55 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (46 lines × 2) airflow-core/src/airflow/providers_manager.py:696— airflow-core/src/airflow/providers_manager.py:696-741 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:258-303 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (46 lines × 2) providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:160— providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:160-205 | providers/snowflake/src/airflow/providers/snowflake/utils/openlineage.py:201-246 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `hook` to `DatabricksSqlHook | DatabricksHook` in one and `SnowflakeHook | SnowflakeSqlApiHook` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–38 lines × 2) airflow-core/src/airflow/serialization/definitions/taskgroup.py:236— airflow-core/src/airflow/serialization/definitions/taskgroup.py:236-265 | task-sdk/src/airflow/sdk/definitions/taskgroup.py:552-589 — before extracting anything, compare `airflow-core/src/airflow/serialization/definitions/taskgroup.py` and `task-sdk/src/airflow/sdk/definitions/taskgroup.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `group_dict` to `dict[str | None, SerializedTaskGroup] | None = None` in one and `dict[str, TaskGroup] | None = None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–38 lines × 2) providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:712— providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:712-749 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1081-1110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `ti` to `TaskInstance` in one and `RuntimeTI` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (37 lines × 2) airflow-core/src/airflow/observability/metrics/statsd_logger.py:34— airflow-core/src/airflow/observability/metrics/statsd_logger.py:34-70 | task-sdk/src/airflow/sdk/observability/metrics/statsd_logger.py:34-70 — before extracting anything, compare `airflow-core/src/airflow/observability/metrics/statsd_logger.py` and `task-sdk/src/airflow/sdk/observability/metrics/statsd_logger.py` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `AirflowConfigException` names `airflow._shared.configuration` in one and `airflow.sdk._shared.configuration` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (37 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/ses.py:74— providers/amazon/src/airflow/providers/amazon/aws/hooks/ses.py:74-110 | providers/amazon/src/airflow/providers/amazon/aws/hooks/ses.py:131-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32–35 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:369— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:369-403 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:441-472 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:369` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (32–35 lines × 2) providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:485— providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:485-516 | providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:543-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:485` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (33 lines × 2) airflow-core/src/airflow/providers_manager.py:1059— airflow-core/src/airflow/providers_manager.py:1059-1091 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:488-520 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/providers_manager.py:1059` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (33 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/gen_ai.py:124— providers/google/src/airflow/providers/google/cloud/triggers/gen_ai.py:124-156 | providers/google/src/airflow/providers/google/cloud/triggers/gen_ai.py:252-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/triggers/gen_ai.py:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32–33 lines × 2) providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:470— providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:470-502 | providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:668-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (32–33 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/utils/sql.py:41— providers/elasticsearch/src/airflow/providers/elasticsearch/utils/sql.py:41-72 | providers/elasticsearch/src/airflow/providers/elasticsearch/utils/sql.py:118-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/elasticsearch/src/airflow/providers/elasticsearch/utils/sql.py:74` calls `list`, `get` and `providers/elasticsearch/src/airflow/providers/elasticsearch/utils/sql.py:152` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (32 lines × 2) dev/breeze/src/airflow_breeze/commands/testing_commands.py:1093— dev/breeze/src/airflow_breeze/commands/testing_commands.py:1093-1124 | dev/breeze/src/airflow_breeze/commands/testing_commands.py:1177-1208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/testing_commands.py:1093` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (32 lines × 2) devel-common/src/sphinx_exts/sphinx_script_update.py:66— devel-common/src/sphinx_exts/sphinx_script_update.py:66-97 | scripts/ci/prek/lint_json_schema.py:69-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29 lines × 2) airflow-core/src/airflow/serialization/definitions/dag.py:386— airflow-core/src/airflow/serialization/definitions/dag.py:386-414 | task-sdk/src/airflow/sdk/definitions/dag.py:1030-1058 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/serialization/definitions/dag.py:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `task-sdk/src/airflow/sdk/definitions/dag.py:1029` calls `discard` and `airflow-core/src/airflow/serialization/definitions/dag.py:385` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (29 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2024— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2024-2052 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2795-2823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2024` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) airflow-core/src/airflow/serialization/definitions/dag.py:359— airflow-core/src/airflow/serialization/definitions/dag.py:359-386 | task-sdk/src/airflow/sdk/definitions/dag.py:1001-1028 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `task-sdk/src/airflow/sdk/definitions/dag.py:1029` calls `discard` and `airflow-core/src/airflow/serialization/definitions/dag.py:387` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (28 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:483— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:483-510 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:560-587 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 3) airflow-core/src/airflow/migrations/env.py:108— airflow-core/src/airflow/migrations/env.py:108-132 | providers/edge3/src/airflow/providers/edge3/migrations/env.py:86-110 | providers/fab/src/airflow/providers/fab/migrations/env.py:86-110 — before extracting anything, compare `providers/edge3/src/airflow/providers/edge3/migrations/env.py` and `providers/fab/src/airflow/providers/fab/migrations/env.py` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/env.py:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/triggers/rds.py:68— providers/amazon/src/airflow/providers/amazon/aws/triggers/rds.py:68-92 | providers/amazon/src/airflow/providers/amazon/aws/triggers/rds.py:128-152 | providers/amazon/src/airflow/providers/amazon/aws/triggers/rds.py:188-212 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (24 lines × 3) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:306— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:306-329 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:563-586 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:667-690 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:80— providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:80-103 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:103-126 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:85-108 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py` and `providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `os.PathLike | str` in one and `str | os.PathLike` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (23 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py:254— providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py:254-276 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py:413-439 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py:617-643 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (23 lines × 3) providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:599— providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:599-621 | providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:724-746 | providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py:851-873 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21–22 lines × 2) airflow-core/src/airflow/state/metastore.py:269— airflow-core/src/airflow/state/metastore.py:269-289 | airflow-core/src/airflow/state/metastore.py:496-517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/state/metastore.py:269` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 2) providers/ftp/src/airflow/providers/ftp/operators/ftp.py:143— providers/ftp/src/airflow/providers/ftp/operators/ftp.py:143-164 | providers/sftp/src/airflow/providers/sftp/operators/sftp.py:230-250 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (20–21 lines × 2) dev/breeze/src/airflow_breeze/commands/developer_commands.py:446— dev/breeze/src/airflow_breeze/commands/developer_commands.py:446-466 | dev/breeze/src/airflow_breeze/commands/developer_commands.py:693-712 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/developer_commands.py:446` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 2) providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:209— providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:209-228 | providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:401-421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19–20 lines × 2) airflow-core/docs/img/diagram_auth_manager_airflow_architecture.py:47— airflow-core/docs/img/diagram_auth_manager_airflow_architecture.py:47-66 | providers/fab/docs/img/diagram_fab_auth_manager_airflow_architecture.py:35-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19–20 lines × 2) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_sftp.py:151— providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_sftp.py:151-170 | providers/samba/src/airflow/providers/samba/transfers/gcs_to_samba.py:146-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_sftp.py:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/samba/src/airflow/providers/samba/transfers/gcs_to_samba.py:144` calls `SambaHook` and `providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_sftp.py:151` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–20 lines × 2) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:808— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:808-827 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:938-954 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17–20 lines × 2) providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:809— providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:809-828 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1129-1145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16–20 lines × 2) providers/google/src/airflow/providers/google/cloud/operators/compute.py:280— providers/google/src/airflow/providers/google/cloud/operators/compute.py:280-295 | providers/google/src/airflow/providers/google/cloud/operators/compute.py:456-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16–20 lines × 2) providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:244— providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:244-263 | providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:269-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16–19 lines × 3) airflow-core/docs/img/diagram_task_execution_architecture.py:103— airflow-core/docs/img/diagram_task_execution_architecture.py:103-118 | contributing-docs/images/diagram_coordinator_execution_architecture.py:110-128 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:100-118 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_architecture.py` and `contributing-docs/images/diagram_task_sdk_execution_architecture.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/docs/img/diagram_task_execution_architecture.py:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–19 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vision.py:191— providers/google/src/airflow/providers/google/cloud/hooks/vision.py:191-206 | providers/google/src/airflow/providers/google/cloud/hooks/vision.py:315-330 | providers/google/src/airflow/providers/google/cloud/hooks/vision.py:438-456 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vision.py:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (19 lines × 3) airflow-core/src/airflow/utils/email.py:201— airflow-core/src/airflow/utils/email.py:201-219 | providers/smtp/src/airflow/providers/smtp/hooks/smtp.py:572-590 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:202-220 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (19 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:141— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:141-159 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:191-209 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:241-259 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:141` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–18 lines × 2) airflow-core/src/airflow/serialization/definitions/dag.py:917— airflow-core/src/airflow/serialization/definitions/dag.py:917-934 | airflow-core/src/airflow/serialization/definitions/dag.py:1022-1037 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16–18 lines × 2) scripts/ci/prek/check_http_exception_import_from_fastapi.py:102— scripts/ci/prek/check_http_exception_import_from_fastapi.py:102-119 | scripts/ci/prek/check_test_only_imports_in_src.py:109-124 — before extracting anything, compare `scripts/ci/prek/check_http_exception_import_from_fastapi.py` and `scripts/ci/prek/check_test_only_imports_in_src.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_http_exception_import_from_fastapi.py:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 3) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:346— airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:346-362 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:827-842 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:942-958 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16–17 lines × 3) providers/apache/pinot/src/airflow/providers/apache/pinot/hooks/pinot.py:98— providers/apache/pinot/src/airflow/providers/apache/pinot/hooks/pinot.py:98-113 | providers/apache/pinot/src/airflow/providers/apache/pinot/hooks/pinot.py:118-133 | providers/apache/pinot/src/airflow/providers/apache/pinot/hooks/pinot.py:223-239 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16–17 lines × 2) airflow-core/src/airflow/state/metastore.py:349— airflow-core/src/airflow/state/metastore.py:349-364 | airflow-core/src/airflow/state/metastore.py:579-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/state/metastore.py:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) airflow-ctl/src/airflowctl/utils/module_loading.py:24— airflow-ctl/src/airflowctl/utils/module_loading.py:24-39 | shared/module_loading/src/airflow_shared/module_loading/__init__.py:83-99 — before extracting anything, compare `airflow-ctl/src/airflowctl/utils/module_loading.py` and `shared/module_loading/src/airflow_shared/module_loading/__init__.py` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–16 lines × 2) dev/send_email.py:236— dev/send_email.py:236-249 | dev/send_email.py:318-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–16 lines × 2) task-sdk/src/airflow/sdk/api/client.py:528— task-sdk/src/airflow/sdk/api/client.py:528-543 | task-sdk/src/airflow/sdk/api/client.py:566-579 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 3) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:500— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:500-514 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:534-548 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:704-718 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:500` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/cloud_memorystore.py:98— providers/google/src/airflow/providers/google/cloud/hooks/cloud_memorystore.py:98-112 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_memorystore.py:535-549 | providers/google/src/airflow/providers/google/cloud/hooks/kubernetes_engine.py:186-200 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `instance` to `Instance` in one and `cloud_memcache.Instance` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 5) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:250— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:250-265 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:491-504 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:507-520 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:525-538 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:541-554 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:506` calls `drop_constraint`, `f`, `_rename_index` and `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:250` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 5) providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:58— providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:58-71 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:108-121 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:158-171 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:208-221 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:255-268 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 4) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:143— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:143-156 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:193-206 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:243-256 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:99-112 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 4) REDACTED:181— REDACTED:181-194 | scripts/ci/prek/common_prek_utils.py:626-639 | scripts/ci/prek/update_providers_dependencies.py:130-143 | scripts/in_container/in_container_utils.py:113-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11–14 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:336— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:336-349 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:461-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–14 lines × 2) task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py:60— task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py:60-73 | task-sdk/src/airflow/sdk/coordinators/java/coordinator.py:68-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:162— providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:162-174 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:137-149 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py:165-177 | providers/amazon/src/airflow/providers/amazon/aws/transfers/sftp_to_s3.py:195-207 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py` and `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:178` calls `basename` and `providers/amazon/src/airflow/providers/amazon/aws/transfers/sftp_to_s3.py:208` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:47— providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:47-59 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:178-190 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:220-232 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune_analytics.py:262-274 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 4) REDACTED:207— REDACTED:207-217 | REDACTED:3133-3143 | dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:337-347 | devel-common/src/sphinx_exts/providers_commits.py:111-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 4) providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:359— providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:359-369 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:684-694 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1002-1012 | providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:1294-1304 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/alloy_db.py:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1727— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1727-1735 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1753-1761 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1787-1795 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1894-1902 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1727` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:683— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:683-692 | providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:993-1002 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:815-824 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1134-1142 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:683` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 3) airflow-core/docs/img/diagram_dag_processor_airflow_architecture.py:83— airflow-core/docs/img/diagram_dag_processor_airflow_architecture.py:83-91 | airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:117-124 | airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:131-138 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:127` calls `User`, `Cluster` and `airflow-core/docs/img/diagram_dag_processor_airflow_architecture.py:81` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–9 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1823— providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1823-1831 | providers/google/src/airflow/providers/google/cloud/hooks/gcs.py:1320-1328 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:485-492 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (8–9 lines × 2) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:630— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:630-638 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:800-807 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:630` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:158— providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:158-166 | providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:335-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/teradata/src/airflow/providers/teradata/hooks/tpt.py:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 4) providers/apache/hive/src/airflow/providers/apache/hive/assets/hive.py:31— providers/apache/hive/src/airflow/providers/apache/hive/assets/hive.py:31-35 | providers/databricks/src/airflow/providers/databricks/assets/databricks.py:32-36 | providers/google/src/airflow/providers/google/assets/bigquery.py:31-35 | providers/snowflake/src/airflow/providers/snowflake/assets/snowflake.py:31-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1800— providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1800-1804 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1922-1926 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:180-185 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:704-709 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
R10 · Code Duplication· Duplicated block with local edits (76 matched lines × 2 locations) · ×2
Duplicated block with local edits (76 matched lines × 2 locations) airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx:40— airflow-core/src/airflow/ui/src/components/FilterBar/filters/LoopFilter.tsx:40 · airflow-core/src/airflow/ui/src/components/FilterBar/filters/RunStateFilter.tsx:48 — the two spans are one implementation copied and then locally edited — 390 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (76 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStoreModal.tsx:42— airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStoreModal.tsx:42 · airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStoreModal.tsx:55 — the two spans are one implementation copied and then locally edited — 469 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (62 matched lines × 2 locations) · ×2
Duplicated block with local edits (62 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagBundle/BundleFiles.tsx:62— airflow-core/src/airflow/ui/src/pages/DagBundle/BundleFiles.tsx:62 · airflow-core/src/airflow/ui/src/pages/DagBundles/DagBundles.tsx:77 — the two spans are one implementation copied and then locally edited — 332 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (62 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/DagImportErrorsModal.tsx:128— airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/DagImportErrorsModal.tsx:128 · airflow-core/src/airflow/ui/src/pages/Dashboard/Stats/PluginImportErrorsModal.tsx:69 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (57 matched lines × 2 locations) · ×2
Duplicated block with local edits (57 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx:114— airflow-core/src/airflow/ui/src/pages/Deadlines/index.tsx:114 · airflow-core/src/airflow/ui/src/pages/Jobs.tsx:115 — the two spans are one implementation copied and then locally edited — 375 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (57 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:154— airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:154 · airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx:120 — the two spans are one implementation copied and then locally edited — 412 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Dead file (~130 LoC) registry/src/_data/statsData.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~130 LoC) registry/src/js/durable-filters.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~41 LoC) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/ensureQueryData.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~41 LoC) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/prefetch.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~32 LoC) registry/src/_data/utils.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (registry/src/_data/latestVersionData.js, registry/src/_data/providerVersions.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~32 LoC) ts-sdk/api-docs/hitl-api.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~22 LoC) ts-sdk/api-docs/exceptions.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~22 LoC) ts-sdk/api-docs/internal-runtime-details.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~0 LoC) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/infiniteQueries.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~0 LoC) airflow-core/src/airflow/ui/src/utils/advancedSelectStyles.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency '@7nohe/openapi-react-query-codegen' — Declared in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@7nohe/openapi-react-query-codegen' — Declared in airflow-core/src/airflow/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X2 · Cancellation propagation· Async function without AbortSignal · ×2
Async function without AbortSignal: queryFn providers/edge3/src/airflow/providers/edge3/plugins/www/src/layouts/NavTabs.tsx:37— `queryFn` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
Async function without AbortSignal: fetchXComValue providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/model-api.ts:38— `fetchXComValue` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Multiple navigation landmarks without distinguishing labels registry/src/_includes/base.njk:2— With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled.
AC3 · Page structure· Heading level jumps from h1 to h3 · ×1
Heading level jumps from h1 to h3 registry/src/provider-version.njk:191— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Low contrast colour pair in CSS (1.4:1) providers/fab/src/airflow/providers/fab/www/static/css/bootstrap-theme.css:1915— `.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control` sets color: #cbcbcb on background-color: #eee — 1.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.0:1) providers/fab/src/airflow/providers/fab/www/static/css/main.css:550— `.footer` sets color: #8e8e8d on background-color: #f5f5f5 — 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
task_instances.post_clear_task_instances (cyclomatic 69) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1044— task_instances.post_clear_task_instances has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskLogContent.TaskLogContent (cyclomatic 57) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:77— TaskLogContent.TaskLogContent has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 6 of the 57 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 366, a function literal at line 278, a function literal at line 187, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ci_audit.run_audit (cyclomatic 55) dev/breeze/src/airflow_breeze/utils/ci_audit.py:141— ci_audit.run_audit has cyclomatic complexity 55 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClearTaskInstanceDialog.ClearTaskInstanceDialog (cyclomatic 54) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:135— ClearTaskInstanceDialog.ClearTaskInstanceDialog has cyclomatic complexity 54 (threshold 15). Of this number, 39 points are the body's own statements and 15 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dependencies.get_data_dependencies (cyclomatic 53) airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:431— dependencies.get_data_dependencies has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_parameters.discover_classes_from_provider (cyclomatic 52) dev/registry/extract_parameters.py:779— extract_parameters.discover_classes_from_provider has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_instances.ti_update_state (cyclomatic 51) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:452— task_instances.ti_update_state has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataTable.DataTable (cyclomatic 51) airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:133— DataTable.DataTable has cyclomatic complexity 51 (threshold 15). Of this number, 39 points are the body's own statements and 12 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SSHHook.__init__ (cyclomatic 50) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:137— SSHHook.__init__ has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DatabricksAgentHook.invoke_agent (cyclomatic 49) providers/databricks/src/airflow/providers/databricks/hooks/agent.py:139— DatabricksAgentHook.invoke_agent has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GanttTimeline.GanttTimeline (cyclomatic 49) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:113— GanttTimeline.GanttTimeline has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 2 of the 49 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 346, a function literal at line 293, segmentLayout, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SchedulerJobRunner.process_executor_events (cyclomatic 48) airflow-core/src/airflow/jobs/scheduler_job_runner.py:1469— SchedulerJobRunner.process_executor_events has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
taskinstance.clear_task_instances (cyclomatic 48) REDACTED:431— taskinstance.clear_task_instances has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerDAGForm.TriggerDAGForm (cyclomatic 47) airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:72— TriggerDAGForm.TriggerDAGForm has cyclomatic complexity 47 (threshold 15). Of this number, 25 points are the body's own statements and 22 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_metadata.main (cyclomatic 46) REDACTED:535— extract_metadata.main has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskStreamFilter.TaskStreamFilter (cyclomatic 45) airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx:28— TaskStreamFilter.TaskStreamFilter has cyclomatic complexity 45 (threshold 15). Of this number, 26 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fork_ci_reconcile.classify (cyclomatic 44) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:422— fork_ci_reconcile.classify has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ci_commands.upgrade (cyclomatic 42) REDACTED:838— ci_commands.upgrade has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShellParams.compose_file (cyclomatic 42) dev/breeze/src/airflow_breeze/params/shell_params.py:368— ShellParams.compose_file has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SparkSubmitHook._build_spark_common_args (cyclomatic 42) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:622— SparkSubmitHook._build_spark_common_args has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
renderStructuredLog.renderStructuredLogImpl (cyclomatic 41) airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx:181— renderStructuredLog.renderStructuredLogImpl has cyclomatic complexity 41 (threshold 15). Of this number, 35 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatPage.ChatPage (cyclomatic 41) providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/components/ChatPage.tsx:70— ChatPage.ChatPage has cyclomatic complexity 41 (threshold 15). Of this number, 25 points are the body's own statements and 16 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BaseSerialization.serialize (cyclomatic 40) airflow-core/src/airflow/serialization/serialized_objects.py:507— BaseSerialization.serialize has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TaskNode.TaskNode (cyclomatic 39) airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:42— TaskNode.TaskNode has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
provider_dependencies.generate_providers_metadata_for_provider (cyclomatic 38) REDACTED:367— provider_dependencies.generate_providers_metadata_for_provider has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FabAirflowSecurityManagerOverride.auth_user_ldap (cyclomatic 38) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2072— FabAirflowSecurityManagerOverride.auth_user_ldap has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskInstanceTooltip.TaskInstanceTooltip (cyclomatic 38) airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx:50— TaskInstanceTooltip.TaskInstanceTooltip has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dependencies.get_scheduling_dependencies (cyclomatic 37) airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:225— dependencies.get_scheduling_dependencies has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
eval.main (cyclomatic 37) dev/skill-evals/eval.py:291— eval.main has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
grid.summarize_loop_run (cyclomatic 36) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:384— grid.summarize_loop_run has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperatorSerialization.populate_operator (cyclomatic 36) airflow-core/src/airflow/serialization/serialized_objects.py:1132— OperatorSerialization.populate_operator has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
assign_cherry_picked_prs_with_milestone.assign_prs (cyclomatic 36) REDACTED:250— assign_cherry_picked_prs_with_milestone.assign_prs has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.generate_issue_content_providers (cyclomatic 36) REDACTED:2862— release_management_commands.generate_issue_content_providers has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DAG.test (cyclomatic 36) task-sdk/src/airflow/sdk/definitions/dag.py:1257— DAG.test has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagBreadcrumb.DagBreadcrumb (cyclomatic 36) airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx:127— DagBreadcrumb.DagBreadcrumb has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config_command.update_config (cyclomatic 35) airflow-core/src/airflow/cli/commands/config_command.py:943— config_command.update_config has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerRunnerSupervisor._handle_request (cyclomatic 35) airflow-core/src/airflow/jobs/triggerer_job_runner.py:619— TriggerRunnerSupervisor._handle_request has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RedshiftCreateClusterOperator.execute (cyclomatic 35) providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:307— RedshiftCreateClusterOperator.execute has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ModuleAnalyzer._extract_keys_from_local_var (cyclomatic 35) scripts/ci/prek/check_trigger_serialize_init.py:221— ModuleAnalyzer._extract_keys_from_local_var has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DetailsLayout.DetailsLayout (cyclomatic 35) airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:87— DetailsLayout.DetailsLayout has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagsList.DagsList (cyclomatic 35) airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:138— DagsList.DagsList has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Details.Details (cyclomatic 35) airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:47— Details.Details has cyclomatic complexity 35 (threshold 15). Of this number, 21 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
JobsPage.JobsPage (cyclomatic 35) providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:33— JobsPage.JobsPage has cyclomatic complexity 35 (threshold 15). Of this number, 24 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._select_task_instances_to_queue (cyclomatic 34) airflow-core/src/airflow/jobs/scheduler_job_runner.py:715— SchedulerJobRunner._select_task_instances_to_queue has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
emission_policy._parse_rule (cyclomatic 34) providers/openlineage/src/airflow/providers/openlineage/utils/emission_policy.py:529— emission_policy._parse_rule has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dag-graph.buildDagGraph (cyclomatic 34) ts-sdk/src/sdk/dag-graph.ts:73— dag-graph.buildDagGraph has cyclomatic complexity 34 (threshold 15). Of this number, 21 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_shared_distributions_usage.ensure_shared_in_workspace_and_dev (cyclomatic 33) scripts/ci/prek/check_shared_distributions_usage.py:486— check_shared_distributions_usage.ensure_shared_in_workspace_and_dev has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
main.runPack (cyclomatic 33) go-sdk/cmd/airflow-go-pack/pack.go:54— main.runPack has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
execution.runTriggerDagRun (cyclomatic 33) go-sdk/pkg/execution/trigger_runner.go:99— execution.runTriggerDagRun has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BaseSerialization.deserialize (cyclomatic 32) airflow-core/src/airflow/serialization/serialized_objects.py:660— BaseSerialization.deserialize has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DagSerialization.conversion_v1_to_v2 (cyclomatic 32) airflow-core/src/airflow/serialization/serialized_objects.py:2000— DagSerialization.conversion_v1_to_v2 has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesPodOperator.__init__ (cyclomatic 32) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:327— KubernetesPodOperator.__init__ has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
install_airflow_and_providers.find_installation_spec (cyclomatic 32) scripts/in_container/install_airflow_and_providers.py:334— install_airflow_and_providers.find_installation_spec has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
.eleventy.default (cyclomatic 32) registry/.eleventy.js:22— .eleventy.default has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 48, 72, 119, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
search.renderResults (cyclomatic 32) registry/src/js/search.js:91— search.renderResults has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 114). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
exports (cyclomatic 32) registry/.eleventy.js:22— exports has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 48, a function literal at line 72, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TriggerRunner.run_trigger (cyclomatic 31) airflow-core/src/airflow/jobs/triggerer_job_runner.py:1731— TriggerRunner.run_trigger has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.prepare_provider_documentation (cyclomatic 31) REDACTED:1014— release_management_commands.prepare_provider_documentation has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_provider_yaml_files_check.check_all_provider_classes_are_registered (cyclomatic 31) scripts/in_container/run_provider_yaml_files_check.py:715— run_provider_yaml_files_check.check_all_provider_classes_are_registered has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagRef.addTask (cyclomatic 31) go-sdk/airflow/dag.go:243— DagRef.addTask has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Dag.#addTask (cyclomatic 31) ts-sdk/src/sdk/dag.ts:982— Dag.#addTask has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ui_commands.check_translation_completeness (cyclomatic 30) dev/breeze/src/airflow_breeze/commands/ui_commands.py:650— ui_commands.check_translation_completeness has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
confirm.prompt_triage_action (cyclomatic 30) dev/breeze/src/airflow_breeze/utils/confirm.py:268— confirm.prompt_triage_action has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
default_celery.get_default_celery_config (cyclomatic 30) providers/celery/src/airflow/providers/celery/executors/default_celery.py:135— default_celery.get_default_celery_config has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataFusionEngine._get_credentials (cyclomatic 30) providers/common/sql/src/airflow/providers/common/sql/datafusion/engine.py:151— DataFusionEngine._get_credentials has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VaultHook.__init__ (cyclomatic 30) providers/hashicorp/src/airflow/providers/hashicorp/hooks/vault.py:113— VaultHook.__init__ has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OracleHook.get_conn (cyclomatic 30) providers/oracle/src/airflow/providers/oracle/hooks/oracle.py:141— OracleHook.get_conn has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
connection-builder.renderField (cyclomatic 30) registry/src/js/connection-builder.js:194— connection-builder.renderField has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sbom_commands.update_sbom_information (cyclomatic 29) dev/breeze/src/airflow_breeze/commands/sbom_commands.py:236— sbom_commands.update_sbom_information has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fork_ci_reconcile.parse_pull_request (cyclomatic 29) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:696— fork_ci_reconcile.parse_pull_request has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ReleaseValidator.validate_prerequisites (cyclomatic 29) dev/breeze/src/airflow_breeze/utils/release_validator.py:268— ReleaseValidator.validate_prerequisites has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SelectiveChecks.skip_prek_hooks (cyclomatic 29) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1981— SelectiveChecks.skip_prek_hooks has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BigQueryCursor._prepare_query_configuration (cyclomatic 29) providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:2085— BigQueryCursor._prepare_query_configuration has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClusterGenerator._build_cluster_data (cyclomatic 29) providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:459— ClusterGenerator._build_cluster_data has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BaseSQLToGCSOperator._write_local_data_files (cyclomatic 29) providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py:235— BaseSQLToGCSOperator._write_local_data_files has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SecretsMasker._merge (cyclomatic 29) shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:443— SecretsMasker._merge has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SerializedDAG.clear (cyclomatic 28) airflow-core/src/airflow/serialization/definitions/dag.py:1217— SerializedDAG.clear has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
provider_documentation.update_release_notes (cyclomatic 28) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:871— provider_documentation.update_release_notes has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
get_important_pr_candidates.main (cyclomatic 28) REDACTED:974— get_important_pr_candidates.main has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
build_docs.build_docs (cyclomatic 28) devel-common/src/docs/build_docs.py:469— build_docs.build_docs has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_VaultClient.__init__ (cyclomatic 28) REDACTED:106— _VaultClient.__init__ has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BteqOperator.execute (cyclomatic 28) providers/teradata/src/airflow/providers/teradata/operators/bteq.py:116— BteqOperator.execute has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DecoratedOperator.__init__ (cyclomatic 28) task-sdk/src/airflow/sdk/bases/decorator.py:320— DecoratedOperator.__init__ has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils.transformGanttData (cyclomatic 28) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts:90— utils.transformGanttData has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 137, 108). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Code.Code (cyclomatic 28) airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx:53— Code.Code has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AssetSchedule.AssetSchedule (cyclomatic 28) airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx:72— AssetSchedule.AssetSchedule has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeadlineStatus.DeadlineStatus (cyclomatic 28) airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:44— DeadlineStatus.DeadlineStatus has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
task_instances._create_ti_state_update_query_and_update_state (cyclomatic 27) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:896— task_instances._create_ti_state_update_query_and_update_state has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskInstance.expand_mapped_task (cyclomatic 27) REDACTED:3163— TaskInstance.expand_mapped_task has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProvidersManager._import_hook (cyclomatic 27) airflow-core/src/airflow/providers_manager.py:1052— ProvidersManager._import_hook has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_log_address.prepare_task_log_contexts (cyclomatic 27) REDACTED:174— task_log_address.prepare_task_log_contexts has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
packages.regenerate_pyproject_toml (cyclomatic 27) REDACTED:915— packages.regenerate_pyproject_toml has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_utils.run_command (cyclomatic 27) dev/breeze/src/airflow_breeze/utils/run_utils.py:71— run_utils.run_command has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
celery_command.worker (cyclomatic 27) providers/celery/src/airflow/providers/celery/cli/celery_command.py:198— celery_command.worker has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KubernetesJobWatcher.process_status (cyclomatic 27) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:236— KubernetesJobWatcher.process_status has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesPodOperator.trigger_reentry (cyclomatic 27) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1129— KubernetesPodOperator.trigger_reentry has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WinRMHook.create_protocol (cyclomatic 27) providers/microsoft/winrm/src/airflow/providers/microsoft/winrm/hooks/winrm.py:131— WinRMHook.create_protocol has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BteqHook._transfer_to_and_execute_bteq_on_remote (cyclomatic 27) providers/teradata/src/airflow/providers/teradata/hooks/bteq.py:145— BteqHook._transfer_to_and_execute_bteq_on_remote has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WeaviateHook.create_or_replace_document_objects (cyclomatic 27) providers/weaviate/src/airflow/providers/weaviate/hooks/weaviate.py:905— WeaviateHook.create_or_replace_document_objects has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fab_permissions_doc._fab_route_entries (cyclomatic 27) scripts/ci/prek/fab_permissions_doc.py:293— fab_permissions_doc._fab_route_entries has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CalendarCell.CalendarCell (cyclomatic 27) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarCell.tsx:44— CalendarCell.CalendarCell has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_instances.ti_run (cyclomatic 26) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:157— task_instances.ti_run has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DagRun.update_state (cyclomatic 26) airflow-core/src/airflow/models/dagrun.py:1279— DagRun.update_state has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
testing_commands.ui_e2e_tests (cyclomatic 26) dev/breeze/src/airflow_breeze/commands/testing_commands.py:1636— testing_commands.ui_e2e_tests has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
workflow_commands.workflow_run_publish (cyclomatic 26) dev/breeze/src/airflow_breeze/commands/workflow_commands.py:136— workflow_commands.workflow_run_publish has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ConsumeFromTopicOperator.execute (cyclomatic 26) providers/apache/kafka/src/airflow/providers/apache/kafka/operators/consume.py:132— ConsumeFromTopicOperator.execute has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
kubernetes_command.cleanup_pods (cyclomatic 26) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/cli/kubernetes_command.py:156— kubernetes_command.cleanup_pods has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FABAuthManagerUsers.update_user (cyclomatic 26) providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/users.py:141— FABAuthManagerUsers.update_user has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GCSToBigQueryOperator.execute (cyclomatic 26) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:362— GCSToBigQueryOperator.execute has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Plan.resolveLoneStructParam (cyclomatic 26) REDACTED:238— Plan.resolveLoneStructParam has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FilterBar.FilterBar (cyclomatic 26) airflow-core/src/airflow/ui/src/components/FilterBar/FilterBar.tsx:46— FilterBar.FilterBar has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (renderFilter, a function literal at line 80, a function literal at line 92, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Graph.Graph (cyclomatic 26) airflow-core/src/airflow/ui/src/layouts/Details/Graph/Graph.tsx:56— Graph.Graph has cyclomatic complexity 26 (threshold 15). Of this number, 16 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TaskInstances.TaskInstances (cyclomatic 26) airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:310— TaskInstances.TaskInstances has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Logs.Logs (cyclomatic 26) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:48— Logs.Logs has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
connection-builder.generateURI (cyclomatic 26) registry/src/js/connection-builder.js:310— connection-builder.generateURI has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
connection_command.connections_add (cyclomatic 25) airflow-core/src/airflow/cli/commands/connection_command.py:301— connection_command.connections_add has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskInstance.register_asset_changes_in_db (cyclomatic 25) REDACTED:2383— TaskInstance.register_asset_changes_in_db has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
KubernetesPodOperator.cleanup (cyclomatic 25) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1370— KubernetesPodOperator.cleanup has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BigQueryToSqlBaseOperator.get_openlineage_facets_on_complete (cyclomatic 25) providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_sql.py:147— BigQueryToSqlBaseOperator.get_openlineage_facets_on_complete has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
check_metrics_synced_with_the_registry.main (cyclomatic 25) scripts/ci/prek/check_metrics_synced_with_the_registry.py:425— check_metrics_synced_with_the_registry.main has cyclomatic complexity 25 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
serde.deserialize (cyclomatic 25) task-sdk/src/airflow/sdk/serde/__init__.py:292— serde.deserialize has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RunBackfillForm.RunBackfillForm (cyclomatic 25) airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:54— RunBackfillForm.RunBackfillForm has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 7 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useRequiredActionTabs.useRequiredActionTabs (cyclomatic 25) airflow-core/src/airflow/ui/src/hooks/useRequiredActionTabs.ts:48— useRequiredActionTabs.useRequiredActionTabs has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Calendar.Calendar (cyclomatic 25) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx:54— Calendar.Calendar has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskLogHeader.TaskLogHeader (cyclomatic 25) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogHeader.tsx:68— TaskLogHeader.TaskLogHeader has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
task_command._get_ti (cyclomatic 24) airflow-core/src/airflow/cli/commands/task_command.py:178— task_command._get_ti has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plugins_manager._get_ui_plugins (cyclomatic 24) airflow-core/src/airflow/plugins_manager.py:525— plugins_manager._get_ui_plugins has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
main_command.cleanup (cyclomatic 24) dev/breeze/src/airflow_breeze/commands/main_command.py:229— main_command.cleanup has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AirflowReleaseValidator.validate_reproducible_build (cyclomatic 24) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:221— AirflowReleaseValidator.validate_reproducible_build has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
docker_command_utils.bring_compose_projects_down (cyclomatic 24) dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:1079— docker_command_utils.bring_compose_projects_down has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
setup_idea.main (cyclomatic 24) REDACTED:1102— setup_idea.main has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LivyHook.build_post_batch_body (cyclomatic 24) providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:336— LivyHook.build_post_batch_body has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (LivyAsyncHook.build_post_batch_body) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LivyAsyncHook.build_post_batch_body (cyclomatic 24) providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:655— LivyAsyncHook.build_post_batch_body has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (LivyHook.build_post_batch_body) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
run_pre_extras_install.validate_manifest (cyclomatic 24) scripts/in_container/run_pre_extras_install.py:76— run_pre_extras_install.validate_manifest has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
verify_providers.import_all_classes (cyclomatic 24) scripts/in_container/verify_providers.py:129— verify_providers.import_all_classes has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_runner._run_task_and_map_outcome (cyclomatic 24) task-sdk/src/airflow/sdk/execution_time/task_runner.py:1613— task_runner._run_task_and_map_outcome has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Gantt.Gantt (cyclomatic 24) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx:61— Gantt.Gantt has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TaskInstance.TaskInstance (cyclomatic 24) airflow-core/src/airflow/ui/src/pages/TaskInstance/TaskInstance.tsx:52— TaskInstance.TaskInstance has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useGridTISummaries.useGridTiSummariesStream (cyclomatic 24) airflow-core/src/airflow/ui/src/queries/useGridTISummaries.ts:49— useGridTISummaries.useGridTiSummariesStream has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 77, 196, 69, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
hitl.getHITLParamsDict (cyclomatic 24) airflow-core/src/airflow/ui/src/utils/hitl.ts:76— hitl.getHITLParamsDict has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkerPage.WorkerPage (cyclomatic 24) providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:49— WorkerPage.WorkerPage has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_instances.get_task_instances (cyclomatic 23) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:561— task_instances.get_task_instances has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db_command.run_db_downgrade_command (cyclomatic 23) REDACTED:155— db_command.run_db_downgrade_command has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dagrun.clear_partition_runs (cyclomatic 23) airflow-core/src/airflow/models/dagrun.py:2900— dagrun.clear_partition_runs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SerializedDagModel.write_dag (cyclomatic 23) airflow-core/src/airflow/models/serialized_dag.py:608— SerializedDagModel.write_dag has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
taskinstance.select_loop_clear_scope (cyclomatic 23) REDACTED:670— taskinstance.select_loop_clear_scope has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagSerialization._deserialize_dag_internal (cyclomatic 23) airflow-core/src/airflow/serialization/serialized_objects.py:1847— DagSerialization._deserialize_dag_internal has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_command.remove_old_release (cyclomatic 23) dev/breeze/src/airflow_breeze/commands/release_command.py:226— release_command.remove_old_release has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AirflowReleaseValidator.validate_licenses (cyclomatic 23) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:414— AirflowReleaseValidator.validate_licenses has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
reproduce_ci.build_reproduction_command_from_context (cyclomatic 23) dev/breeze/src/airflow_breeze/utils/reproduce_ci.py:62— reproduce_ci.build_reproduction_command_from_context has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_versions.main (cyclomatic 23) dev/registry/extract_versions.py:576— extract_versions.main has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AwsConnectionWrapper.__post_init__ (cyclomatic 23) providers/amazon/src/airflow/providers/amazon/aws/utils/connection_wrapper.py:161— AwsConnectionWrapper.__post_init__ has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesExecutor._handle_pod_publish_error (cyclomatic 23) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:709— KubernetesExecutor._handle_pod_publish_error has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SQLColumnCheckOperator._column_mapping_validation (cyclomatic 23) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:775— SQLColumnCheckOperator._column_mapping_validation has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
msgraph.get_fs (cyclomatic 23) providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py:67— msgraph.get_fs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_example_dag_shell_commands._unsafe_command (cyclomatic 23) scripts/ci/prek/check_example_dag_shell_commands.py:130— check_example_dag_shell_commands._unsafe_command has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BaseOperator.__init__ (cyclomatic 23) task-sdk/src/airflow/sdk/bases/operator.py:1051— BaseOperator.__init__ has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FieldsKt.checkConfigValue (cyclomatic 23) java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/internal/Fields.kt:90— FieldsKt.checkConfigValue has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
elkGraphUtils.generateElkGraph.formatChildNode (cyclomatic 23) airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts:300— elkGraphUtils.generateElkGraph.formatChildNode has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FilterParam.to_orm (cyclomatic 22) airflow-core/src/airflow/api_fastapi/common/parameters/filter.py:127— FilterParam.to_orm has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
assets.next_run_assets (cyclomatic 22) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py:163— assets.next_run_assets has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BulkTaskInstanceService._handle_regional_bulk (cyclomatic 22) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:790— BulkTaskInstanceService._handle_regional_bulk has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Connection.get_uri (cyclomatic 22) REDACTED:313— Connection.get_uri has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dag_version_diff._get_category (cyclomatic 22) airflow-core/src/airflow/serialization/dag_version_diff.py:1240— dag_version_diff._get_category has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SerializedDAG.partial_subset (cyclomatic 22) airflow-core/src/airflow/serialization/definitions/dag.py:299— SerializedDAG.partial_subset has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperatorSerialization._is_excluded (cyclomatic 22) airflow-core/src/airflow/serialization/serialized_objects.py:1471— OperatorSerialization._is_excluded has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.prepare_provider_distributions (cyclomatic 22) REDACTED:1320— release_management_commands.prepare_provider_distributions has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
release_management_commands.generate_issue_content (cyclomatic 22) REDACTED:4711— release_management_commands.generate_issue_content has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
docker_command_utils.enter_shell (cyclomatic 22) dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:1242— docker_command_utils.enter_shell has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
S3ToRedshiftOperator.execute (cyclomatic 22) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_redshift.py:138— S3ToRedshiftOperator.execute has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AgentOperator.__init__ (cyclomatic 22) providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:518— AgentOperator.__init__ has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
sql_validation.collect_table_references (cyclomatic 22) providers/common/ai/src/airflow/providers/common/ai/utils/sql_validation.py:254— sql_validation.collect_table_references has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openlineage.emit_openlineage_events_for_databricks_queries (cyclomatic 22) providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:149— openlineage.emit_openlineage_events_for_databricks_queries has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BigQueryGetDataOperator.execute (cyclomatic 22) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1147— BigQueryGetDataOperator.execute has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GCSTimeSpanFileTransformOperator.execute (cyclomatic 22) providers/google/src/airflow/providers/google/cloud/operators/gcs.py:911— GCSTimeSpanFileTransformOperator.execute has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SFTPOperator.execute (cyclomatic 22) providers/sftp/src/airflow/providers/sftp/operators/sftp.py:112— SFTPOperator.execute has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TrinoHook.get_conn (cyclomatic 22) providers/trino/src/airflow/providers/trino/hooks/trino.py:147— TrinoHook.get_conn has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
extract_permissions.extract_from_file (cyclomatic 22) scripts/ci/prek/extract_permissions.py:312— extract_permissions.extract_from_file has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useGraphFilteredNodes.isNodeFiltered (cyclomatic 22) airflow-core/src/airflow/ui/src/layouts/Details/Graph/useGraphFilteredNodes.ts:58— useGraphFilteredNodes.isNodeFiltered has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Grid.Grid (cyclomatic 22) airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx:73— Grid.Grid has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useLogGroups.useLogGroups (cyclomatic 22) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/useLogGroups.tsx:30— useLogGroups.useLogGroups has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 148, 94, 102, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
exports (cyclomatic 22) registry/src/_data/statsData.js:24— exports has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 96, 38, 71, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
manifest.validate_bundle_version_manifest_structure (cyclomatic 21) airflow-core/src/airflow/dag_processing/bundles/manifest.py:469— manifest.validate_bundle_version_manifest_structure has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SchedulerJobRunner._create_dagruns_for_partitioned_asset_dags (cyclomatic 21) airflow-core/src/airflow/jobs/scheduler_job_runner.py:2411— SchedulerJobRunner._create_dagruns_for_partitioned_asset_dags has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._schedule_dag_run (cyclomatic 21) airflow-core/src/airflow/jobs/scheduler_job_runner.py:3236— SchedulerJobRunner._schedule_dag_run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._purge_task_instances_without_heartbeats (cyclomatic 21) airflow-core/src/airflow/jobs/scheduler_job_runner.py:4010— SchedulerJobRunner._purge_task_instances_without_heartbeats has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SerializedDAG.create_dagrun (cyclomatic 21) airflow-core/src/airflow/serialization/definitions/dag.py:589— SerializedDAG.create_dagrun has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config_command.lint (cyclomatic 21) airflow-ctl/src/airflowctl/ctl/commands/config_command.py:736— config_command.lint has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PinotAdminHook.create_segment (cyclomatic 21) providers/apache/pinot/src/airflow/providers/apache/pinot/hooks/pinot.py:137— PinotAdminHook.create_segment has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SparkSubmitHook._poll_k8s_driver_via_api (cyclomatic 21) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:1247— SparkSubmitHook._poll_k8s_driver_via_api has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesExecutor._change_state (cyclomatic 21) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:831— KubernetesExecutor._change_state has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesJobOperator.execute_complete (cyclomatic 21) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:290— KubernetesJobOperator.execute_complete has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LLMOperator.__init__ (cyclomatic 21) providers/common/ai/src/airflow/providers/common/ai/operators/llm.py:241— LLMOperator.__init__ has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
openai_agents._describe (cyclomatic 21) providers/common/ai/src/airflow/providers/common/ai/tools/openai_agents.py:308— openai_agents._describe has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SandboxToolset.__init__ (cyclomatic 21) providers/common/ai/src/airflow/providers/common/ai/toolsets/sandbox.py:266— SandboxToolset.__init__ has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GCSToBigQueryOperator._use_existing_table (cyclomatic 21) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:652— GCSToBigQueryOperator._use_existing_table has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AzureContainerInstancesOperator.execute (cyclomatic 21) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/container_instances.py:329— AzureContainerInstancesOperator.execute has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SFTPHookAsync._parse_extras (cyclomatic 21) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:921— SFTPHookAsync._parse_extras has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TableauOperator.execute (cyclomatic 21) providers/tableau/src/airflow/providers/tableau/operators/tableau.py:133— TableauOperator.execute has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validate_operators_init._check_constructor_field_logic (cyclomatic 21) scripts/ci/prek/validate_operators_init.py:428— validate_operators_init._check_constructor_field_logic has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run_fix_ownership.change_ownership_of_files (cyclomatic 21) scripts/in_container/run_fix_ownership.py:30— run_fix_ownership.change_ownership_of_files has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_LazyLogRecordDict.__getitem__ (cyclomatic 21) shared/logging/src/airflow_shared/logging/percent_formatter.py:49— _LazyLogRecordDict.__getitem__ has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DAG.partial_subset (cyclomatic 21) task-sdk/src/airflow/sdk/definitions/dag.py:928— DAG.partial_subset has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_runner.finalize (cyclomatic 21) task-sdk/src/airflow/sdk/execution_time/task_runner.py:2465— task_runner.finalize has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ClearTaskInstanceButton.ClearTaskInstanceButton (cyclomatic 21) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx:49— ClearTaskInstanceButton.ClearTaskInstanceButton has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DateTimeInput.DateTimeInput (cyclomatic 21) airflow-core/src/airflow/ui/src/components/DateTimeInput.tsx:69— DateTimeInput.DateTimeInput has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (getFieldError, commit, applyChange, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ConnectionForm.ConnectionForm (cyclomatic 21) airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx:49— ConnectionForm.ConnectionForm has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HITLResponseForm.HITLResponseForm (cyclomatic 21) airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLResponseForm.tsx:62— HITLResponseForm.HITLResponseForm has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
useLogs.parseLogs (cyclomatic 21) airflow-core/src/airflow/ui/src/queries/useLogs.tsx:119— useLogs.parseLogs has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 203, 146, 160, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AssetManager.register_asset_change (cyclomatic 20) airflow-core/src/airflow/assets/manager.py:219— AssetManager.register_asset_change has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db_command.run_db_migrate_command (cyclomatic 20) REDACTED:88— db_command.run_db_migrate_command has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DagFileProcessorManager._refresh_dag_bundles (cyclomatic 20) airflow-core/src/airflow/dag_processing/manager.py:880— DagFileProcessorManager._refresh_dag_bundles has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskInstance.xcom_pull (cyclomatic 20) REDACTED:2845— TaskInstance.xcom_pull has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dag_version_diff._collect_changes (cyclomatic 20) airflow-core/src/airflow/serialization/dag_version_diff.py:972— dag_version_diff._collect_changes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_SharedStreamGroup._poll (cyclomatic 20) airflow-core/src/airflow/triggers/shared_stream.py:697— _SharedStreamGroup._poll has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db_cleanup._do_delete (cyclomatic 20) REDACTED:477— db_cleanup._do_delete has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileTaskHandler._read (cyclomatic 20) airflow-core/src/airflow/utils/log/file_task_handler.py:555— FileTaskHandler._read has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ui_commands.print_translation_progress (cyclomatic 20) dev/breeze/src/airflow_breeze/commands/ui_commands.py:395— ui_commands.print_translation_progress has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
confirm.user_confirm (cyclomatic 20) dev/breeze/src/airflow_breeze/utils/confirm.py:57— confirm.user_confirm has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_connections.main (cyclomatic 20) dev/registry/extract_connections.py:160— extract_connections.main has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EcsRunTaskOperator._start_task (cyclomatic 20) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:674— EcsRunTaskOperator._start_task has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EcsRunTaskOperator._check_success_task (cyclomatic 20) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:790— EcsRunTaskOperator._check_success_task has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SparkSqlHook._prepare_command (cyclomatic 20) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_sql.py:139— SparkSqlHook._prepare_command has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SparkSubmitHook._resolve_connection (cyclomatic 20) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:470— SparkSubmitHook._resolve_connection has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AsyncKubernetesHook._load_config (cyclomatic 20) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:920— AsyncKubernetesHook._load_config has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesJobOperator.execute (cyclomatic 20) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:192— KubernetesJobOperator.execute has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HookToolset.__init__ (cyclomatic 20) providers/common/ai/src/airflow/providers/common/ai/toolsets/hook.py:149— HookToolset.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElasticsearchTaskHandler._read (cyclomatic 20) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:434— ElasticsearchTaskHandler._read has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GitHook.__init__ (cyclomatic 20) providers/git/src/airflow/providers/git/hooks/git.py:118— GitHook.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sql_hook_lineage.emit_lineage_from_sql_extras (cyclomatic 20) providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:99— sql_hook_lineage.emit_lineage_from_sql_extras has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OpensearchTaskHandler._read (cyclomatic 20) providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:603— OpensearchTaskHandler._read has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SSHHookAsync._parse_extras (cyclomatic 20) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:646— SSHHookAsync._parse_extras has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
check_excluded_provider_markers._check_dependency (cyclomatic 20) scripts/ci/prek/check_excluded_provider_markers.py:82— check_excluded_provider_markers._check_dependency has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validate_operators_init._collect_sanctioned_uses (cyclomatic 20) scripts/ci/prek/validate_operators_init.py:298— validate_operators_init._collect_sanctioned_uses has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Connection._build_uri (cyclomatic 20) task-sdk/src/airflow/sdk/definitions/connection.py:156— Connection._build_uri has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
supervisor.supervise_task (cyclomatic 20) REDACTED:3085— supervisor.supervise_task has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
main.defaultLiteral (cyclomatic 20) go-sdk/pkg/execution/genmodels/gen/main.go:512— main.defaultLiteral has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AssetNode.AssetNode (cyclomatic 20) airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.tsx:38— AssetNode.AssetNode has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PresetFiltersMenu.PresetFiltersMenu (cyclomatic 20) airflow-core/src/airflow/ui/src/components/PresetFiltersMenu.tsx:50— PresetFiltersMenu.PresetFiltersMenu has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (handleSave, a function literal at line 122, a function literal at line 218, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useIframeUrlSync.useIframeUrlSync (cyclomatic 20) airflow-core/src/airflow/ui/src/hooks/useIframeUrlSync.ts:60— useIframeUrlSync.useIframeUrlSync has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 97, 149, 90). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CreateAssetEventModal.CreateAssetEventModal (cyclomatic 20) airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.tsx:64— CreateAssetEventModal.CreateAssetEventModal has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
calendarUtils.resolveCellColor (cyclomatic 20) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts:302— calendarUtils.resolveCellColor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagRuns.DagRuns (cyclomatic 20) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:257— DagRuns.DagRuns has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useFiltersHandler.useFiltersHandler (cyclomatic 20) airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts:124— useFiltersHandler.useFiltersHandler has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 134). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
task_instances._get_task_group_task_instances (cyclomatic 19) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:329— task_instances._get_task_group_task_instances has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_instances.get_previous_task_instance (cyclomatic 19) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:1608— task_instances.get_previous_task_instance has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
partition_command.clear (cyclomatic 19) airflow-core/src/airflow/cli/commands/partition_command.py:37— partition_command.clear has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AirflowConfigParser.write_custom_config (cyclomatic 19) airflow-core/src/airflow/configuration.py:278— AirflowConfigParser.write_custom_config has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AssetModelOperation.add_asset_trigger_references (cyclomatic 19) airflow-core/src/airflow/dag_processing/collection.py:1244— AssetModelOperation.add_asset_trigger_references has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._run_scheduler_loop (cyclomatic 19) airflow-core/src/airflow/jobs/scheduler_job_runner.py:1953— SchedulerJobRunner._run_scheduler_loop has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._create_dag_runs_asset_triggered (cyclomatic 19) airflow-core/src/airflow/jobs/scheduler_job_runner.py:2971— SchedulerJobRunner._create_dag_runs_asset_triggered has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagRun.schedule_tis (cyclomatic 19) airflow-core/src/airflow/models/dagrun.py:2652— DagRun.schedule_tis has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperatorSerialization._serialize_node (cyclomatic 19) airflow-core/src/airflow/serialization/serialized_objects.py:1056— OperatorSerialization._serialize_node has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AirflowReleaseValidator._compare_archives (cyclomatic 19) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:158— AirflowReleaseValidator._compare_archives has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
selective_checks._imports_module (cyclomatic 19) dev/breeze/src/airflow_breeze/utils/selective_checks.py:737— selective_checks._imports_module has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnalyticDBSparkHook.build_submit_app_data (cyclomatic 19) providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:197— AnalyticDBSparkHook.build_submit_app_data has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
S3KeySensor._check_key (cyclomatic 19) providers/amazon/src/airflow/providers/amazon/aws/sensors/s3.py:109— S3KeySensor._check_key has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LLMApprovalMixin.execute_complete (cyclomatic 19) providers/common/ai/src/airflow/providers/common/ai/mixins/approval.py:320— LLMApprovalMixin.execute_complete has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
edge_command.maintenance (cyclomatic 19) providers/edge3/src/airflow/providers/edge3/cli/edge_command.py:150— edge_command.maintenance has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ComputeEngineSSHHook.get_conn (cyclomatic 19) providers/google/src/airflow/providers/google/cloud/hooks/compute_ssh.py:274— ComputeEngineSSHHook.get_conn has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
http._process_extra_options_from_connection (cyclomatic 19) providers/http/src/airflow/providers/http/hooks/http.py:102— http._process_extra_options_from_connection has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SFTPHook.transfer (cyclomatic 19) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:800— SFTPHook.transfer has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerDagRunOperator.execute (cyclomatic 19) providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:233— TriggerDagRunOperator.execute has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_init_decorator_arguments._match_arguments (cyclomatic 19) scripts/ci/prek/check_init_decorator_arguments.py:136— check_init_decorator_arguments._match_arguments has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_migration_patterns._collect_ddl_table_names (cyclomatic 19) scripts/ci/prek/check_migration_patterns.py:304— check_migration_patterns._collect_ddl_table_names has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_shared_distributions_usage.main (cyclomatic 19) scripts/ci/prek/check_shared_distributions_usage.py:726— check_shared_distributions_usage.main has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
structlog.configure_logging (cyclomatic 19) shared/logging/src/airflow_shared/logging/structlog.py:542— structlog.configure_logging has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BaseSetupTeardownContext.set_work_task_roots_and_leaves (cyclomatic 19) task-sdk/src/airflow/sdk/definitions/_internal/setup_teardown.py:258— BaseSetupTeardownContext.set_work_task_roots_and_leaves has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagBuilder._build_operator (cyclomatic 19) REDACTED:151— DagBuilder._build_operator has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
airflow.declareEdges (cyclomatic 19) go-sdk/airflow/node.go:344— airflow.declareEdges has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JsonPreviewBadges.JsonPreviewBadges (cyclomatic 19) airflow-core/src/airflow/ui/src/components/JsonPreviewBadges.tsx:47— JsonPreviewBadges.JsonPreviewBadges has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MarkTaskInstanceAsDialog.MarkTaskInstanceAsDialog (cyclomatic 19) airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.tsx:44— MarkTaskInstanceAsDialog.MarkTaskInstanceAsDialog has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
connection-builder.generateJSON (cyclomatic 19) registry/src/js/connection-builder.js:369— connection-builder.generateJSON has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
grid._build_ti_summaries (cyclomatic 18) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py:414— grid._build_ti_summaries has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
partitioned_dag_runs.get_pending_partitioned_dag_run (cyclomatic 18) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/partitioned_dag_runs.py:369— partitioned_dag_runs.get_pending_partitioned_dag_run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
connections.update_orm_from_pydantic (cyclomatic 18) REDACTED:43— connections.update_orm_from_pydantic has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
grid.load_loop_run_inputs (cyclomatic 18) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:290— grid.load_loop_run_inputs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
xcoms.get_mapped_xcom_by_slice (cyclomatic 18) airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:420— xcoms.get_mapped_xcom_by_slice has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AssetManager._filter_dags_by_team (cyclomatic 18) airflow-core/src/airflow/assets/manager.py:128— AssetManager._filter_dags_by_team has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
team_command.team_sync (cyclomatic 18) airflow-core/src/airflow/cli/commands/team_command.py:213— team_command.team_sync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerRunnerSupervisor._create_workload (cyclomatic 18) airflow-core/src/airflow/jobs/triggerer_job_runner.py:879— TriggerRunnerSupervisor._create_workload has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagRun._check_for_removed_or_restored_tasks (cyclomatic 18) airflow-core/src/airflow/models/dagrun.py:2148— DagRun._check_for_removed_or_restored_tasks has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plugins_manager._describe_ui_action_error (cyclomatic 18) airflow-core/src/airflow/plugins_manager.py:366— plugins_manager._describe_ui_action_error has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PrevDagrunDep._get_dep_statuses (cyclomatic 18) airflow-core/src/airflow/ti_deps/deps/prev_dagrun_dep.py:147— PrevDagrunDep._get_dep_statuses has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
setup_commands.regenerate_help_images_for_all_commands (cyclomatic 18) REDACTED:513— setup_commands.regenerate_help_images_for_all_commands has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
verify_commands.verify (cyclomatic 18) dev/breeze/src/airflow_breeze/commands/verify_commands.py:108— verify_commands.verify has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SelectiveChecks.provider_dependency_bump (cyclomatic 18) dev/breeze/src/airflow_breeze/utils/selective_checks.py:2467— SelectiveChecks.provider_dependency_bump has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_changelog_entries.check (cyclomatic 18) dev/check_changelog_entries.py:123— check_changelog_entries.check has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SuperFastPRFinder.is_rookie_author (cyclomatic 18) REDACTED:626— SuperFastPRFinder.is_rookie_author has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fetch_inventories.fetch_inventories (cyclomatic 18) devel-common/src/sphinx_exts/docs_build/fetch_inventories.py:109— fetch_inventories.fetch_inventories has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClickHouseHook._get_client_kwargs (cyclomatic 18) providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:189— ClickHouseHook._get_client_kwargs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
AgentOperator._resume_after_tool_approval (cyclomatic 18) providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:1306— AgentOperator._resume_after_tool_approval has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
permissions_command.permissions_cleanup (cyclomatic 18) providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/permissions_command.py:107— permissions_command.permissions_cleanup has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
role_command.__roles_add_or_remove_permissions (cyclomatic 18) providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/role_command.py:92— role_command.__roles_add_or_remove_permissions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FabAirflowSecurityManagerOverride._sync_dag_view_permissions (cyclomatic 18) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:1083— FabAirflowSecurityManagerOverride._sync_dag_view_permissions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CloudSQLDatabaseHook._generate_connection_uri (cyclomatic 18) REDACTED:1169— CloudSQLDatabaseHook._generate_connection_uri has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GcpBodyFieldValidator._validate_field (cyclomatic 18) providers/google/src/airflow/providers/google/cloud/utils/field_validator.py:314— GcpBodyFieldValidator._validate_field has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
emission_policy.extend_global_openlineage_emission_policy (cyclomatic 18) providers/openlineage/src/airflow/providers/openlineage/api/emission_policy.py:121— emission_policy.extend_global_openlineage_emission_policy has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExternalTaskSensor.__init__ (cyclomatic 18) providers/standard/src/airflow/providers/standard/sensors/external_task.py:183— ExternalTaskSensor.__init__ has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TdLoadOperator._validate_and_determine_mode (cyclomatic 18) providers/teradata/src/airflow/providers/teradata/operators/tpt.py:384— TdLoadOperator._validate_and_determine_mode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_connection_doc_labels.main (cyclomatic 18) scripts/ci/prek/check_connection_doc_labels.py:90— check_connection_doc_labels.main has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
validate_operators_init._handle_constructor_statement (cyclomatic 18) scripts/ci/prek/validate_operators_init.py:162— validate_operators_init._handle_constructor_statement has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AirflowConfigParser._replace_section_config_with_display_sources (cyclomatic 18) shared/configuration/src/airflow_shared/configuration/parser.py:1039— AirflowConfigParser._replace_section_config_with_display_sources has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SecretsMasker.add_mask (cyclomatic 18) shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:604— SecretsMasker.add_mask has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
datetime.deserialize (cyclomatic 18) task-sdk/src/airflow/sdk/serde/serializers/datetime.py:68— datetime.deserialize has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagDef.expandGroupEdges (cyclomatic 18) java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/DagDef.kt:354— DagDef.expandGroupEdges has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
airflow.findTaskRef (cyclomatic 18) go-sdk/airflow/inputs.go:104— airflow.findTaskRef has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
main.main (cyclomatic 18) go-sdk/internal/genspec/main.go:45— main.main has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useTaskInstanceView.useTaskInstanceView (cyclomatic 18) airflow-core/src/airflow/ui/src/hooks/useTaskInstanceView.ts:35— useTaskInstanceView.useTaskInstanceView has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GridTI.GridTI (cyclomatic 18) airflow-core/src/airflow/ui/src/layouts/Details/Grid/GridTI.tsx:52— GridTI.GridTI has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TaskStateStoreModal.TaskStateStoreModal (cyclomatic 18) airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStoreModal.tsx:72— TaskStateStoreModal.TaskStateStoreModal has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
provider-filters.filterProviders (cyclomatic 18) registry/src/js/provider-filters.js:55— provider-filters.filterProviders has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
trigger-dag-run.triggerDagRun (cyclomatic 18) ts-sdk/src/sdk/trigger-dag-run.ts:129— trigger-dag-run.triggerDagRun has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
dag_run.get_dag_runs (cyclomatic 17) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:515— dag_run.get_dag_runs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hitl.update_hitl_detail (cyclomatic 17) airflow-core/src/airflow/api_fastapi/core_api/routes/public/hitl.py:172— hitl.update_hitl_detail has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DagRunWaiter.validate_result_selection (cyclomatic 17) airflow-core/src/airflow/api_fastapi/core_api/services/public/dag_run.py:266— DagRunWaiter.validate_result_selection has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
task_coordinates.resolve_task_scope (cyclomatic 17) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_coordinates.py:147— task_coordinates.resolve_task_scope has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BulkTaskInstanceService.handle_bulk_update (cyclomatic 17) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:871— BulkTaskInstanceService.handle_bulk_update has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config_command.lint_config (cyclomatic 17) airflow-core/src/airflow/cli/commands/config_command.py:856— config_command.lint_config has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._mark_task_instances_queued (cyclomatic 17) airflow-core/src/airflow/jobs/scheduler_job_runner.py:1137— SchedulerJobRunner._mark_task_instances_queued has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
0085_3_1_0_downgrade_serialized_dag_version_to_v2.downgrade (cyclomatic 17) airflow-core/src/airflow/migrations/versions/0085_3_1_0_downgrade_serialized_dag_version_to_v2.py:49— 0085_3_1_0_downgrade_serialized_dag_version_to_v2.downgrade has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskInstance._check_and_change_state_before_execution (cyclomatic 17) REDACTED:2155— TaskInstance._check_and_change_state_before_execution has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
xcom.select_producers (cyclomatic 17) airflow-core/src/airflow/models/xcom.py:641— xcom.select_producers has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
stringify.stringify (cyclomatic 17) airflow-core/src/airflow/serialization/stringify.py:137— stringify.stringify has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MappedTaskUpstreamDep._get_dep_statuses (cyclomatic 17) airflow-core/src/airflow/ti_deps/deps/mapped_task_upstream_dep.py:51— MappedTaskUpstreamDep._get_dep_statuses has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NotPreviouslySkippedDep._get_dep_statuses (cyclomatic 17) airflow-core/src/airflow/ti_deps/deps/not_previously_skipped_dep.py:65— NotPreviouslySkippedDep._get_dep_statuses has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ci_image_commands.load (cyclomatic 17) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:565— ci_image_commands.load has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
developer_commands.start_airflow (cyclomatic 17) dev/breeze/src/airflow_breeze/commands/developer_commands.py:594— developer_commands.start_airflow has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
release_candidate_command.create_tarball_release (cyclomatic 17) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:319— release_candidate_command.create_tarball_release has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.publish_docs (cyclomatic 17) REDACTED:2133— release_management_commands.publish_docs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.release_prod_images (cyclomatic 17) REDACTED:2436— release_management_commands.release_prod_images has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.check_release_files (cyclomatic 17) REDACTED:5088— release_management_commands.check_release_files has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fork_ci_gate.decide (cyclomatic 17) dev/breeze/src/airflow_breeze/utils/fork_ci_gate.py:212— fork_ci_gate.decide has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
path_utils.cleanup_python_generated_files (cyclomatic 17) dev/breeze/src/airflow_breeze/utils/path_utils.py:606— path_utils.cleanup_python_generated_files has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
eks._create_compute (cyclomatic 17) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:103— eks._create_compute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
SageMakerConditionOperator._evaluate (cyclomatic 17) providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:2266— SageMakerConditionOperator._evaluate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
GCSToS3Operator.execute (cyclomatic 17) providers/amazon/src/airflow/providers/amazon/aws/transfers/gcs_to_s3.py:168— GCSToS3Operator.execute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SparkJDBCHook._build_jdbc_application_arguments (cyclomatic 17) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc.py:184— SparkJDBCHook._build_jdbc_application_arguments has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SparkSubmitHook._process_spark_submit_log (cyclomatic 17) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:899— SparkSubmitHook._process_spark_submit_log has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesExecutor.sync (cyclomatic 17) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:554— KubernetesExecutor.sync has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OpenAIBatchAdapter._parse_result_line (cyclomatic 17) providers/common/ai/src/airflow/providers/common/ai/batch/openai.py:389— OpenAIBatchAdapter._parse_result_line has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HITLReviewMixin._poll_loop (cyclomatic 17) providers/common/ai/src/airflow/providers/common/ai/mixins/hitl_review.py:148— HITLReviewMixin._poll_loop has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LLMBranchOperator.execute (cyclomatic 17) providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py:211— LLMBranchOperator.execute has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
skills._clone_git (cyclomatic 17) providers/common/ai/src/airflow/providers/common/ai/skills.py:100— skills._clone_git has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
usage._coerce_value (cyclomatic 17) providers/common/ai/src/airflow/providers/common/ai/utils/usage.py:227— usage._coerce_value has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BaseDatabricksHook._get_token (cyclomatic 17) REDACTED:1215— BaseDatabricksHook._get_token has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (BaseDatabricksHook._a_get_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BaseDatabricksHook._a_get_token (cyclomatic 17) REDACTED:1257— BaseDatabricksHook._a_get_token has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (BaseDatabricksHook._get_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DatabricksSqlOperator._process_output (cyclomatic 17) providers/databricks/src/airflow/providers/databricks/operators/databricks_sql.py:274— DatabricksSqlOperator._process_output has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FabAirflowSecurityManagerOverride.auth_user_oauth (cyclomatic 17) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2342— FabAirflowSecurityManagerOverride.auth_user_oauth has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GitDagBundle._initialize (cyclomatic 17) providers/git/src/airflow/providers/git/bundles/git.py:176— GitDagBundle._initialize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CloudSQLDatabaseHook._validate_inputs (cyclomatic 17) REDACTED:1069— CloudSQLDatabaseHook._validate_inputs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
adls.get_fs (cyclomatic 17) providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/adls.py:32— adls.get_fs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AzureContainerInstancesOperator._monitor_logging (cyclomatic 17) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/container_instances.py:496— AzureContainerInstancesOperator._monitor_logging has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MySqlHook._get_conn_config_mysql_client (cyclomatic 17) providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:118— MySqlHook._get_conn_config_mysql_client has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OpenAIAgentSessionOperator.execute (cyclomatic 17) providers/openai/src/airflow/providers/openai/operators/agent.py:89— OpenAIAgentSessionOperator.execute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sql.emit_query_lineage (cyclomatic 17) providers/openlineage/src/airflow/providers/openlineage/api/sql.py:55— sql.emit_query_lineage has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OpenLineageListener._on_task_instance_manual_state_change (cyclomatic 17) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:858— OpenLineageListener._on_task_instance_manual_state_change has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils._extract_ol_info_from_asset_event (cyclomatic 17) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:1721— utils._extract_ol_info_from_asset_event has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
openlineage.emit_openlineage_events_for_snowflake_queries (cyclomatic 17) providers/snowflake/src/airflow/providers/snowflake/utils/openlineage.py:190— openlineage.emit_openlineage_events_for_snowflake_queries has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SSHHook.get_conn (cyclomatic 17) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:342— SSHHook.get_conn has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SSHHook.exec_ssh_client_command (cyclomatic 17) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:496— SSHHook.exec_ssh_client_command has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VerticaHook.get_conn (cyclomatic 17) providers/vertica/src/airflow/providers/vertica/hooks/vertica.py:71— VerticaHook.get_conn has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_documented_commands.extract_documented_commands (cyclomatic 17) scripts/ci/prek/check_documented_commands.py:141— check_documented_commands.extract_documented_commands has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FirstLimitVisitor.get_state (cyclomatic 17) scripts/ci/prek/check_first_limit.py:57— FirstLimitVisitor.get_state has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_registry_types_json_sync.load_types_from_py (cyclomatic 17) scripts/ci/prek/check_registry_types_json_sync.py:40— check_registry_types_json_sync.load_types_from_py has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_template_context_variable_in_sync._iter_template_context_keys_from_original_return (cyclomatic 17) scripts/ci/prek/check_template_context_variable_in_sync.py:59— check_template_context_variable_in_sync._iter_template_context_keys_from_original_return has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
upgrade_important_versions.update_pyproject_build_requires (cyclomatic 17) scripts/ci/prek/upgrade_important_versions.py:1117— upgrade_important_versions.update_pyproject_build_requires has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
generate_mprocs_config.generate_mprocs_config (cyclomatic 17) scripts/in_container/bin/generate_mprocs_config.py:49— generate_mprocs_config.generate_mprocs_config has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AirflowConfigParser.getsection (cyclomatic 17) shared/configuration/src/airflow_shared/configuration/parser.py:1975— AirflowConfigParser.getsection has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DAGNode._set_relatives (cyclomatic 17) task-sdk/src/airflow/sdk/definitions/_internal/node.py:87— DAGNode._set_relatives has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
main.pointerizeFields (cyclomatic 17) go-sdk/pkg/execution/genmodels/gen/main.go:286— main.pointerizeFields has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GraphTaskFilters.GraphTaskFilters (cyclomatic 17) airflow-core/src/airflow/ui/src/components/GraphTaskFilters.tsx:46— GraphTaskFilters.GraphTaskFilters has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Backfills.Backfills (cyclomatic 17) airflow-core/src/airflow/ui/src/pages/Dag/Backfills/Backfills.tsx:203— Backfills.Backfills has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CalendarTooltip.CalendarTooltip (cyclomatic 17) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarTooltip.tsx:45— CalendarTooltip.CalendarTooltip has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
XComModal.XComModal (cyclomatic 17) airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:51— XComModal.XComModal has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
links.getInternalRouteTo (cyclomatic 17) airflow-core/src/airflow/ui/src/utils/links.ts:290— links.getInternalRouteTo has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
serde.encodeField (cyclomatic 17) ts-sdk/src/coordinator/serde.ts:478— serde.encodeField has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
create.checkAttributes (cyclomatic 17) airflow-core/src/airflow/ui/rules/rem.js:52— create.checkAttributes has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 54, (anonymous)::fix). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SortParam._resolve (cyclomatic 16) airflow-core/src/airflow/api_fastapi/common/parameters/sort.py:59— SortParam._resolve has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClearTaskInstancesBody.validate_model (cyclomatic 16) airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_instances.py:290— ClearTaskInstancesBody.validate_model has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dag_run.trigger_dag_run (cyclomatic 16) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:780— dag_run.trigger_dag_run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GridNodeAgg.add_ti (cyclomatic 16) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:72— GridNodeAgg.add_ti has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
xcoms._build_xcom_read (cyclomatic 16) airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:180— xcoms._build_xcom_read has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
variable_command.variables_import (cyclomatic 16) airflow-core/src/airflow/cli/commands/variable_command.py:143— variable_command.variables_import has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DagBundlesManager.sync_bundles_to_db (cyclomatic 16) airflow-core/src/airflow/dag_processing/bundles/manager.py:352— DagBundlesManager.sync_bundles_to_db has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagBundlesManager.reassign_dags_with_unconfigured_bundles (cyclomatic 16) airflow-core/src/airflow/dag_processing/bundles/manager.py:460— DagBundlesManager.reassign_dags_with_unconfigured_bundles has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DagModelOperation.update_dags (cyclomatic 16) airflow-core/src/airflow/dag_processing/collection.py:758— DagModelOperation.update_dags has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchedulerJobRunner._create_dag_runs (cyclomatic 16) airflow-core/src/airflow/jobs/scheduler_job_runner.py:2705— SchedulerJobRunner._create_dag_runs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plugins_manager._validate_applies_to (cyclomatic 16) airflow-core/src/airflow/plugins_manager.py:413— plugins_manager._validate_applies_to has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
plugins_manager.get_plugin_info (cyclomatic 16) airflow-core/src/airflow/plugins_manager.py:961— plugins_manager.get_plugin_info has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cli._find_option_values (cyclomatic 16) airflow-core/src/airflow/utils/cli.py:209— cli._find_option_values has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db_cleanup._get_archived_table_names (cyclomatic 16) REDACTED:988— db_cleanup._get_archived_table_names has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
db_cleanup.run_cleanup (cyclomatic 16) REDACTED:1027— db_cleanup.run_cleanup has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
process_utils.reap_process_group (cyclomatic 16) airflow-core/src/airflow/utils/process_utils.py:58— process_utils.reap_process_group has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ci_commands.selective_check (cyclomatic 16) REDACTED:304— ci_commands.selective_check has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
developer_commands._build_python_docs (cyclomatic 16) dev/breeze/src/airflow_breeze/commands/developer_commands.py:888— developer_commands._build_python_docs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
developer_commands.down (cyclomatic 16) dev/breeze/src/airflow_breeze/commands/developer_commands.py:1167— developer_commands.down has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
production_image_commands.build (cyclomatic 16) dev/breeze/src/airflow_breeze/commands/production_image_commands.py:287— production_image_commands.build has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
release_management_commands.prepare_helm_chart_tarball (cyclomatic 16) REDACTED:4483— release_management_commands.prepare_helm_chart_tarball has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fork_ci_reconcile.run_reconcile (cyclomatic 16) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:1316— fork_ci_reconcile.run_reconcile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
packages.update_version_suffix_in_non_provider_pyproject_toml (cyclomatic 16) REDACTED:1152— packages.update_version_suffix_in_non_provider_pyproject_toml has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelectiveChecks.docs_list_as_string (cyclomatic 16) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1939— SelectiveChecks.docs_list_as_string has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
extract_parameters.compare_with_ast (cyclomatic 16) dev/registry/extract_parameters.py:1035— extract_parameters.compare_with_ast has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_versions.extract_modules_from_yaml (cyclomatic 16) dev/registry/extract_versions.py:308— extract_versions.extract_modules_from_yaml has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SuperFastPRFinder.quick_score_prs (cyclomatic 16) REDACTED:824— SuperFastPRFinder.quick_score_prs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ecs_executor_config.build_task_kwargs (cyclomatic 16) providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor_config.py:67— ecs_executor_config.build_task_kwargs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EcsRunTaskOperator.execute (cyclomatic 16) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:550— EcsRunTaskOperator.execute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
S3ToFTPOperator.execute (cyclomatic 16) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:116— S3ToFTPOperator.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
S3ToSFTPOperator.execute (cyclomatic 16) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py:140— S3ToSFTPOperator.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SqlToS3Operator._partition_dataframe (cyclomatic 16) providers/amazon/src/airflow/providers/amazon/aws/transfers/sql_to_s3.py:291— SqlToS3Operator._partition_dataframe has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
S3ToHiveOperator.execute (cyclomatic 16) providers/apache/hive/src/airflow/providers/apache/hive/transfers/s3_to_hive.py:141— S3ToHiveOperator.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AsyncKubernetesHook.watch_pod_events (cyclomatic 16) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:1197— AsyncKubernetesHook.watch_pod_events has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KubernetesPodOperator.build_pod_request_obj (cyclomatic 16) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1623— KubernetesPodOperator.build_pod_request_obj has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fingerprint._order_sets (cyclomatic 16) providers/common/ai/src/airflow/providers/common/ai/durable/fingerprint.py:400— fingerprint._order_sets has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
masking._mask (cyclomatic 16) providers/common/ai/src/airflow/providers/common/ai/utils/masking.py:91— masking._mask has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BaseSQLOperator._attach_check_facets (cyclomatic 16) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:370— BaseSQLOperator._attach_check_facets has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
databricks._handle_databricks_operator_execution (cyclomatic 16) REDACTED:99— databricks._handle_databricks_operator_execution has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FabAirflowSecurityManagerOverride.register_views (cyclomatic 16) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:493— FabAirflowSecurityManagerOverride.register_views has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
0000_1_4_0_create_ab_tables_if_missing.upgrade (cyclomatic 16) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:45— 0000_1_4_0_create_ab_tables_if_missing.upgrade has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BigQueryDataTransferServiceStartTransferRunsOperator.get_openlineage_facets_on_complete (cyclomatic 16) providers/google/src/airflow/providers/google/cloud/operators/bigquery_dts.py:418— BigQueryDataTransferServiceStartTransferRunsOperator.get_openlineage_facets_on_complete has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataprocCreateClusterOperator.execute (cyclomatic 16) providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:899— DataprocCreateClusterOperator.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
IBMMQMessageQueueProvider.trigger_kwargs (cyclomatic 16) providers/ibm/mq/src/airflow/providers/ibm/mq/queues/mq.py:53— IBMMQMessageQueueProvider.trigger_kwargs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AzureBatchOperator._check_inputs (cyclomatic 16) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/batch.py:200— AzureBatchOperator._check_inputs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OracleHook.insert_rows (cyclomatic 16) providers/oracle/src/airflow/providers/oracle/hooks/oracle.py:306— OracleHook.insert_rows has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SnowflakeHook._build_base_conn_config (cyclomatic 16) providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:517— SnowflakeHook._build_base_conn_config has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SnowflakeHook._add_authentication_config (cyclomatic 16) providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:615— SnowflakeHook._add_authentication_config has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SnowflakeSqlApiHook.execute_query (cyclomatic 16) providers/snowflake/src/airflow/providers/snowflake/hooks/sql_api.py:139— SnowflakeSqlApiHook.execute_query has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BteqHook.execute_bteq_script_at_local (cyclomatic 16) providers/teradata/src/airflow/providers/teradata/hooks/bteq.py:242— BteqHook.execute_bteq_script_at_local has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
check_metrics_synced_with_the_registry.extract_metric_name_from_ast_node (cyclomatic 16) scripts/ci/prek/check_metrics_synced_with_the_registry.py:182— check_metrics_synced_with_the_registry.extract_metric_name_from_ast_node has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check_shared_distributions_usage.add_missing_entries_to_section (cyclomatic 16) scripts/ci/prek/check_shared_distributions_usage.py:428— check_shared_distributions_usage.add_missing_entries_to_section has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AllowlistManager.check (cyclomatic 16) scripts/ci/prek/common_prek_utils.py:1118— AllowlistManager.check has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
extract_permissions._extract_routers (cyclomatic 16) scripts/ci/prek/extract_permissions.py:147— extract_permissions._extract_routers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BaseSensorOperator.execute (cyclomatic 16) task-sdk/src/airflow/sdk/bases/sensor.py:183— BaseSensorOperator.execute has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bundlefooter.Read (cyclomatic 16) REDACTED:133— bundlefooter.Read has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClearTaskInstanceConfirmationDialog.ClearTaskInstanceConfirmationDialog (cyclomatic 16) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceConfirmationDialog.tsx:45— ClearTaskInstanceConfirmationDialog.ClearTaskInstanceConfirmationDialog has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DurationChart.DurationChart (cyclomatic 16) airflow-core/src/airflow/ui/src/components/DurationChart.tsx:97— DurationChart.DurationChart has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 190, 126, 133, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PoolBar.PoolBar (cyclomatic 16) airflow-core/src/airflow/ui/src/components/PoolBar.tsx:35— PoolBar.PoolBar has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 82, 60, 73, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
useDateRangeFilter.useDateRangeFilter.validateInputs (cyclomatic 16) airflow-core/src/airflow/ui/src/hooks/useDateRangeFilter.ts:181— useDateRangeFilter.useDateRangeFilter.validateInputs has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Events.Events (cyclomatic 16) airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:186— Events.Events has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeadlineStatusModal.DeadlineStatusModal (cyclomatic 16) airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx:48— DeadlineStatusModal.DeadlineStatusModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TodoComment repeated across 10 files providers/ssh/tests/unit/ssh/hooks/test_ssh.py:222— The identical TodoComment appears in 10 files (10 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 10 independent debts. Fix the systemic cause once rather than file-by-file. Text: "# TODO: Potential performance issue, converted setup_class to a setup_connections function level fixture". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
dependencies.get_data_dependencies (cognitive 148) airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:431— dependencies.get_data_dependencies has cognitive complexity 148 (threshold 15). Drivers by points: if/else 34 (103 pts), loops 13 (36 pts), boolean chains 5, error handling 1 (4 pts) (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances.post_clear_task_instances (cognitive 126) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:1044— task_instances.post_clear_task_instances has cognitive complexity 126 (threshold 15). Drivers by points: if/else 42 (79 pts), boolean chains 17, ternaries 6 (17 pts), loops 3 (7 pts), error handling 3 (6 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_metadata.main (cognitive 118) REDACTED:535— extract_metadata.main has cognitive complexity 118 (threshold 15). Drivers by points: if/else 35 (85 pts), loops 10 (21 pts), error handling 3 (9 pts), ternaries 1 (3 pts) (nesting depth added 69). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
extract_parameters.discover_classes_from_provider (cognitive 109) dev/registry/extract_parameters.py:779— extract_parameters.discover_classes_from_provider has cognitive complexity 109 (threshold 15). Drivers by points: if/else 19 (55 pts), loops 14 (26 pts), ternaries 7 (13 pts), boolean chains 9, error handling 2 (6 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_provider_yaml_files_check.check_all_provider_classes_are_registered (cognitive 98) scripts/in_container/run_provider_yaml_files_check.py:715— run_provider_yaml_files_check.check_all_provider_classes_are_registered has cognitive complexity 98 (threshold 15). Drivers by points: if/else 18 (63 pts), loops 10 (24 pts), error handling 3 (9 pts), boolean chains 2 (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dependencies.get_scheduling_dependencies (cognitive 97) airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:225— dependencies.get_scheduling_dependencies has cognitive complexity 97 (threshold 15). Drivers by points: if/else 19 (59 pts), loops 8 (19 pts), ternaries 2 (10 pts), boolean chains 6, error handling 1 (3 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SSHHook.__init__ (cognitive 97) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:137— SSHHook.__init__ has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (83 pts), boolean chains 14 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
taskinstance.clear_task_instances (cognitive 94) REDACTED:431— taskinstance.clear_task_instances has cognitive complexity 94 (threshold 15). Drivers by points: if/else 27 (63 pts), boolean chains 12, ternaries 3 (11 pts), loops 5 (8 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
fab_permissions_doc._fab_route_entries (cognitive 93) scripts/ci/prek/fab_permissions_doc.py:293— fab_permissions_doc._fab_route_entries has cognitive complexity 93 (threshold 15). Drivers by points: if/else 15 (69 pts), loops 5 (15 pts), boolean chains 5, ternaries 1 (4 pts) (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner.process_executor_events (cognitive 92) airflow-core/src/airflow/jobs/scheduler_job_runner.py:1469— SchedulerJobRunner.process_executor_events has cognitive complexity 92 (threshold 15). Drivers by points: if/else 27 (59 pts), ternaries 4 (14 pts), boolean chains 10, loops 5 (6 pts), error handling 1 (3 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances.ti_update_state (cognitive 84) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:452— task_instances.ti_update_state has cognitive complexity 84 (threshold 15). Drivers by points: if/else 27 (49 pts), error handling 9 (16 pts), ternaries 6 (12 pts), boolean chains 6, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_dependencies.generate_providers_metadata_for_provider (cognitive 83) REDACTED:367— provider_dependencies.generate_providers_metadata_for_provider has cognitive complexity 83 (threshold 15). Drivers by points: if/else 25 (66 pts), boolean chains 9, loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ci_commands.upgrade (cognitive 78) REDACTED:838— ci_commands.upgrade has cognitive complexity 78 (threshold 15). Drivers by points: if/else 38 (62 pts), ternaries 7 (9 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._select_task_instances_to_queue (cognitive 77) airflow-core/src/airflow/jobs/scheduler_job_runner.py:715— SchedulerJobRunner._select_task_instances_to_queue has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (62 pts), loops 5 (8 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
get_important_pr_candidates.main (cognitive 75) REDACTED:974— get_important_pr_candidates.main has cognitive complexity 75 (threshold 15). Drivers by points: if/else 25 (59 pts), ternaries 2 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ModuleAnalyzer._extract_keys_from_local_var (cognitive 75) scripts/ci/prek/check_trigger_serialize_init.py:221— ModuleAnalyzer._extract_keys_from_local_var has cognitive complexity 75 (threshold 15). Drivers by points: if/else 16 (54 pts), loops 5 (11 pts), boolean chains 10 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.generate_issue_content_providers (cognitive 73) REDACTED:2862— release_management_commands.generate_issue_content_providers has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (45 pts), error handling 4 (13 pts), loops 6 (9 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksAgentHook.invoke_agent (cognitive 71) providers/databricks/src/airflow/providers/databricks/hooks/agent.py:139— DatabricksAgentHook.invoke_agent has cognitive complexity 71 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 15, error handling 4 (8 pts), ternaries 8, loops 2 (6 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_permissions.extract_from_file (cognitive 68) scripts/ci/prek/extract_permissions.py:312— extract_permissions.extract_from_file has cognitive complexity 68 (threshold 15). Drivers by points: if/else 13 (48 pts), ternaries 2 (10 pts), loops 3 (7 pts), boolean chains 2, error handling 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fork_ci_reconcile.classify (cognitive 66) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:422— fork_ci_reconcile.classify has cognitive complexity 66 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 15, ternaries 4 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grid.summarize_loop_run (cognitive 65) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:384— grid.summarize_loop_run has cognitive complexity 65 (threshold 15). Drivers by points: if/else 17 (41 pts), ternaries 8 (16 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ui_commands.check_translation_completeness (cognitive 65) dev/breeze/src/airflow_breeze/commands/ui_commands.py:650— ui_commands.check_translation_completeness has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (43 pts), loops 6 (16 pts), boolean chains 6 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ci_audit.run_audit (cognitive 65) dev/breeze/src/airflow_breeze/utils/ci_audit.py:141— ci_audit.run_audit has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 19, ternaries 8 (15 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
confirm.prompt_triage_action (cognitive 63) dev/breeze/src/airflow_breeze/utils/confirm.py:268— confirm.prompt_triage_action has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (51 pts), boolean chains 5, loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DAG.test (cognitive 63) task-sdk/src/airflow/sdk/definitions/dag.py:1257— DAG.test has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (42 pts), ternaries 5 (7 pts), loops 4 (6 pts), boolean chains 4, error handling 1 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_documentation.update_release_notes (cognitive 62) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:871— provider_documentation.update_release_notes has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (58 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GCSToBigQueryOperator.execute (cognitive 62) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:362— GCSToBigQueryOperator.execute has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (46 pts), loops 2 (8 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WinRMHook.create_protocol (cognitive 62) providers/microsoft/winrm/src/airflow/providers/microsoft/winrm/hooks/winrm.py:131— WinRMHook.create_protocol has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (61 pts), error handling 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
assign_cherry_picked_prs_with_milestone.assign_prs (cognitive 61) REDACTED:250— assign_cherry_picked_prs_with_milestone.assign_prs has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (49 pts), error handling 2 (5 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseSQLToGCSOperator._write_local_data_files (cognitive 61) providers/google/src/airflow/providers/google/cloud/transfers/sql_to_gcs.py:235— BaseSQLToGCSOperator._write_local_data_files has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (56 pts), boolean chains 4, loops 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AirflowReleaseValidator.validate_reproducible_build (cognitive 60) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:221— AirflowReleaseValidator.validate_reproducible_build has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (40 pts), loops 3 (12 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstanceTooltip.TaskInstanceTooltip (cognitive 59) airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx:50— TaskInstanceTooltip.TaskInstanceTooltip has cognitive complexity 59 (threshold 15). Drivers by points: ternaries 16 (45 pts), boolean chains 14 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
verify_providers.import_all_classes (cognitive 58) scripts/in_container/verify_providers.py:129— verify_providers.import_all_classes has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 4 (8 pts), error handling 2 (6 pts), boolean chains 5 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins_manager._get_ui_plugins (cognitive 57) airflow-core/src/airflow/plugins_manager.py:525— plugins_manager._get_ui_plugins has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 9 (16 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClearTaskInstanceDialog.ClearTaskInstanceDialog (cognitive 57) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:135— ClearTaskInstanceDialog.ClearTaskInstanceDialog has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 28 (36 pts), boolean chains 15, if/else 4, loops 2 (nesting depth added 8). Of this number, 37 points are the body's own statements and 20 belong to 8 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TaskLogContent.TaskLogContent (cognitive 57) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:77— TaskLogContent.TaskLogContent has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24, ternaries 14 (20 pts), boolean chains 13 (nesting depth added 6). Most of this is not in the body itself: 5 of the 57 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 366, a function literal at line 240, a function literal at line 278, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FabAirflowSecurityManagerOverride.auth_user_ldap (cognitive 56) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2072— FabAirflowSecurityManagerOverride.auth_user_ldap has cognitive complexity 56 (threshold 15). Drivers by points: if/else 29 (46 pts), boolean chains 6, error handling 3 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config_command.update_config (cognitive 55) airflow-core/src/airflow/cli/commands/config_command.py:943— config_command.update_config has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (34 pts), ternaries 9 (10 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellParams.compose_file (cognitive 55) dev/breeze/src/airflow_breeze/params/shell_params.py:368— ShellParams.compose_file has cognitive complexity 55 (threshold 15). Drivers by points: if/else 29 (39 pts), ternaries 2 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderStructuredLog.renderStructuredLogImpl (cognitive 55) airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx:181— renderStructuredLog.renderStructuredLogImpl has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (28 pts), ternaries 6 (16 pts), boolean chains 10, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.transformGanttData (cognitive 55) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts:90— utils.transformGanttData has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 7 (21 pts), boolean chains 5, loops 1 (nesting depth added 30). Most of this is not in the body itself: 1 of the 55 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 137, 108). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
task_instances._create_ti_state_update_query_and_update_state (cognitive 54) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:896— task_instances._create_ti_state_update_query_and_update_state has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (47 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
check_metrics_synced_with_the_registry.main (cognitive 54) scripts/ci/prek/check_metrics_synced_with_the_registry.py:425— check_metrics_synced_with_the_registry.main has cognitive complexity 54 (threshold 15). Drivers by points: loops 10 (27 pts), if/else 12 (21 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TriggerDAGForm.TriggerDAGForm (cognitive 53) airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:72— TriggerDAGForm.TriggerDAGForm has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 11 (21 pts), boolean chains 18, if/else 11 (14 pts) (nesting depth added 13). Of this number, 22 points are the body's own statements and 31 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag-graph.buildDagGraph (cognitive 53) ts-sdk/src/sdk/dag-graph.ts:73— dag-graph.buildDagGraph has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 8 (14 pts), ternaries 7 (9 pts), boolean chains 4 (nesting depth added 19). Of this number, 40 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagSerialization.conversion_v1_to_v2 (cognitive 52) airflow-core/src/airflow/serialization/serialized_objects.py:2000— DagSerialization.conversion_v1_to_v2 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 9 (17 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sbom_commands.update_sbom_information (cognitive 52) dev/breeze/src/airflow_breeze/commands/sbom_commands.py:236— sbom_commands.update_sbom_information has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 6 (14 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesJobWatcher.process_status (cognitive 51) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:236— KubernetesJobWatcher.process_status has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (30 pts), ternaries 3 (10 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DataFusionEngine._get_credentials (cognitive 51) providers/common/sql/src/airflow/providers/common/sql/datafusion/engine.py:151— DataFusionEngine._get_credentials has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 8, ternaries 2 (6 pts), loops 2 (4 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
install_airflow_and_providers.find_installation_spec (cognitive 51) scripts/in_container/install_airflow_and_providers.py:334— install_airflow_and_providers.find_installation_spec has cognitive complexity 51 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 6, ternaries 3 (5 pts), error handling 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataTable.DataTable (cognitive 51) airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:133— DataTable.DataTable has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 16 (26 pts), boolean chains 18, if/else 5 (7 pts) (nesting depth added 12). Of this number, 37 points are the body's own statements and 14 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperatorSerialization.populate_operator (cognitive 50) airflow-core/src/airflow/serialization/serialized_objects.py:1132— OperatorSerialization.populate_operator has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 6 (10 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAirflowSecurityManagerOverride._sync_dag_view_permissions (cognitive 50) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:1083— FabAirflowSecurityManagerOverride._sync_dag_view_permissions has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (34 pts), loops 6 (14 pts), ternaries 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3KeySensor._check_key (cognitive 49) providers/amazon/src/airflow/providers/amazon/aws/sensors/s3.py:109— S3KeySensor._check_key has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (13 pts), error handling 1 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSubmitHook._build_spark_common_args (cognitive 48) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:622— SparkSubmitHook._build_spark_common_args has cognitive complexity 48 (threshold 15). Drivers by points: if/else 34 (40 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SecretsMasker._merge (cognitive 48) shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:443— SecretsMasker._merge has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 11, loops 2 (4 pts), ternaries 1 (4 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStreamFilter.TaskStreamFilter (cognitive 48) airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx:28— TaskStreamFilter.TaskStreamFilter has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 14 (20 pts), boolean chains 18, if/else 10 (nesting depth added 6). Of this number, 28 points are the body's own statements and 20 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
xcoms.get_mapped_xcom_by_slice (cognitive 47) airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:420— xcoms.get_mapped_xcom_by_slice has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProvidersManager._import_hook (cognitive 47) airflow-core/src/airflow/providers_manager.py:1052— ProvidersManager._import_hook has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reproduce_ci.build_reproduction_command_from_context (cognitive 47) dev/breeze/src/airflow_breeze/utils/reproduce_ci.py:62— reproduce_ci.build_reproduction_command_from_context has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser.write_custom_config (cognitive 46) airflow-core/src/airflow/configuration.py:278— AirflowConfigParser.write_custom_config has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_command.remove_old_release (cognitive 46) dev/breeze/src/airflow_breeze/commands/release_command.py:226— release_command.remove_old_release has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SFTPHook.transfer (cognitive 46) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:800— SFTPHook.transfer has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 3 (6 pts), error handling 1 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JobsPage.JobsPage (cognitive 46) providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:33— JobsPage.JobsPage has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 13 (27 pts), boolean chains 17, if/else 2 (nesting depth added 14). Of this number, 26 points are the body's own statements and 20 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerRunner.run_trigger (cognitive 45) airflow-core/src/airflow/jobs/triggerer_job_runner.py:1731— TriggerRunner.run_trigger has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 7 (15 pts), ternaries 7 (9 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperatorSerialization._is_excluded (cognitive 45) airflow-core/src/airflow/serialization/serialized_objects.py:1471— OperatorSerialization._is_excluded has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 5 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
db_cleanup._do_delete (cognitive 45) REDACTED:477— db_cleanup._do_delete has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (26 pts), ternaries 3 (8 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSubmitHook._poll_k8s_driver_via_api (cognitive 45) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:1247— SparkSubmitHook._poll_k8s_driver_via_api has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
default_celery.get_default_celery_config (cognitive 45) providers/celery/src/airflow/providers/celery/executors/default_celery.py:135— default_celery.get_default_celery_config has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 7, error handling 4 (5 pts), ternaries 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.prepare_provider_documentation (cognitive 44) REDACTED:1014— release_management_commands.prepare_provider_documentation has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (23 pts), error handling 6 (12 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks.skip_prek_hooks (cognitive 44) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1981— SelectiveChecks.skip_prek_hooks has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
execution.runTriggerDagRun (cognitive 44) go-sdk/pkg/execution/trigger_runner.go:99— execution.runTriggerDagRun has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30 (42 pts), boolean chains 1, loops 1 (nesting depth added 12). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagsList.DagsList (cognitive 44) airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:138— DagsList.DagsList has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 17 (26 pts), if/else 11, boolean chains 7 (nesting depth added 9). Of this number, 33 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SerializedDAG.clear (cognitive 43) airflow-core/src/airflow/serialization/definitions/dag.py:1217— SerializedDAG.clear has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.generate_issue_content (cognitive 43) REDACTED:4711— release_management_commands.generate_issue_content has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 4 (12 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3ToFTPOperator.execute (cognitive 43) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:116— S3ToFTPOperator.execute has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (9 pts), ternaries 1 (5 pts), boolean chains 3 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
S3ToSFTPOperator.execute (cognitive 43) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py:140— S3ToSFTPOperator.execute has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (9 pts), ternaries 1 (5 pts), boolean chains 3 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BigQueryCursor._prepare_query_configuration (cognitive 43) providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:2085— BigQueryCursor._prepare_query_configuration has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
emission_policy._parse_rule (cognitive 43) providers/openlineage/src/airflow/providers/openlineage/utils/emission_policy.py:529— emission_policy._parse_rule has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 7, error handling 1 (4 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
OracleHook.get_conn (cognitive 43) providers/oracle/src/airflow/providers/oracle/hooks/oracle.py:141— OracleHook.get_conn has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_migration_patterns._collect_ddl_table_names (cognitive 43) scripts/ci/prek/check_migration_patterns.py:304— check_migration_patterns._collect_ddl_table_names has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GanttTimeline.GanttTimeline (cognitive 43) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:113— GanttTimeline.GanttTimeline has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 27 (28 pts), boolean chains 12, if/else 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 346, a function literal at line 293, segmentLayout, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
connection-builder.renderField (cognitive 43) registry/src/js/connection-builder.js:194— connection-builder.renderField has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 8, ternaries 3 (6 pts) (nesting depth added 14). Of this number, 41 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun.update_state (cognitive 42) airflow-core/src/airflow/models/dagrun.py:1279— DagRun.update_state has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun.schedule_tis (cognitive 42) airflow-core/src/airflow/models/dagrun.py:2652— DagRun.schedule_tis has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_log_address.prepare_task_log_contexts (cognitive 42) REDACTED:174— task_log_address.prepare_task_log_contexts has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 5 (12 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SFTPToS3Operator.execute (cognitive 42) providers/amazon/src/airflow/providers/amazon/aws/transfers/sftp_to_s3.py:177— SFTPToS3Operator.execute has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (9 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
check_common_compat_lazy_imports.extract_type_checking_names (cognitive 42) scripts/ci/prek/check_common_compat_lazy_imports.py:80— check_common_compat_lazy_imports.extract_type_checking_names has cognitive complexity 42 (threshold 15). Drivers by points: loops 4 (17 pts), ternaries 2 (14 pts), if/else 3 (10 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
check_registry_types_json_sync.load_types_from_py (cognitive 42) scripts/ci/prek/check_registry_types_json_sync.py:40— check_registry_types_json_sync.load_types_from_py has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 3 (8 pts), boolean chains 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_provider_yaml_files_check.check_hook_classes_with_conn_type_are_registered (cognitive 42) scripts/in_container/run_provider_yaml_files_check.py:652— run_provider_yaml_files_check.check_hook_classes_with_conn_type_are_registered has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (32 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseSetupTeardownContext.set_work_task_roots_and_leaves (cognitive 42) task-sdk/src/airflow/sdk/definitions/_internal/setup_teardown.py:258— BaseSetupTeardownContext.set_work_task_roots_and_leaves has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskNode.TaskNode (cognitive 42) airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:42— TaskNode.TaskNode has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 22 (29 pts), boolean chains 7, if/else 6 (nesting depth added 7). Of this number, 39 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WorkerPage.WorkerPage (cognitive 42) providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:49— WorkerPage.WorkerPage has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 12 (28 pts), boolean chains 7, if/else 7 (nesting depth added 16). Of this number, 22 points are the body's own statements and 20 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._mark_task_instances_queued (cognitive 41) airflow-core/src/airflow/jobs/scheduler_job_runner.py:1137— SchedulerJobRunner._mark_task_instances_queued has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 4 (9 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ui_commands.print_translation_progress (cognitive 41) dev/breeze/src/airflow_breeze/commands/ui_commands.py:395— ui_commands.print_translation_progress has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (25 pts), ternaries 3 (7 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
packages.regenerate_pyproject_toml (cognitive 41) REDACTED:915— packages.regenerate_pyproject_toml has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 4 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RedshiftCreateClusterOperator.execute (cognitive 41) providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:307— RedshiftCreateClusterOperator.execute has cognitive complexity 41 (threshold 15). Drivers by points: if/else 32 (36 pts), error handling 2 (5 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FTPToS3Operator.execute (cognitive 41) providers/amazon/src/airflow/providers/amazon/aws/transfers/ftp_to_s3.py:138— FTPToS3Operator.execute has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (13 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
KubernetesPodOperator.trigger_reentry (cognitive 41) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1129— KubernetesPodOperator.trigger_reentry has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (10 pts), boolean chains 7, error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_operators_init._collect_sanctioned_uses (cognitive 41) scripts/ci/prek/validate_operators_init.py:298— validate_operators_init._collect_sanctioned_uses has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 4 (12 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_fix_ownership.change_ownership_of_files (cognitive 41) scripts/in_container/run_fix_ownership.py:30— run_fix_ownership.change_ownership_of_files has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 5, loops 3 (5 pts), error handling 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRef.addTask (cognitive 41) go-sdk/airflow/dag.go:243— DagRef.addTask has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.runPack (cognitive 41) go-sdk/cmd/airflow-go-pack/pack.go:54— main.runPack has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25 (33 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DagBreadcrumb.DagBreadcrumb (cognitive 41) airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx:127— DagBreadcrumb.DagBreadcrumb has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 15, ternaries 7 (14 pts), if/else 10 (12 pts) (nesting depth added 9). Of this number, 39 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetSchedule.AssetSchedule (cognitive 41) airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx:72— AssetSchedule.AssetSchedule has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 7 (13 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 15). Of this number, 37 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_command._get_ti (cognitive 40) airflow-core/src/airflow/cli/commands/task_command.py:178— task_command._get_ti has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (31 pts), error handling 2 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._create_dag_runs_asset_triggered (cognitive 40) airflow-core/src/airflow/jobs/scheduler_job_runner.py:2971— SchedulerJobRunner._create_dag_runs_asset_triggered has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (29 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedDAG.partial_subset (cognitive 40) airflow-core/src/airflow/serialization/definitions/dag.py:299— SerializedDAG.partial_subset has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
eval.main (cognitive 40) dev/skill-evals/eval.py:291— eval.main has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 10, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
build_docs.build_docs (cognitive 40) devel-common/src/docs/build_docs.py:469— build_docs.build_docs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 4 (5 pts), ternaries 4, error handling 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BteqHook._transfer_to_and_execute_bteq_on_remote (cognitive 40) providers/teradata/src/airflow/providers/teradata/hooks/bteq.py:145— BteqHook._transfer_to_and_execute_bteq_on_remote has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 9, error handling 4, ternaries 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_usage.ensure_shared_in_workspace_and_dev (cognitive 40) scripts/ci/prek/check_shared_distributions_usage.py:486— check_shared_distributions_usage.ensure_shared_in_workspace_and_dev has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (25 pts), loops 5 (8 pts), boolean chains 6, error handling 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
check_shared_distributions_usage.main (cognitive 40) scripts/ci/prek/check_shared_distributions_usage.py:726— check_shared_distributions_usage.main has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 5 (8 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser._replace_section_config_with_display_sources (cognitive 40) shared/configuration/src/airflow_shared/configuration/parser.py:1039— AirflowConfigParser._replace_section_config_with_display_sources has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (33 pts), boolean chains 6, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagFileProcessorManager._refresh_dag_bundles (cognitive 39) airflow-core/src/airflow/dag_processing/manager.py:880— DagFileProcessorManager._refresh_dag_bundles has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (20 pts), error handling 6 (15 pts), boolean chains 3, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._purge_task_instances_without_heartbeats (cognitive 39) airflow-core/src/airflow/jobs/scheduler_job_runner.py:4010— SchedulerJobRunner._purge_task_instances_without_heartbeats has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 3 (8 pts), boolean chains 5, error handling 2 (5 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
taskinstance.select_loop_clear_scope (cognitive 39) REDACTED:670— taskinstance.select_loop_clear_scope has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 6 (11 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ui_commands.print_language_summary (cognitive 39) dev/breeze/src/airflow_breeze/commands/ui_commands.py:343— ui_commands.print_language_summary has cognitive complexity 39 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 6 (17 pts), boolean chains 1 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
EcsRunTaskOperator._check_success_task (cognitive 39) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:790— EcsRunTaskOperator._check_success_task has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsumeFromTopicOperator.execute (cognitive 39) providers/apache/kafka/src/airflow/providers/apache/kafka/operators/consume.py:132— ConsumeFromTopicOperator.execute has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
celery_command.worker (cognitive 39) providers/celery/src/airflow/providers/celery/cli/celery_command.py:198— celery_command.worker has cognitive complexity 39 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
sql_validation.collect_table_references (cognitive 39) providers/common/ai/src/airflow/providers/common/ai/utils/sql_validation.py:254— sql_validation.collect_table_references has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 5, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_prek_utils.find_import_violations (cognitive 39) scripts/ci/prek/common_prek_utils.py:773— common_prek_utils.find_import_violations has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_permissions._extract_routers (cognitive 39) scripts/ci/prek/extract_permissions.py:147— extract_permissions._extract_routers has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (20 pts), loops 4 (12 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DecoratedOperator.__init__ (cognitive 39) task-sdk/src/airflow/sdk/bases/decorator.py:320— DecoratedOperator.__init__ has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 8, error handling 2, loops 1 (2 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DAG.partial_subset (cognitive 39) task-sdk/src/airflow/sdk/definitions/dag.py:928— DAG.partial_subset has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dagrun.clear_partition_runs (cognitive 38) airflow-core/src/airflow/models/dagrun.py:2900— dagrun.clear_partition_runs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedDagModel.write_dag (cognitive 38) airflow-core/src/airflow/models/serialized_dag.py:608— SerializedDagModel.write_dag has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 6, loops 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance.expand_mapped_task (cognitive 38) REDACTED:3163— TaskInstance.expand_mapped_task has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 7, loops 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_SharedStreamGroup._poll (cognitive 38) airflow-core/src/airflow/triggers/shared_stream.py:697— _SharedStreamGroup._poll has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 5 (12 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
docker_command_utils.bring_compose_projects_down (cognitive 38) dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:1079— docker_command_utils.bring_compose_projects_down has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 8, loops 4 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
path_utils.cleanup_python_generated_files (cognitive 38) dev/breeze/src/airflow_breeze/utils/path_utils.py:606— path_utils.cleanup_python_generated_files has cognitive complexity 38 (threshold 15). Drivers by points: error handling 5 (17 pts), if/else 9 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_idea._find_jetbrains_pids (cognitive 38) REDACTED:406— setup_idea._find_jetbrains_pids has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 4 (12 pts), loops 2 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesPodOperator.__init__ (cognitive 38) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:327— KubernetesPodOperator.__init__ has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 15, if/else 5 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sql_validation._is_in_scope_cte (cognitive 38) providers/common/ai/src/airflow/providers/common/ai/utils/sql_validation.py:205— sql_validation._is_in_scope_cte has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (26 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openlineage.emit_openlineage_events_for_databricks_queries (cognitive 38) providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:149— openlineage.emit_openlineage_events_for_databricks_queries has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 4 (8 pts), boolean chains 6, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BteqOperator.execute (cognitive 38) providers/teradata/src/airflow/providers/teradata/operators/bteq.py:116— BteqOperator.execute has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 7, error handling 1 (3 pts), ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_documented_commands.extract_documented_commands (cognitive 38) scripts/ci/prek/check_documented_commands.py:141— check_documented_commands.extract_documented_commands has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_pre_extras_install.validate_manifest (cognitive 38) scripts/in_container/run_pre_extras_install.py:76— run_pre_extras_install.validate_manifest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 4, loops 3 (4 pts), error handling 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Plan.resolveLoneStructParam (cognitive 38) REDACTED:238— Plan.resolveLoneStructParam has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (30 pts), loops 5, boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BulkTaskInstanceService._handle_regional_bulk (cognitive 37) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:790— BulkTaskInstanceService._handle_regional_bulk has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances.get_previous_task_instance (cognitive 37) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:1608— task_instances.get_previous_task_instance has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0085_3_1_0_downgrade_serialized_dag_version_to_v2.downgrade (cognitive 37) airflow-core/src/airflow/migrations/versions/0085_3_1_0_downgrade_serialized_dag_version_to_v2.py:49— 0085_3_1_0_downgrade_serialized_dag_version_to_v2.downgrade has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (24 pts), error handling 4 (9 pts), loops 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.get_uri (cognitive 37) REDACTED:313— Connection.get_uri has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3KeyTrigger.run (cognitive 37) providers/amazon/src/airflow/providers/amazon/aws/triggers/s3.py:110— S3KeyTrigger.run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 3 (11 pts), error handling 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
kubernetes_command.cleanup_pods (cognitive 37) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/cli/kubernetes_command.py:156— kubernetes_command.cleanup_pods has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9, error handling 1 (4 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_VaultClient.__init__ (cognitive 37) REDACTED:106— _VaultClient.__init__ has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 7 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IBMMQMessageQueueProvider.trigger_kwargs (cognitive 37) providers/ibm/mq/src/airflow/providers/ibm/mq/queues/mq.py:53— IBMMQMessageQueueProvider.trigger_kwargs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (5 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableauOperator.execute (cognitive 37) providers/tableau/src/airflow/providers/tableau/operators/tableau.py:133— TableauOperator.execute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (26 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances._get_task_group_task_instances (cognitive 36) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:329— task_instances._get_task_group_task_instances has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (7 pts), boolean chains 6 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
connection_command.connections_add (cognitive 36) airflow-core/src/airflow/cli/commands/connection_command.py:301— connection_command.connections_add has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
production_image_commands.build (cognitive 36) dev/breeze/src/airflow_breeze/commands/production_image_commands.py:287— production_image_commands.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_utils.run_command (cognitive 36) dev/breeze/src/airflow_breeze/utils/run_utils.py:71— run_utils.run_command has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 6, ternaries 3 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks.provider_dependency_bump (cognitive 36) dev/breeze/src/airflow_breeze/utils/selective_checks.py:2467— SelectiveChecks.provider_dependency_bump has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (9 pts), ternaries 2 (9 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
databricks._handle_databricks_operator_execution (cognitive 36) REDACTED:99— databricks._handle_databricks_operator_execution has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
check_example_dag_shell_commands.check_file (cognitive 36) scripts/ci/prek/check_example_dag_shell_commands.py:218— check_example_dag_shell_commands.check_file has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (25 pts), loops 3 (7 pts), boolean chains 3, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_excluded_provider_markers._check_dependency (cognitive 36) scripts/ci/prek/check_excluded_provider_markers.py:82— check_excluded_provider_markers._check_dependency has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 3 (6 pts), loops 3 (5 pts), boolean chains 4, error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DetailsLayout.DetailsLayout (cognitive 36) airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:87— DetailsLayout.DetailsLayout has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 15 (23 pts), boolean chains 8, if/else 5 (nesting depth added 8). Of this number, 28 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun._check_for_removed_or_restored_tasks (cognitive 35) airflow-core/src/airflow/models/dagrun.py:2148— DagRun._check_for_removed_or_restored_tasks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 4 (9 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance.register_asset_changes_in_db (cognitive 35) REDACTED:2383— TaskInstance.register_asset_changes_in_db has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (8 pts), loops 5 (8 pts), boolean chains 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config_command.lint (cognitive 35) airflow-ctl/src/airflowctl/ctl/commands/config_command.py:736— config_command.lint has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 7, loops 2 (3 pts), error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReleaseValidator.validate_prerequisites (cognitive 35) dev/breeze/src/airflow_breeze/utils/release_validator.py:268— ReleaseValidator.validate_prerequisites has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (31 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSubmitHook._process_spark_submit_log (cognitive 35) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:899— SparkSubmitHook._process_spark_submit_log has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (31 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAirflowSecurityManagerOverride.add_permissions_view (cognitive 35) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:1173— FabAirflowSecurityManagerOverride.add_permissions_view has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GCSTimeSpanFileTransformOperator.execute (cognitive 35) providers/google/src/airflow/providers/google/cloud/operators/gcs.py:911— GCSTimeSpanFileTransformOperator.execute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 5 (12 pts), error handling 2 (4 pts), ternaries 3, boolean chains 1 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BigQueryIntervalCheckTrigger.run (cognitive 35) providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py:496— BigQueryIntervalCheckTrigger.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 3 (11 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtractorManager.extract_metadata (cognitive 35) providers/openlineage/src/airflow/providers/openlineage/extractors/manager.py:124— ExtractorManager.extract_metadata has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (28 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeaviateHook.create_or_replace_document_objects (cognitive 35) providers/weaviate/src/airflow/providers/weaviate/hooks/weaviate.py:905— WeaviateHook.create_or_replace_document_objects has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SecretsMasker.add_mask (cognitive 35) shared/secrets_masker/src/airflow_shared/secrets_masker/secrets_masker.py:604— SecretsMasker.add_mask has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances.get_task_instances (cognitive 34) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:561— task_instances.get_task_instances has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0101_3_2_0_ui_improvements_for_deadlines.migrate_deadline_alert_data_back_to_serialized_dag (cognitive 34) REDACTED:785— 0101_3_2_0_ui_improvements_for_deadlines.migrate_deadline_alert_data_back_to_serialized_dag has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 2 (6 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NotPreviouslySkippedDep._get_dep_statuses (cognitive 34) airflow-core/src/airflow/ti_deps/deps/not_previously_skipped_dep.py:65— NotPreviouslySkippedDep._get_dep_statuses has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 2 (5 pts), boolean chains 2, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsConnectionWrapper.__post_init__ (cognitive 34) providers/amazon/src/airflow/providers/amazon/aws/utils/connection_wrapper.py:161— AwsConnectionWrapper.__post_init__ has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesJobOperator.execute_complete (cognitive 34) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:290— KubernetesJobOperator.execute_complete has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, loops 3 (5 pts), error handling 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VaultHook.__init__ (cognitive 34) providers/hashicorp/src/airflow/providers/hashicorp/hooks/vault.py:113— VaultHook.__init__ has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 8 (10 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
check_airflow_imports_in_shared.check_file_for_prohibited_imports (cognitive 34) scripts/ci/prek/check_airflow_imports_in_shared.py:55— check_airflow_imports_in_shared.check_file_for_prohibited_imports has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
.eleventy.default (cognitive 34) registry/.eleventy.js:22— .eleventy.default has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16, boolean chains 12, ternaries 3 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 48, 72, 119, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
exports (cognitive 34) registry/.eleventy.js:22— exports has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16, boolean chains 12, ternaries 3 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 24 function items inside it that branch (a function literal at line 48, a function literal at line 72, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AssetModelOperation.add_asset_trigger_references (cognitive 33) airflow-core/src/airflow/dag_processing/collection.py:1244— AssetModelOperation.add_asset_trigger_references has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 5 (9 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._create_dagruns_for_partitioned_asset_dags (cognitive 33) airflow-core/src/airflow/jobs/scheduler_job_runner.py:2411— SchedulerJobRunner._create_dagruns_for_partitioned_asset_dags has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 7 (10 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_SharedStreamGroup._run_advance_pump (cognitive 33) airflow-core/src/airflow/triggers/shared_stream.py:608— _SharedStreamGroup._run_advance_pump has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 4 (10 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_documentation._get_all_changes_for_package (cognitive 33) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:414— provider_documentation._get_all_changes_for_package has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), error handling 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AirflowReleaseValidator._compare_archives (cognitive 33) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:158— AirflowReleaseValidator._compare_archives has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (7 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_versions.main (cognitive 33) dev/registry/extract_versions.py:576— extract_versions.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (26 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
builder.build_pagefind_index (cognitive 33) devel-common/src/sphinx_exts/pagefind_search/builder.py:88— builder.build_pagefind_index has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (11 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesExecutor._handle_pod_publish_error (cognitive 33) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:709— KubernetesExecutor._handle_pod_publish_error has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncKubernetesHook.watch_pod_events (cognitive 33) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:1197— AsyncKubernetesHook.watch_pod_events has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesPodOperator.cleanup (cognitive 33) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1370— KubernetesPodOperator.cleanup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, ternaries 5 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HITLReviewMixin._poll_loop (cognitive 33) providers/common/ai/src/airflow/providers/common/ai/mixins/hitl_review.py:148— HITLReviewMixin._poll_loop has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigQueryGetDataOperator.execute (cognitive 33) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:1147— BigQueryGetDataOperator.execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 10, ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigQueryToSqlBaseOperator.get_openlineage_facets_on_complete (cognitive 33) providers/google/src/airflow/providers/google/cloud/transfers/bigquery_to_sql.py:147— BigQueryToSqlBaseOperator.get_openlineage_facets_on_complete has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (21 pts), ternaries 4 (5 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
commands._get_permissions_to_create (cognitive 33) providers/keycloak/src/airflow/providers/keycloak/auth_manager/cli/commands.py:452— commands._get_permissions_to_create has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureContainerInstancesOperator._monitor_logging (cognitive 33) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/container_instances.py:496— AzureContainerInstancesOperator._monitor_logging has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 4 (9 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils._extract_ol_info_from_asset_event (cognitive 33) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:1721— utils._extract_ol_info_from_asset_event has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 5 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
check_shared_distributions_usage.add_missing_entries_to_section (cognitive 33) scripts/ci/prek/check_shared_distributions_usage.py:428— check_shared_distributions_usage.add_missing_entries_to_section has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate_mprocs_config.generate_mprocs_config (cognitive 33) scripts/in_container/bin/generate_mprocs_config.py:49— generate_mprocs_config.generate_mprocs_config has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (26 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_run.get_dag_runs (cognitive 32) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:515— dag_run.get_dag_runs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 4 (10 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grid.load_loop_run_inputs (cognitive 32) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:290— grid.load_loop_run_inputs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (7 pts), error handling 2 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetManager.register_asset_change (cognitive 32) airflow-core/src/airflow/assets/manager.py:219— AssetManager.register_asset_change has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagModelOperation.update_dags (cognitive 32) airflow-core/src/airflow/dag_processing/collection.py:758— DagModelOperation.update_dags has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workflow_commands.workflow_run_publish (cognitive 32) dev/breeze/src/airflow_breeze/commands/workflow_commands.py:136— workflow_commands.workflow_run_publish has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4, error handling 2 (4 pts), ternaries 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
setup_idea.main (cognitive 32) REDACTED:1102— setup_idea.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
extract_connections.main (cognitive 32) dev/registry/extract_connections.py:160— extract_connections.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_versions.extract_modules_from_yaml (cognitive 32) dev/registry/extract_versions.py:308— extract_versions.extract_modules_from_yaml has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 8 (13 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsLambdaExecutor.try_adopt_task_instances (cognitive 32) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:564— AwsLambdaExecutor.try_adopt_task_instances has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 3 (13 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sql_hook_lineage.emit_lineage_from_sql_extras (cognitive 32) providers/openlineage/src/airflow/providers/openlineage/utils/sql_hook_lineage.py:99— sql_hook_lineage.emit_lineage_from_sql_extras has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2 (5 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerDagRunOperator.execute (cognitive 32) providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:233— TriggerDagRunOperator.execute has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upgrade_important_versions.update_pyproject_build_requires (cognitive 32) scripts/ci/prek/upgrade_important_versions.py:1117— upgrade_important_versions.update_pyproject_build_requires has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseSensorOperator.execute (cognitive 32) task-sdk/src/airflow/sdk/bases/sensor.py:183— BaseSensorOperator.execute has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection._build_uri (cognitive 32) task-sdk/src/airflow/sdk/definitions/connection.py:156— Connection._build_uri has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (21 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.pointerizeFields (cognitive 32) go-sdk/pkg/execution/genmodels/gen/main.go:286— main.pointerizeFields has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Calendar.Calendar (cognitive 32) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/Calendar.tsx:54— Calendar.Calendar has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 15 (21 pts), boolean chains 6, if/else 3 (5 pts) (nesting depth added 8). Of this number, 27 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Details.Details (cognitive 32) airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:47— Details.Details has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 15, boolean chains 12, if/else 5. Of this number, 19 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
generateURI (cognitive 32) registry/src/js/connection-builder.js:310— generateURI has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 11, error handling 1 (2 pts) (nesting depth added 5). Of this number, 27 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
renderResults (cognitive 32) registry/src/js/search.js:91— renderResults has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 12, ternaries 10 (11 pts), if/else 7 (9 pts) (nesting depth added 3). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 114, 136). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
assets.next_run_assets (cognitive 31) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py:163— assets.next_run_assets has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (9 pts), boolean chains 6, error handling 1 (3 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetManager._filter_dags_by_team (cognitive 31) airflow-core/src/airflow/assets/manager.py:128— AssetManager._filter_dags_by_team has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
partition_command.clear (cognitive 31) airflow-core/src/airflow/cli/commands/partition_command.py:37— partition_command.clear has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagBundlesManager.reassign_dags_with_unconfigured_bundles (cognitive 31) airflow-core/src/airflow/dag_processing/bundles/manager.py:460— DagBundlesManager.reassign_dags_with_unconfigured_bundles has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowReleaseValidator.validate_licenses (cognitive 31) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:414— AirflowReleaseValidator.validate_licenses has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 3 (4 pts), boolean chains 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
selective_checks._imports_module (cognitive 31) dev/breeze/src/airflow_breeze/utils/selective_checks.py:737— selective_checks._imports_module has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 6, ternaries 1 (4 pts), error handling 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3ToRedshiftOperator.execute (cognitive 31) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_redshift.py:138— S3ToRedshiftOperator.execute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 5, ternaries 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
KubernetesExecutor._change_state (cognitive 31) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:831— KubernetesExecutor._change_state has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncKubernetesHook._load_config (cognitive 31) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:920— AsyncKubernetesHook._load_config has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (25 pts), error handling 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FABAuthManagerUsers.update_user (cognitive 31) providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/users.py:141— FABAuthManagerUsers.update_user has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClusterGenerator._build_cluster_data (cognitive 31) providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:459— ClusterGenerator._build_cluster_data has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SSHHook.exec_ssh_client_command (cognitive 31) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:496— SSHHook.exec_ssh_client_command has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (11 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_example_dag_shell_commands._unsafe_command (cognitive 31) scripts/ci/prek/check_example_dag_shell_commands.py:130— check_example_dag_shell_commands._unsafe_command has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_partition_mapper_defaults_in_sync.main (cognitive 31) scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:323— check_partition_mapper_defaults_in_sync.main has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 4 (10 pts), loops 2 (3 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_usage.check_force_include (cognitive 31) scripts/ci/prek/check_shared_distributions_usage.py:131— check_shared_distributions_usage.check_force_include has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (13 pts), boolean chains 1, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_operators_init._handle_constructor_statement (cognitive 31) scripts/ci/prek/validate_operators_init.py:162— validate_operators_init._handle_constructor_statement has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
providers_discovery.discover_all_providers_from_packages (cognitive 31) shared/providers_discovery/src/airflow_shared/providers_discovery/providers_discovery.py:300— providers_discovery.discover_all_providers_from_packages has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskGroup.update_relative (cognitive 31) task-sdk/src/airflow/sdk/definitions/taskgroup.py:312— TaskGroup.update_relative has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
airflow.declareEdges (cognitive 31) go-sdk/airflow/node.go:344— airflow.declareEdges has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 6 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeadlineStatus.DeadlineStatus (cognitive 31) airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:44— DeadlineStatus.DeadlineStatus has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 9 (11 pts), boolean chains 7, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ChatPage.ChatPage (cognitive 31) providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/components/ChatPage.tsx:70— ChatPage.ChatPage has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, if/else 10, ternaries 2 (4 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 13 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 131, 103, 86, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SchedulerJobRunner._run_scheduler_loop (cognitive 30) airflow-core/src/airflow/jobs/scheduler_job_runner.py:1953— SchedulerJobRunner._run_scheduler_loop has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (9 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli._mask_full_command (cognitive 30) airflow-core/src/airflow/utils/cli.py:432— cli._mask_full_command has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (6 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
confirm.user_confirm (cognitive 30) dev/breeze/src/airflow_breeze/utils/confirm.py:57— confirm.user_confirm has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 5, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fork_ci_reconcile.parse_pull_request (cognitive 30) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:696— fork_ci_reconcile.parse_pull_request has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 17, if/else 6 (11 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
packages.update_version_suffix_in_non_provider_pyproject_toml (cognitive 30) REDACTED:1152— packages.update_version_suffix_in_non_provider_pyproject_toml has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
edge_command.maintenance (cognitive 30) providers/edge3/src/airflow/providers/edge3/cli/edge_command.py:150— edge_command.maintenance has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (7 pts), boolean chains 6, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
msgraph.get_fs (cognitive 30) providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py:67— msgraph.get_fs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_connection_doc_labels.main (cognitive 30) scripts/ci/prek/check_connection_doc_labels.py:90— check_connection_doc_labels.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 9 (14 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_secrets_search_path_sync.extract_from_file (cognitive 30) scripts/ci/prek/check_secrets_search_path_sync.py:33— check_secrets_search_path_sync.extract_from_file has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (18 pts), loops 3 (10 pts), boolean chains 1, error handling 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AllowlistManager.check (cognitive 30) scripts/ci/prek/common_prek_utils.py:1118— AllowlistManager.check has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (11 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
connection._prune_dict (cognitive 30) task-sdk/src/airflow/sdk/definitions/connection.py:54— connection._prune_dict has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
supervisor.supervise_task (cognitive 30) REDACTED:3085— supervisor.supervise_task has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), error handling 4 (6 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Logs.Logs (cognitive 30) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:48— Logs.Logs has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 7, if/else 7 (nesting depth added 7). Of this number, 23 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dag.#addTask (cognitive 30) ts-sdk/src/sdk/dag.ts:982— Dag.#addTask has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13, boolean chains 9, ternaries 8. Of this number, 27 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FilterParam.to_orm (cognitive 29) airflow-core/src/airflow/api_fastapi/common/parameters/filter.py:127— FilterParam.to_orm has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BulkTaskInstanceService.handle_bulk_update (cognitive 29) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:871— BulkTaskInstanceService.handle_bulk_update has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (10 pts), boolean chains 2, error handling 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances.ti_run (cognitive 29) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:157— task_instances.ti_run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (17 pts), error handling 4 (5 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
manifest._iter_manifest_file_paths (cognitive 29) airflow-core/src/airflow/dag_processing/bundles/manifest.py:123— manifest._iter_manifest_file_paths has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (18 pts), error handling 2 (6 pts), loops 3 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._create_dag_runs (cognitive 29) airflow-core/src/airflow/jobs/scheduler_job_runner.py:2705— SchedulerJobRunner._create_dag_runs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0101_3_2_0_ui_improvements_for_deadlines._migrate_deadline_alerts (cognitive 29) REDACTED:489— 0101_3_2_0_ui_improvements_for_deadlines._migrate_deadline_alerts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 2 (6 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_version_diff._get_category (cognitive 29) airflow-core/src/airflow/serialization/dag_version_diff.py:1240— dag_version_diff._get_category has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth_command.list_envs (cognitive 29) airflow-ctl/src/airflowctl/ctl/commands/auth_command.py:124— auth_command.list_envs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.publish_docs (cognitive 29) REDACTED:2133— release_management_commands.publish_docs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 4 (9 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
image.run_pull_image (cognitive 29) dev/breeze/src/airflow_breeze/utils/image.py:99— image.run_pull_image has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
setup_idea._open_ide (cognitive 29) REDACTED:503— setup_idea._open_ide has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 2 (8 pts), loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesJobOperator.execute (cognitive 29) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:192— KubernetesJobOperator.execute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (6 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComputeEngineSSHHook.get_conn (cognitive 29) providers/google/src/airflow/providers/google/cloud/hooks/compute_ssh.py:274— ComputeEngineSSHHook.get_conn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_structure._check_imports_in_files (cognitive 29) scripts/ci/prek/check_shared_distributions_structure.py:209— check_shared_distributions_structure._check_imports_in_files has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 3 (7 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_usage.find_and_sort_entries (cognitive 29) scripts/ci/prek/check_shared_distributions_usage.py:361— check_shared_distributions_usage.find_and_sort_entries has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
checkout_no_credentials.check_file (cognitive 29) scripts/ci/prek/checkout_no_credentials.py:43— checkout_no_credentials.check_file has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WatchedSubprocess.cleanup_sockets_after_kill (cognitive 29) REDACTED:1287— WatchedSubprocess.cleanup_sockets_after_kill has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 3 (10 pts), loops 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serde.deserialize (cognitive 29) task-sdk/src/airflow/sdk/serde/__init__.py:292— serde.deserialize has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
useGraphFilteredNodes.isNodeFiltered (cognitive 29) airflow-core/src/airflow/ui/src/layouts/Details/Graph/useGraphFilteredNodes.ts:58— useGraphFilteredNodes.isNodeFiltered has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6 (nesting depth added 9). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Graph.Graph (cognitive 29) airflow-core/src/airflow/ui/src/layouts/Details/Graph/Graph.tsx:56— Graph.Graph has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 18 (23 pts), boolean chains 5, if/else 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CalendarCell.CalendarCell (cognitive 29) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarCell.tsx:44— CalendarCell.CalendarCell has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 14 (21 pts), boolean chains 7, if/else 1 (nesting depth added 7). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_run.clear_dag_runs (cognitive 28) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:373— dag_run.clear_dag_runs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_command.dag_list_import_errors (cognitive 28) airflow-core/src/airflow/cli/commands/dag_command.py:670— dag_command.dag_list_import_errors has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 7 (12 pts), boolean chains 3 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SchedulerJobRunner._schedule_dag_run (cognitive 28) airflow-core/src/airflow/jobs/scheduler_job_runner.py:3236— SchedulerJobRunner._schedule_dag_run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0080_3_1_0_modify_deadline_callback_schema.downgrade (cognitive 28) airflow-core/src/airflow/migrations/versions/0080_3_1_0_modify_deadline_callback_schema.py:145— 0080_3_1_0_modify_deadline_callback_schema.downgrade has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins_manager.get_plugin_info (cognitive 28) airflow-core/src/airflow/plugins_manager.py:961— plugins_manager.get_plugin_info has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 4 (9 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_version_diff._collect_changes (cognitive 28) airflow-core/src/airflow/serialization/dag_version_diff.py:972— dag_version_diff._collect_changes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperatorSerialization._serialize_node (cognitive 28) airflow-core/src/airflow/serialization/serialized_objects.py:1056— OperatorSerialization._serialize_node has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helpers.prune_dict (cognitive 28) airflow-core/src/airflow/utils/helpers.py:257— helpers.prune_dict has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
process_utils.reap_process_group (cognitive 28) airflow-core/src/airflow/utils/process_utils.py:58— process_utils.reap_process_group has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 4 (7 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main_command.cleanup (cognitive 28) dev/breeze/src/airflow_breeze/commands/main_command.py:229— main_command.cleanup has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), loops 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.prepare_provider_distributions (cognitive 28) REDACTED:1320— release_management_commands.prepare_provider_distributions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 4 (8 pts), boolean chains 6, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
testing_commands.ui_e2e_tests (cognitive 28) dev/breeze/src/airflow_breeze/commands/testing_commands.py:1636— testing_commands.ui_e2e_tests has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23 (25 pts), error handling 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
providers_extensions.find_class_methods_with_specific_calls (cognitive 28) devel-common/src/sphinx_exts/providers_extensions.py:36— providers_extensions.find_class_methods_with_specific_calls has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
eks._create_compute (cognitive 28) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:103— eks._create_compute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, error handling 2 (6 pts), loops 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LLMApprovalMixin.execute_complete (cognitive 28) providers/common/ai/src/airflow/providers/common/ai/mixins/approval.py:320— LLMApprovalMixin.execute_complete has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 1 (3 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseSQLOperator._attach_check_facets (cognitive 28) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:370— BaseSQLOperator._attach_check_facets has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (6 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EdgeExecutor._purge_jobs (cognitive 28) providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py:354— EdgeExecutor._purge_jobs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElasticsearchTaskHandler._read (cognitive 28) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:434— ElasticsearchTaskHandler._read has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpensearchTaskHandler._read (cognitive 28) providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:603— OpensearchTaskHandler._read has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SmtpHook.get_conn (cognitive 28) providers/smtp/src/airflow/providers/smtp/hooks/smtp.py:112— SmtpHook.get_conn has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SmtpHook.aget_conn) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SmtpHook.aget_conn (cognitive 28) providers/smtp/src/airflow/providers/smtp/hooks/smtp.py:157— SmtpHook.aget_conn has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SmtpHook.get_conn) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
openlineage.emit_openlineage_events_for_snowflake_queries (cognitive 28) providers/snowflake/src/airflow/providers/snowflake/utils/openlineage.py:190— openlineage.emit_openlineage_events_for_snowflake_queries has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_operators_init._check_constructor_field_logic (cognitive 28) scripts/ci/prek/validate_operators_init.py:428— validate_operators_init._check_constructor_field_logic has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DAGNode._set_relatives (cognitive 28) task-sdk/src/airflow/sdk/definitions/_internal/node.py:87— DAGNode._set_relatives has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serde._register (cognitive 28) task-sdk/src/airflow/sdk/serde/__init__.py:467— serde._register has cognitive complexity 28 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 3 (9 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SortParam._resolve (cognitive 27) airflow-core/src/airflow/api_fastapi/common/parameters/sort.py:59— SortParam._resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grid._build_ti_summaries (cognitive 27) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py:414— grid._build_ti_summaries has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 3 (6 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRunWaiter.validate_result_selection (cognitive 27) airflow-core/src/airflow/api_fastapi/core_api/services/public/dag_run.py:266— DagRunWaiter.validate_result_selection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db_command.run_db_downgrade_command (cognitive 27) REDACTED:155— db_command.run_db_downgrade_command has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
team_command.team_sync (cognitive 27) airflow-core/src/airflow/cli/commands/team_command.py:213— team_command.team_sync has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 4 (8 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagBundlesManager.sync_bundles_to_db (cognitive 27) airflow-core/src/airflow/dag_processing/bundles/manager.py:352— DagBundlesManager.sync_bundles_to_db has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, error handling 1 (2 pts), loops 2, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutorLoader._get_executor_names (cognitive 27) airflow-core/src/airflow/executors/executor_loader.py:68— ExecutorLoader._get_executor_names has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedDAG.create_dagrun (cognitive 27) airflow-core/src/airflow/serialization/definitions/dag.py:589— SerializedDAG.create_dagrun has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandFactory._create_args_map_from_operation (cognitive 27) airflow-ctl/src/airflowctl/ctl/cli_config.py:750— CommandFactory._create_args_map_from_operation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), ternaries 1 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.release_prod_images (cognitive 27) REDACTED:2436— release_management_commands.release_prod_images has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.regenerate_help_images_for_all_commands (cognitive 27) REDACTED:513— setup_commands.regenerate_help_images_for_all_commands has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extra_provider_files_with_substitutions.fix_provider_references (cognitive 27) devel-common/src/sphinx_exts/extra_provider_files_with_substitutions.py:49— extra_provider_files_with_substitutions.fix_provider_references has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncPodManager._emit_container_logs (cognitive 27) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:1273— AsyncPodManager._emit_container_logs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LLMSchemaCompareOperator._introspect_db_schema (cognitive 27) providers/common/ai/src/airflow/providers/common/ai/operators/llm_schema_compare.py:206— LLMSchemaCompareOperator._introspect_db_schema has cognitive complexity 27 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 5 (8 pts), loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HookToolset.__init__ (cognitive 27) providers/common/ai/src/airflow/providers/common/ai/toolsets/hook.py:149— HookToolset.__init__ has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
usage_budget.load_run_usage (cognitive 27) providers/common/ai/src/airflow/providers/common/ai/utils/usage_budget.py:67— usage_budget.load_run_usage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 1 (3 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksSqlHook.run (cognitive 27) providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:323— DatabricksSqlHook.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (23 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAirflowSecurityManagerOverride._get_azure_tenant_identifier (cognitive 27) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2621— FabAirflowSecurityManagerOverride._get_azure_tenant_identifier has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitDagBundle._initialize (cognitive 27) providers/git/src/airflow/providers/git/bundles/git.py:176— GitDagBundle._initialize has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 6 (9 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudRunJobFinishedTrigger.run (cognitive 27) providers/google/src/airflow/providers/google/cloud/triggers/cloud_run.py:134— CloudRunJobFinishedTrigger.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
emission_policy.extend_global_openlineage_emission_policy (cognitive 27) providers/openlineage/src/airflow/providers/openlineage/api/emission_policy.py:121— emission_policy.extend_global_openlineage_emission_policy has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SFTPSensor._get_files (cognitive 27) providers/sftp/src/airflow/providers/sftp/sensors/sftp.py:96— SFTPSensor._get_files has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 2 (5 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_init_decorator_arguments._match_arguments (cognitive 27) scripts/ci/prek/check_init_decorator_arguments.py:136— check_init_decorator_arguments._match_arguments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_metrics_synced_with_the_registry.scan_file_for_metrics (cognitive 27) scripts/ci/prek/check_metrics_synced_with_the_registry.py:290— check_metrics_synced_with_the_registry.scan_file_for_metrics has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 3, error handling 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
verify_providers.find_all_entities (cognitive 27) scripts/in_container/verify_providers.py:403— verify_providers.find_all_entities has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TaskGroupMixin._find_projection_components (cognitive 27) shared/dagnode/src/airflow_shared/dagnode/node.py:365— TaskGroupMixin._find_projection_components has cognitive complexity 27 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 4 (12 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
_subprocess._accept_connections (cognitive 27) task-sdk/src/airflow/sdk/coordinators/_subprocess.py:209— _subprocess._accept_connections has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (10 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Templater.resolve_template_files (cognitive 27) task-sdk/src/airflow/sdk/definitions/_internal/templater.py:91— Templater.resolve_template_files has cognitive complexity 27 (threshold 15). Drivers by points: error handling 2 (10 pts), if/else 3 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_runner._run_task_and_map_outcome (cognitive 27) task-sdk/src/airflow/sdk/execution_time/task_runner.py:1613— task_runner._run_task_and_map_outcome has cognitive complexity 27 (threshold 15). Drivers by points: error handling 12, if/else 6 (8 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_runner.finalize (cognitive 27) task-sdk/src/airflow/sdk/execution_time/task_runner.py:2465— task_runner.finalize has cognitive complexity 27 (threshold 15). Drivers by points: error handling 7 (14 pts), if/else 6 (9 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
airflow.findTaskRef (cognitive 27) go-sdk/airflow/inputs.go:104— airflow.findTaskRef has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts), boolean chains 2, match/switch 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HookMetaService._convert_extra_fields (cognitive 26) airflow-core/src/airflow/api_fastapi/core_api/services/ui/connections.py:223— HookMetaService._convert_extra_fields has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (10 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetModelOperation.add_task_asset_references (cognitive 26) airflow-core/src/airflow/dag_processing/collection.py:1183— AssetModelOperation.add_task_asset_references has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (8 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
temporal._compile_output_format_regex (cognitive 26) airflow-core/src/airflow/partition_mappers/temporal.py:47— temporal._compile_output_format_regex has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sbom_commands.generate_providers_requirements (cognitive 26) dev/breeze/src/airflow_breeze/commands/sbom_commands.py:672— sbom_commands.generate_providers_requirements has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ui_commands.compare_keys (cognitive 26) dev/breeze/src/airflow_breeze/commands/ui_commands.py:240— ui_commands.compare_keys has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (7 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
constraints_version_check.process_packages (cognitive 26) REDACTED:492— constraints_version_check.process_packages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (5 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
selective_checks._find_test_helper_importers (cognitive 26) dev/breeze/src/airflow_breeze/utils/selective_checks.py:779— selective_checks._find_test_helper_importers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fetch_inventories.fetch_inventories (cognitive 26) devel-common/src/sphinx_exts/docs_build/fetch_inventories.py:109— fetch_inventories.fetch_inventories has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KinesisTrigger.run (cognitive 26) providers/amazon/src/airflow/providers/amazon/aws/triggers/kinesis.py:286— KinesisTrigger.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 pts), error handling 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HiveCliHook._prepare_cli_cmd (cognitive 26) providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:173— HiveCliHook._prepare_cli_cmd has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (26 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
S3ToHiveOperator.execute (cognitive 26) providers/apache/hive/src/airflow/providers/apache/hive/transfers/s3_to_hive.py:141— S3ToHiveOperator.execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
k8s_resource_iterator.k8s_resource_iterator (cognitive 26) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/k8s_resource_iterator.py:26— k8s_resource_iterator.k8s_resource_iterator has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (9 pts), loops 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SQLColumnCheckOperator._column_mapping_validation (cognitive 26) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:775— SQLColumnCheckOperator._column_mapping_validation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
permissions_command.permissions_cleanup (cognitive 26) providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/permissions_command.py:107— permissions_command.permissions_cleanup has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 3, error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpensearchRemoteLogIO.upload (cognitive 26) providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:966— OpensearchRemoteLogIO.upload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (7 pts), boolean chains 3, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnowflakeHook.run (cognitive 26) providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:1034— SnowflakeHook.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerDagRunOperator._trigger_dag_af_2 (cognitive 26) providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:347— TriggerDagRunOperator._trigger_dag_af_2 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fab_permissions_doc._dict_literal (cognitive 26) scripts/ci/prek/fab_permissions_doc.py:106— fab_permissions_doc._dict_literal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser.getsection (cognitive 26) shared/configuration/src/airflow_shared/configuration/parser.py:1975— AirflowConfigParser.getsection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (5 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins_manager._load_plugins_from_plugin_directory (cognitive 26) shared/plugins_manager/src/airflow_shared/plugins_manager/plugins_manager.py:314— plugins_manager._load_plugins_from_plugin_directory has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), error handling 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.writeDefaults (cognitive 26) go-sdk/pkg/execution/genmodels/gen/main.go:439— main.writeDefaults has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Code.Code (cognitive 26) airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx:53— Code.Code has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 14 (16 pts), boolean chains 10 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
useLogGroups.useLogGroups (cognitive 26) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/useLogGroups.tsx:30— useLogGroups.useLogGroups has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, ternaries 4, loops 2 (nesting depth added 4). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 148, 94, 102, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TaskLogHeader.TaskLogHeader (cognitive 26) airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogHeader.tsx:68— TaskLogHeader.TaskLogHeader has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 13, boolean chains 9, if/else 4. Of this number, 14 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
useFiltersHandler.useFiltersHandler (cognitive 26) airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts:124— useFiltersHandler.useFiltersHandler has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 8). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 134). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
AssetManager._queue_partitioned_dags (cognitive 25) airflow-core/src/airflow/assets/manager.py:497— AssetManager._queue_partitioned_dags has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config_command.lint_config (cognitive 25) airflow-core/src/airflow/cli/commands/config_command.py:856— config_command.lint_config has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
manifest.build_bundle_version_manifest (cognitive 25) airflow-core/src/airflow/dag_processing/bundles/manifest.py:362— manifest.build_bundle_version_manifest has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0094_3_2_0_replace_deadline_inline_callback_with_fkey._upgrade_mysql_sqlite (cognitive 25) airflow-core/src/airflow/migrations/versions/0094_3_2_0_replace_deadline_inline_callback_with_fkey.py:144— 0094_3_2_0_replace_deadline_inline_callback_with_fkey._upgrade_mysql_sqlite has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection._parse_from_uri (cognitive 25) REDACTED:267— Connection._parse_from_uri has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5, error handling 1 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun._get_ready_tis (cognitive 25) airflow-core/src/airflow/models/dagrun.py:1720— DagRun._get_ready_tis has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance._check_and_change_state_before_execution (cognitive 25) REDACTED:2155— TaskInstance._check_and_change_state_before_execution has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance.xcom_pull (cognitive 25) REDACTED:2845— TaskInstance.xcom_pull has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagSerialization.serialize_dag (cognitive 25) airflow-core/src/airflow/serialization/serialized_objects.py:1766— DagSerialization.serialize_dag has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), ternaries 2 (4 pts), error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_candidate_command.remove_old_releases (cognitive 25) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:664— release_candidate_command.remove_old_releases has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.get_prs_for_package (cognitive 25) REDACTED:2665— release_management_commands.get_prs_for_package has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.get_commented_out_prs_from_provider_changelogs (cognitive 25) REDACTED:2785— release_management_commands.get_commented_out_prs_from_provider_changelogs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwaitMessageTrigger.run (cognitive 25) providers/apache/kafka/src/airflow/providers/apache/kafka/triggers/await_message.py:111— AwaitMessageTrigger.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSqlHook._prepare_command (cognitive 25) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_sql.py:139— SparkSqlHook._prepare_command has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (19 pts), loops 2 (6 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
spark_submit._mask_sensitive_values (cognitive 25) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:65— spark_submit._mask_sensitive_values has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
role_command.__roles_add_or_remove_permissions (cognitive 25) providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/role_command.py:92— role_command.__roles_add_or_remove_permissions has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 4 (8 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAirflowSecurityManagerOverride._create_role_from_config (cognitive 25) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:1316— FabAirflowSecurityManagerOverride._create_role_from_config has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataprocCreateClusterOperator.execute (cognitive 25) providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:899— DataprocCreateClusterOperator.execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 5 (9 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InformaticaLineageExtractor.find_object_id (cognitive 25) providers/informatica/src/airflow/providers/informatica/extractors/informatica.py:43— InformaticaLineageExtractor.find_object_id has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureContainerInstancesOperator.execute (cognitive 25) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/container_instances.py:329— AzureContainerInstancesOperator.execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SFTPOperator.execute (cognitive 25) providers/sftp/src/airflow/providers/sftp/operators/sftp.py:112— SFTPOperator.execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TrinoHook.get_conn (cognitive 25) providers/trino/src/airflow/providers/trino/hooks/trino.py:147— TrinoHook.get_conn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_partition_mapper_defaults_in_sync.extract_class_field_names (cognitive 25) scripts/ci/prek/check_partition_mapper_defaults_in_sync.py:286— check_partition_mapper_defaults_in_sync.extract_class_field_names has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser.as_dict (cognitive 25) shared/configuration/src/airflow_shared/configuration/parser.py:1809— AirflowConfigParser.as_dict has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
file_discovery._find_path_from_directory (cognitive 25) shared/module_loading/src/airflow_shared/module_loading/file_discovery.py:136— file_discovery._find_path_from_directory has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseOperator.__init__ (cognitive 25) task-sdk/src/airflow/sdk/bases/operator.py:1051— BaseOperator.__init__ has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14, boolean chains 5, ternaries 3 (5 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
dag._run_task (cognitive 25) task-sdk/src/airflow/sdk/definitions/dag.py:1522— dag._run_task has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (5 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
calendarUtils.resolveCellColor (cognitive 25) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts:302— calendarUtils.resolveCellColor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstances.TaskInstances (cognitive 25) airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:310— TaskInstances.TaskInstances has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 16 (17 pts), boolean chains 8 (nesting depth added 1). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TaskInstance.TaskInstance (cognitive 25) airflow-core/src/airflow/ui/src/pages/TaskInstance/TaskInstance.tsx:52— TaskInstance.TaskInstance has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 10, if/else 4 (nesting depth added 4). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useGridTISummaries.useGridTiSummariesStream (cognitive 25) airflow-core/src/airflow/ui/src/queries/useGridTISummaries.ts:49— useGridTISummaries.useGridTiSummariesStream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, error handling 1, loops 1, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 77, 196, 69, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CadwynWithOpenAPICustomization.customize_openapi (cognitive 24) airflow-core/src/airflow/api_fastapi/execution_api/app.py:187— CadwynWithOpenAPICustomization.customize_openapi has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 6 (11 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_command.dag_next_execution (cognitive 24) airflow-core/src/airflow/cli/commands/dag_command.py:459— dag_command.dag_next_execution has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner.check_awaiting_input_timeouts (cognitive 24) airflow-core/src/airflow/jobs/scheduler_job_runner.py:3837— SchedulerJobRunner.check_awaiting_input_timeouts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.get_connection_from_secrets (cognitive 24) REDACTED:522— Connection.get_connection_from_secrets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LazySelectSequence.__getitem__ (cognitive 24) airflow-core/src/airflow/utils/db.py:1972— LazySelectSequence.__getitem__ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (24 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
developer_commands.down (cognitive 24) dev/breeze/src/airflow_breeze/commands/developer_commands.py:1167— developer_commands.down has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (5 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.install_provider_distributions (cognitive 24) REDACTED:1770— release_management_commands.install_provider_distributions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (11 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParallelMonitor.print_single_progress (cognitive 24) dev/breeze/src/airflow_breeze/utils/parallel.py:288— ParallelMonitor.print_single_progress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SelectiveChecks._filter_platform_excluded_test_types (cognitive 24) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1779— SelectiveChecks._filter_platform_excluded_test_types has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_changelog_entries.check (cognitive 24) dev/check_changelog_entries.py:123— check_changelog_entries.check has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_idea._detect_installed_ides (cognitive 24) REDACTED:366— setup_idea._detect_installed_ides has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_parameters.compare_with_ast (cognitive 24) dev/registry/extract_parameters.py:1035— extract_parameters.compare_with_ast has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PRFetcher.fetch_prs_bulk (cognitive 24) REDACTED:116— PRFetcher.fetch_prs_bulk has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirbyteHook.create_api_session (cognitive 24) providers/airbyte/src/airflow/providers/airbyte/hooks/airbyte.py:87— AirbyteHook.create_api_session has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (7 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsLambdaExecutor.process_queue (cognitive 24) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:470— AwsLambdaExecutor.process_queue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchClientHook.get_job_all_awslogs_info (cognitive 24) providers/amazon/src/airflow/providers/amazon/aws/hooks/batch_client.py:462— BatchClientHook.get_job_all_awslogs_info has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (10 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EcsRunTaskOperator._start_task (cognitive 24) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:674— EcsRunTaskOperator._start_task has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmrServerlessStartJobOperator.execute (cognitive 24) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1389— EmrServerlessStartJobOperator.execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SqlToS3Operator._partition_dataframe (cognitive 24) providers/amazon/src/airflow/providers/amazon/aws/transfers/sql_to_s3.py:291— SqlToS3Operator._partition_dataframe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts), loops 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesPodOperator.get_or_create_pod (cognitive 24) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:748— KubernetesPodOperator.get_or_create_pod has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentLoaderOperator.execute (cognitive 24) providers/common/ai/src/airflow/providers/common/ai/operators/document_loader.py:166— DocumentLoaderOperator.execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericTransfer.execute (cognitive 24) providers/common/sql/src/airflow/providers/common/sql/operators/generic_transfer.py:159— GenericTransfer.execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksPartitionSensor._generate_partition_query (cognitive 24) providers/databricks/src/airflow/providers/databricks/sensors/databricks_partition.py:170— DatabricksPartitionSensor._generate_partition_query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GCSToBigQueryOperator._use_existing_table (cognitive 24) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:652— GCSToBigQueryOperator._use_existing_table has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GKEJobTrigger.run (cognitive 24) providers/google/src/airflow/providers/google/cloud/triggers/kubernetes_engine.py:338— GKEJobTrigger.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 5, loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MSGraphAsyncOperator.execute_complete (cognitive 24) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/msgraph.py:228— MSGraphAsyncOperator.execute_complete has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SSHRemoteJobTrigger.run (cognitive 24) providers/ssh/src/airflow/providers/ssh/triggers/ssh_remote_job.py:239— SSHRemoteJobTrigger.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (6 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fab_permissions_doc._role_permissions (cognitive 24) scripts/ci/prek/fab_permissions_doc.py:164— fab_permissions_doc._role_permissions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_operators_init._extract_template_fields (cognitive 24) scripts/ci/prek/validate_operators_init.py:100— validate_operators_init._extract_template_fields has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
install_development_dependencies.install_development_dependencies (cognitive 24) scripts/in_container/install_development_dependencies.py:53— install_development_dependencies.install_development_dependencies has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_capture_airflowctl_help.regenerate_help_images_for_all_airflowctl_commands (cognitive 24) scripts/in_container/run_capture_airflowctl_help.py:83— run_capture_airflowctl_help.regenerate_help_images_for_all_airflowctl_commands has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (6 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common.get_otel_data_exporter (cognitive 24) shared/observability/src/airflow_shared/observability/common.py:48— common.get_otel_data_exporter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
datetime.deserialize (cognitive 24) task-sdk/src/airflow/sdk/serde/serializers/datetime.py:68— datetime.deserialize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LimitedItemsList.LimitedItemsList (cognitive 24) airflow-core/src/airflow/ui/src/components/LimitedItemsList.tsx:34— LimitedItemsList.LimitedItemsList has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (20 pts), boolean chains 3, if/else 1 (nesting depth added 11). Of this number, 13 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DeadlineStatusModal.DeadlineStatusModal (cognitive 24) airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx:48— DeadlineStatusModal.DeadlineStatusModal has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 2 (5 pts), boolean chains 3 (nesting depth added 10). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 118). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
partitioned_dag_runs.get_pending_partitioned_dag_run (cognitive 23) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/partitioned_dag_runs.py:369— partitioned_dag_runs.get_pending_partitioned_dag_run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 5 (7 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
connections.update_orm_from_pydantic (cognitive 23) REDACTED:43— connections.update_orm_from_pydantic has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagFileProcessorManager.deactivate_stale_dags (cognitive 23) airflow-core/src/airflow/dag_processing/manager.py:461— DagFileProcessorManager.deactivate_stale_dags has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagModel.dags_needing_dagruns (cognitive 23) airflow-core/src/airflow/models/dag.py:706— DagModel.dags_needing_dagruns has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedTaskGroup._sweep_projection (cognitive 23) airflow-core/src/airflow/serialization/definitions/taskgroup.py:297— SerializedTaskGroup._sweep_projection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagSerialization._deserialize_dag_internal (cognitive 23) airflow-core/src/airflow/serialization/serialized_objects.py:1847— DagSerialization._deserialize_dag_internal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 6 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli._find_option_values (cognitive 23) airflow-core/src/airflow/utils/cli.py:209— cli._find_option_values has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Credentials.load (cognitive 23) airflow-ctl/src/airflowctl/api/client.py:249— Credentials.load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_candidate_command.create_tarball_release (cognitive 23) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:319— release_candidate_command.create_tarball_release has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 5 (10 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DistributionPackageInfo.dist_packages (cognitive 23) REDACTED:361— DistributionPackageInfo.dist_packages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.prepare_helm_chart_tarball (cognitive 23) REDACTED:4483— release_management_commands.prepare_helm_chart_tarball has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (23 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
verify_commands.verify (cognitive 23) dev/breeze/src/airflow_breeze/commands/verify_commands.py:108— verify_commands.verify has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 4 (7 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
cdxgen.get_open_psf_scorecard (cognitive 23) dev/breeze/src/airflow_breeze/utils/cdxgen.py:652— cdxgen.get_open_psf_scorecard has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
docker_command_utils.enter_shell (cognitive 23) dev/breeze/src/airflow_breeze/utils/docker_command_utils.py:1242— docker_command_utils.enter_shell has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
fork_ci_reconcile.run_reconcile (cognitive 23) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:1316— fork_ci_reconcile.run_reconcile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (5 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks._get_providers_test_types_to_run (cognitive 23) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1636— SelectiveChecks._get_providers_test_types_to_run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsLambdaExecutor.attempt_workload_runs (cognitive 23) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:347— AwsLambdaExecutor.attempt_workload_runs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GCSToS3Operator.execute (cognitive 23) providers/amazon/src/airflow/providers/amazon/aws/transfers/gcs_to_s3.py:168— GCSToS3Operator.execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LivyHook.build_post_batch_body (cognitive 23) providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:336— LivyHook.build_post_batch_body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (LivyAsyncHook.build_post_batch_body) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LivyAsyncHook.build_post_batch_body (cognitive 23) providers/apache/livy/src/airflow/providers/apache/livy/hooks/livy.py:655— LivyAsyncHook.build_post_batch_body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (LivyHook.build_post_batch_body) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SparkKubernetesOperator._setup_spark_configuration (cognitive 23) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:362— SparkKubernetesOperator._setup_spark_configuration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fingerprint._order_sets (cognitive 23) providers/common/ai/src/airflow/providers/common/ai/durable/fingerprint.py:400— fingerprint._order_sets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SandboxToolset.__init__ (cognitive 23) providers/common/ai/src/airflow/providers/common/ai/toolsets/sandbox.py:266— SandboxToolset.__init__ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExasolHook.run (cognitive 23) providers/exasol/src/airflow/providers/exasol/hooks/exasol.py:330— ExasolHook.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudSQLDatabaseHook._generate_connection_parameters (cognitive 23) REDACTED:1232— CloudSQLDatabaseHook._generate_connection_parameters has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adls.get_fs (cognitive 23) providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/adls.py:32— adls.get_fs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenLineageListener._on_task_instance_manual_state_change (cognitive 23) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:858— OpenLineageListener._on_task_instance_manual_state_change has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenLineageRedactor._redact (cognitive 23) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:2150— OpenLineageRedactor._redact has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SFTPHookAsync._parse_extras (cognitive 23) providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:921— SFTPHookAsync._parse_extras has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SSHTunnel._forward_data (cognitive 23) providers/ssh/src/airflow/providers/ssh/tunnel.py:315— SSHTunnel._forward_data has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (12 pts), if/else 4 (10 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_deferred_hook_configuration.find_hand_built_hooks (cognitive 23) scripts/ci/prek/check_deferred_hook_configuration.py:197— check_deferred_hook_configuration.find_hand_built_hooks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_init_decorator_arguments._find_cls_attrs (cognitive 23) scripts/ci/prek/check_init_decorator_arguments.py:49— check_init_decorator_arguments._find_cls_attrs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_metrics_synced_with_the_registry.extract_metric_name_from_ast_node (cognitive 23) scripts/ci/prek/check_metrics_synced_with_the_registry.py:182— check_metrics_synced_with_the_registry.extract_metric_name_from_ast_node has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_openapi_exception_doc_in_sync._statuses_from_responses (cognitive 23) scripts/ci/prek/check_openapi_exception_doc_in_sync.py:96— check_openapi_exception_doc_in_sync._statuses_from_responses has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prevent_deprecated_sqlalchemy_usage.check_session_query (cognitive 23) scripts/ci/prek/prevent_deprecated_sqlalchemy_usage.py:35— prevent_deprecated_sqlalchemy_usage.check_session_query has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_provider_yaml_files_check.check_if_object_exist (cognitive 23) scripts/in_container/run_provider_yaml_files_check.py:253— run_provider_yaml_files_check.check_if_object_exist has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), error handling 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cycle.detect_cycle (cognitive 23) shared/dagnode/src/airflow_shared/dagnode/cycle.py:34— cycle.detect_cycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskGroup._sweep_projection (cognitive 23) task-sdk/src/airflow/sdk/definitions/taskgroup.py:629— TaskGroup._sweep_projection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (9 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetNode.AssetNode (cognitive 23) airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.tsx:38— AssetNode.AssetNode has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (16 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
elkGraphUtils.generateElkGraph.formatChildNode (cognitive 23) airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts:300— elkGraphUtils.generateElkGraph.formatChildNode has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 6 (7 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BulkTaskInstanceService.handle_bulk_delete (cognitive 22) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:973— BulkTaskInstanceService.handle_bulk_delete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (9 pts), boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grid._find_aggregates (cognitive 22) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:191— grid._find_aggregates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (5 pts), ternaries 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PiiAnonymizer.process_url (cognitive 22) airflow-core/src/airflow/cli/commands/info_command.py:85— PiiAnonymizer.process_url has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagFileProcessorManager._log_file_processing_stats (cognitive 22) airflow-core/src/airflow/dag_processing/manager.py:1110— DagFileProcessorManager._log_file_processing_stats has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (15 pts), loops 3 (4 pts), if/else 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._executor_to_workloads (cognitive 22) airflow-core/src/airflow/jobs/scheduler_job_runner.py:4510— SchedulerJobRunner._executor_to_workloads has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrevDagrunDep._get_dep_statuses (cognitive 22) airflow-core/src/airflow/ti_deps/deps/prev_dagrun_dep.py:147— PrevDagrunDep._get_dep_statuses has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
email.send_mime_email (cognitive 22) airflow-core/src/airflow/utils/email.py:222— email.send_mime_email has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sbom_commands.convert_all_sbom_to_value_dictionaries (cognitive 22) dev/breeze/src/airflow_breeze/commands/sbom_commands.py:930— sbom_commands.convert_all_sbom_to_value_dictionaries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.get_command_hash_dict (cognitive 22) REDACTED:375— setup_commands.get_command_hash_dict has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_distributions.build_provider_distribution (cognitive 22) dev/breeze/src/airflow_breeze/prepare_providers/provider_distributions.py:241— provider_distributions.build_provider_distribution has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubClient._gh (cognitive 22) dev/breeze/src/airflow_breeze/utils/fork_ci_github.py:48— GitHubClient._gh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (6 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks._find_all_providers_affected (cognitive 22) dev/breeze/src/airflow_breeze/utils/selective_checks.py:2390— SelectiveChecks._find_all_providers_affected has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks._check_provider_deps_in_list (cognitive 22) dev/breeze/src/airflow_breeze/utils/selective_checks.py:2567— SelectiveChecks._check_provider_deps_in_list has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AwsLambdaExecutor._process_workloads (cognitive 22) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:252— AwsLambdaExecutor._process_workloads has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EcsRunTaskOperator.execute (cognitive 22) providers/amazon/src/airflow/providers/amazon/aws/operators/ecs.py:550— EcsRunTaskOperator.execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SageMakerTrainingOperator.execute (cognitive 22) providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:1274— SageMakerTrainingOperator.execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SageMakerConditionOperator._evaluate (cognitive 22) providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:2266— SageMakerConditionOperator._evaluate has cognitive complexity 22 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6 (8 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSubmitHook._resolve_connection (cognitive 22) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:470— SparkSubmitHook._resolve_connection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 3, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
openai_agents._describe (cognitive 22) providers/common/ai/src/airflow/providers/common/ai/tools/openai_agents.py:308— openai_agents._describe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHook.__init__ (cognitive 22) providers/git/src/airflow/providers/git/hooks/git.py:118— GitHook.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudSQLDatabaseHook._generate_connection_uri (cognitive 22) REDACTED:1169— CloudSQLDatabaseHook._generate_connection_uri has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 8, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BigQueryInsertJobOperator._persist_job_links (cognitive 22) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2449— BigQueryInsertJobOperator._persist_job_links has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (6 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
BigQueryDataTransferServiceStartTransferRunsOperator.get_openlineage_facets_on_complete (cognitive 22) providers/google/src/airflow/providers/google/cloud/operators/bigquery_dts.py:418— BigQueryDataTransferServiceStartTransferRunsOperator.get_openlineage_facets_on_complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataprocSubmitJobDirectTrigger.run (cognitive 22) providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:380— DataprocSubmitJobDirectTrigger.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 4 (8 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpAsyncHook.config (cognitive 22) providers/http/src/airflow/providers/http/hooks/http.py:755— HttpAsyncHook.config has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sql.create_filter_clauses (cognitive 22) providers/openlineage/src/airflow/providers/openlineage/utils/sql.py:247— sql.create_filter_clauses has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 3 (6 pts), loops 2 (3 pts), error handling 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
emailer.send_mime_email (cognitive 22) providers/smtp/src/airflow/providers/smtp/utils/emailer.py:223— emailer.send_mime_email has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SSHHookAsync._parse_extras (cognitive 22) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:646— SSHHookAsync._parse_extras has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
check_conn_id_templated.stores_attribute (cognitive 22) scripts/ci/prek/check_conn_id_templated.py:199— check_conn_id_templated.stores_attribute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_deprecations.check_decorators (cognitive 22) scripts/ci/prek/check_deprecations.py:173— check_deprecations.check_decorators has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_documented_commands._validate_breeze (cognitive 22) scripts/ci/prek/check_documented_commands.py:237— check_documented_commands._validate_breeze has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_migration_patterns.check_mig002 (cognitive 22) scripts/ci/prek/check_migration_patterns.py:455— check_migration_patterns.check_mig002 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_openapi_exception_doc_in_sync.check_file (cognitive 22) scripts/ci/prek/check_openapi_exception_doc_in_sync.py:316— check_openapi_exception_doc_in_sync.check_file has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_template_context_variable_in_sync._iter_template_context_keys_from_original_return (cognitive 22) scripts/ci/prek/check_template_context_variable_in_sync.py:59— check_template_context_variable_in_sync._iter_template_context_keys_from_original_return has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_provider_yaml_files_check.check_doc_files (cognitive 22) scripts/in_container/run_provider_yaml_files_check.py:1050— run_provider_yaml_files_check.check_doc_files has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_LazyLogRecordDict.__getitem__ (cognitive 22) shared/logging/src/airflow_shared/logging/percent_formatter.py:49— _LazyLogRecordDict.__getitem__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
module_loading.qualname (cognitive 22) shared/module_loading/src/airflow_shared/module_loading/__init__.py:102— module_loading.qualname has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
callback_supervisor.execute_callback (cognitive 22) task-sdk/src/airflow/sdk/execution_time/callback_supervisor.py:144— callback_supervisor.execute_callback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagBuilder._build_operator (cognitive 22) REDACTED:151— DagBuilder._build_operator has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
_FieldCoercer._to_delta (cognitive 22) REDACTED:490— _FieldCoercer._to_delta has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagDef.expandGroupEdges (cognitive 22) java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/DagDef.kt:354— DagDef.expandGroupEdges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 5, match/switch 3 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.main (cognitive 22) go-sdk/internal/genspec/main.go:45— main.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useRequiredActionTabs.useRequiredActionTabs (cognitive 22) airflow-core/src/airflow/ui/src/hooks/useRequiredActionTabs.ts:48— useRequiredActionTabs.useRequiredActionTabs has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 16 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
providerVersions.default (cognitive 22) registry/src/_data/providerVersions.js:55— providerVersions.default has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generateJSON (cognitive 22) registry/src/js/connection-builder.js:369— generateJSON has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 3). Of this number, 15 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
db_command.run_db_migrate_command (cognitive 21) REDACTED:88— db_command.run_db_migrate_command has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
manifest.validate_bundle_version_manifest_structure (cognitive 21) airflow-core/src/airflow/dag_processing/bundles/manifest.py:469— manifest.validate_bundle_version_manifest_structure has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 5, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TriggerRunnerSupervisor._handle_request (cognitive 21) airflow-core/src/airflow/jobs/triggerer_job_runner.py:619— TriggerRunnerSupervisor._handle_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerRunnerSupervisor._create_workload (cognitive 21) airflow-core/src/airflow/jobs/triggerer_job_runner.py:879— TriggerRunnerSupervisor._create_workload has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, error handling 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerRunner.create_triggers (cognitive 21) airflow-core/src/airflow/jobs/triggerer_job_runner.py:1470— TriggerRunner.create_triggers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
taskinstance.apply_loop_clear_scope (cognitive 21) REDACTED:910— taskinstance.apply_loop_clear_scope has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins_manager._describe_ui_action_error (cognitive 21) airflow-core/src/airflow/plugins_manager.py:366— plugins_manager._describe_ui_action_error has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db_cleanup.run_cleanup (cognitive 21) REDACTED:1027— db_cleanup.run_cleanup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
developer_commands._build_python_docs (cognitive 21) dev/breeze/src/airflow_breeze/commands/developer_commands.py:888— developer_commands._build_python_docs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sbom_commands.core_jobs (cognitive 21) dev/breeze/src/airflow_breeze/commands/sbom_commands.py:502— sbom_commands.core_jobs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.errors_detected_in_params (cognitive 21) REDACTED:618— setup_commands.errors_detected_in_params has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (7 pts), ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
confirm.prompt_space_continue (cognitive 21) dev/breeze/src/airflow_breeze/utils/confirm.py:223— confirm.prompt_space_continue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fork_ci_reconcile.discover (cognitive 21) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:830— fork_ci_reconcile.discover has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fork_ci_reconcile.fetch_fork_observations (cognitive 21) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:877— fork_ci_reconcile.fetch_fork_observations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_dependencies.load_constraints (cognitive 21) REDACTED:331— provider_dependencies.load_constraints has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_idea._find_all_jdk_table_xmls (cognitive 21) REDACTED:564— setup_idea._find_all_jdk_table_xmls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SuperFastPRFinder.is_rookie_author (cognitive 21) REDACTED:626— SuperFastPRFinder.is_rookie_author has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
providers_extensions._render_openlineage_supported_classes_content (cognitive 21) devel-common/src/sphinx_exts/providers_extensions.py:392— providers_extensions._render_openlineage_supported_classes_content has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsBatchExecutor._process_workloads (cognitive 21) providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:152— AwsBatchExecutor._process_workloads has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsEcsExecutor.attempt_workload_runs (cognitive 21) providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:418— AwsEcsExecutor.attempt_workload_runs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3 (6 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmrCreateJobFlowOperator.execute (cognitive 21) providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:837— EmrCreateJobFlowOperator.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), error handling 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
waiter_with_logging.wait (cognitive 21) providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:61— waiter_with_logging.wait has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (waiter_with_logging.async_wait) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
waiter_with_logging.async_wait (cognitive 21) providers/amazon/src/airflow/providers/amazon/aws/utils/waiter_with_logging.py:153— waiter_with_logging.async_wait has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (waiter_with_logging.wait) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
KubernetesExecutor.sync (cognitive 21) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:554— KubernetesExecutor.sync has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PodManager._reconcile_requested_log_containers (cognitive 21) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:680— PodManager._reconcile_requested_log_containers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pod_manager.await_pod_start (cognitive 21) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:148— pod_manager.await_pod_start has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIBatchAdapter._parse_result_line (cognitive 21) providers/common/ai/src/airflow/providers/common/ai/batch/openai.py:389— OpenAIBatchAdapter._parse_result_line has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (10 pts), if/else 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentOperator.__init__ (cognitive 21) providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:518— AgentOperator.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 10, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AgentOperator._resume_after_tool_approval (cognitive 21) providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:1306— AgentOperator._resume_after_tool_approval has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
masking._mask (cognitive 21) providers/common/ai/src/airflow/providers/common/ai/utils/masking.py:91— masking._mask has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksReposCreateOperator.execute (cognitive 21) providers/databricks/src/airflow/providers/databricks/operators/databricks_repos.py:129— DatabricksReposCreateOperator.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiscordCommonHandler.validate_embed (cognitive 21) providers/discord/src/airflow/providers/discord/hooks/discord_webhook.py:65— DiscordCommonHandler.validate_embed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAirflowSecurityManagerOverride._get_custom_roles_config (cognitive 21) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:1263— FabAirflowSecurityManagerOverride._get_custom_roles_config has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigQueryHook.__init__ (cognitive 21) providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py:189— BigQueryHook.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PsrpHook.invoke (cognitive 21) providers/microsoft/psrp/src/airflow/providers/microsoft/psrp/hooks/psrp.py:163— PsrpHook.invoke has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnowflakeHook._add_authentication_config (cognitive 21) providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py:615— SnowflakeHook._add_authentication_config has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
store_stable_versions.main (cognitive 21) scripts/ci/docs/store_stable_versions.py:138— store_stable_versions.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FirstLimitVisitor.get_state (cognitive 21) scripts/ci/prek/check_first_limit.py:57— FirstLimitVisitor.get_state has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_usage.sync_shared_dependencies (cognitive 21) scripts/ci/prek/check_shared_distributions_usage.py:673— check_shared_distributions_usage.sync_shared_dependencies has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
validate_operators_init._handle_parent_constructor_kwargs (cognitive 21) scripts/ci/prek/validate_operators_init.py:124— validate_operators_init._handle_parent_constructor_kwargs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
summarize_captured_warnings.group_report_warnings (cognitive 21) scripts/ci/testing/summarize_captured_warnings.py:178— summarize_captured_warnings.group_report_warnings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 6 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowSDKConfigParser.expand_all_configuration_values (cognitive 21) task-sdk/src/airflow/sdk/configuration.py:211— AirflowSDKConfigParser.expand_all_configuration_values has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Connection.GetURI (cognitive 21) go-sdk/sdk/connection.go:56— Connection.GetURI has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerDAGModal.TriggerDAGModal (cognitive 21) airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGModal.tsx:55— TriggerDAGModal.TriggerDAGModal has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 1 (4 pts), boolean chains 1 (nesting depth added 11). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Grid.Grid (cognitive 21) airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx:73— Grid.Grid has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 14, boolean chains 7. Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ConnectionForm.ConnectionForm (cognitive 21) airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx:49— ConnectionForm.ConnectionForm has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 4, error handling 3, if/else 2 (nesting depth added 4). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (validateAndPrettifyJson, a function literal at line 233, a function literal at line 86, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useLogs.parseLogs (cognitive 21) airflow-core/src/airflow/ui/src/queries/useLogs.tsx:119— useLogs.parseLogs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 5 (7 pts), boolean chains 4, error handling 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
datetimeUtils.getDurationParts (cognitive 21) airflow-core/src/airflow/ui/src/utils/datetimeUtils.ts:91— datetimeUtils.getDurationParts has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 8 (10 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
groupTask.getGroupTask (cognitive 21) airflow-core/src/airflow/ui/src/utils/groupTask.ts:27— groupTask.getGroupTask has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (8 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hitl.getHITLParamsDict (cognitive 21) airflow-core/src/airflow/ui/src/utils/hitl.ts:76— hitl.getHITLParamsDict has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 5). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 119). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
app.init_plugins (cognitive 20) airflow-core/src/airflow/api_fastapi/app.py:259— app.init_plugins has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_bundles.get_dag_bundle_files (cognitive 20) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_bundles.py:323— dag_bundles.get_dag_bundle_files has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances.get_task_instance_count (cognitive 20) airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:1543— task_instances.get_task_instance_count has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_command.dag_list_dags (cognitive 20) airflow-core/src/airflow/cli/commands/dag_command.py:553— dag_command.dag_list_dags has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_command.task_clear (cognitive 20) airflow-core/src/airflow/cli/commands/task_command.py:593— task_command.task_clear has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProvidersManager._discover_hooks_from_hook_class_names (cognitive 20) airflow-core/src/airflow/providers_manager.py:743— ProvidersManager._discover_hooks_from_hook_class_names has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stringify.stringify (cognitive 20) airflow-core/src/airflow/serialization/stringify.py:137— stringify.stringify has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
cli._mask_parsed_arguments (cognitive 20) airflow-core/src/airflow/utils/cli.py:384— cli._mask_parsed_arguments has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (7 pts), boolean chains 2, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_edges.dag_edges (cognitive 20) airflow-core/src/airflow/utils/dag_edges.py:35— dag_edges.dag_edges has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
deprecation_tools.add_deprecated_classes (cognitive 20) airflow-core/src/airflow/utils/deprecation_tools.py:94— deprecation_tools.add_deprecated_classes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileTaskHandler._read (cognitive 20) airflow-core/src/airflow/utils/log/file_task_handler.py:555— FileTaskHandler._read has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), error handling 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CommandFactory._apply_datamodel_defaults (cognitive 20) airflow-ctl/src/airflowctl/ctl/cli_config.py:807— CommandFactory._apply_datamodel_defaults has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
developer_commands.start_airflow (cognitive 20) dev/breeze/src/airflow_breeze/commands/developer_commands.py:594— developer_commands.start_airflow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
provider_documentation._update_file (cognitive 20) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:781— provider_documentation._update_file has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fork_ci_reconcile.apply_plan (cognitive 20) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:1193— fork_ci_reconcile.apply_plan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
parallel.summarize_results_outside_of_folded_logs (cognitive 20) dev/breeze/src/airflow_breeze/utils/parallel.py:487— parallel.summarize_results_outside_of_folded_logs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3DocsPublish.publish_stable_version_docs (cognitive 20) dev/breeze/src/airflow_breeze/utils/publish_docs_to_s3.py:155— S3DocsPublish.publish_stable_version_docs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrStat.calc_review_comments (cognitive 20) REDACTED:414— PrStat.calc_review_comments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsBatchExecutor.attempt_submit_jobs (cognitive 20) providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:368— AwsBatchExecutor.attempt_submit_jobs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SageMakerTransformOperator.execute (cognitive 20) providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:851— SageMakerTransformOperator.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RedshiftToS3Operator.execute (cognitive 20) providers/amazon/src/airflow/providers/amazon/aws/transfers/redshift_to_s3.py:169— RedshiftToS3Operator.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PinotAdminHook.create_segment (cognitive 20) providers/apache/pinot/src/airflow/providers/apache/pinot/hooks/pinot.py:137— PinotAdminHook.create_segment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClickHouseHook._get_client_kwargs (cognitive 20) providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:189— ClickHouseHook._get_client_kwargs has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), error handling 2 (4 pts), loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LLMOperator.execute (cognitive 20) providers/common/ai/src/airflow/providers/common/ai/operators/llm.py:361— LLMOperator.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (8 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LLMBranchOperator.execute (cognitive 20) providers/common/ai/src/airflow/providers/common/ai/operators/llm_branch.py:211— LLMBranchOperator.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 6 (8 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
query_results.build_query_result (cognitive 20) providers/common/ai/src/airflow/providers/common/ai/utils/query_results.py:111— query_results.build_query_result has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DbApiHook.run (cognitive 20) providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py:776— DbApiHook.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DbApiHook.insert_rows (cognitive 20) providers/common/sql/src/airflow/providers/common/sql/hooks/sql.py:975— DbApiHook.insert_rows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openlineage._extract_new_clusters_from_databricks_job (cognitive 20) providers/databricks/src/airflow/providers/databricks/utils/openlineage.py:401— openlineage._extract_new_clusters_from_databricks_job has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudSQLDatabaseHook._validate_inputs (cognitive 20) REDACTED:1069— CloudSQLDatabaseHook._validate_inputs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PubSubHook._validate_messages (cognitive 20) providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:164— PubSubHook._validate_messages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, error handling 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureDataFactoryTrigger.run (cognitive 20) providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/data_factory.py:189— AzureDataFactoryTrigger.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (7 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MySqlHook._get_conn_config_mysql_client (cognitive 20) providers/mysql/src/airflow/providers/mysql/hooks/mysql.py:118— MySqlHook._get_conn_config_mysql_client has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
OdbcHook.odbc_connection_string (cognitive 20) providers/odbc/src/airflow/providers/odbc/hooks/odbc.py:126— OdbcHook.odbc_connection_string has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIAgentSessionOperator.execute (cognitive 20) providers/openai/src/airflow/providers/openai/operators/agent.py:89— OpenAIAgentSessionOperator.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnowflakeSqlApiHook.execute_query (cognitive 20) providers/snowflake/src/airflow/providers/snowflake/hooks/sql_api.py:139— SnowflakeSqlApiHook.execute_query has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SSHHook.get_conn (cognitive 20) providers/ssh/src/airflow/providers/ssh/hooks/ssh.py:342— SSHHook.get_conn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SSHTunnel._serve_forever (cognitive 20) providers/ssh/src/airflow/providers/ssh/tunnel.py:244— SSHTunnel._serve_forever has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TdLoadOperator._execute_based_on_configuration (cognitive 20) providers/teradata/src/airflow/providers/teradata/operators/tpt.py:493— TdLoadOperator._execute_based_on_configuration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_cli_definition_imports.main (cognitive 20) scripts/ci/prek/check_cli_definition_imports.py:122— check_cli_definition_imports.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (8 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_conn_id_templated.resolve_template_fields (cognitive 20) scripts/ci/prek/check_conn_id_templated.py:148— check_conn_id_templated.resolve_template_fields has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_deferred_hook_configuration.collect_errors (cognitive 20) scripts/ci/prek/check_deferred_hook_configuration.py:226— check_deferred_hook_configuration.collect_errors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_metrics_synced_with_the_registry.scan_file_for_direct_stats_imports (cognitive 20) scripts/ci/prek/check_metrics_synced_with_the_registry.py:341— check_metrics_synced_with_the_registry.scan_file_for_direct_stats_imports has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_prek_utils.parse_operations (cognitive 20) scripts/ci/prek/common_prek_utils.py:1008— common_prek_utils.parse_operations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_provider_yaml_files_check.assert_sets_equal (cognitive 20) scripts/in_container/run_provider_yaml_files_check.py:207— run_provider_yaml_files_check.assert_sets_equal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (6 pts), error handling 4, boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate_yaml_format_for_hooks.extract_conn_fields (cognitive 20) scripts/tools/generate_yaml_format_for_hooks.py:47— generate_yaml_format_for_hooks.extract_conn_fields has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
structlog.configure_logging (cognitive 20) shared/logging/src/airflow_shared/logging/structlog.py:542— structlog.configure_logging has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
context._async_get_connection (cognitive 20) REDACTED:264— context._async_get_connection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (5 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeTaskInstance.get_template_context (cognitive 20) task-sdk/src/airflow/sdk/execution_time/task_runner.py:322— RuntimeTaskInstance.get_template_context has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_runner._push_xcom_if_needed (cognitive 20) task-sdk/src/airflow/sdk/execution_time/task_runner.py:2419— task_runner._push_xcom_if_needed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProvidersManagerTaskRuntime._discover_hooks_from_hook_class_names (cognitive 20) task-sdk/src/airflow/sdk/providers_manager_runtime.py:305— ProvidersManagerTaskRuntime._discover_hooks_from_hook_class_names has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunBackfillForm.RunBackfillForm (cognitive 20) airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:54— RunBackfillForm.RunBackfillForm has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 7 function items inside it that branch (onSubmit, a function literal at line 107, a function literal at line 112, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FilterBar.FilterBar (cognitive 20) airflow-core/src/airflow/ui/src/components/FilterBar/FilterBar.tsx:46— FilterBar.FilterBar has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (5 pts), ternaries 5, loops 1, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 80, a function literal at line 92, renderFilter, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PresetFiltersMenu.PresetFiltersMenu (cognitive 20) airflow-core/src/airflow/ui/src/components/PresetFiltersMenu.tsx:50— PresetFiltersMenu.PresetFiltersMenu has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 6, boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 122, handleSave, a function literal at line 218, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
useIframeUrlSync.useIframeUrlSync (cognitive 20) airflow-core/src/airflow/ui/src/hooks/useIframeUrlSync.ts:60— useIframeUrlSync.useIframeUrlSync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 2, ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 97, 149, 90). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CreateAssetEventModal.CreateAssetEventModal (cognitive 20) airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.tsx:64— CreateAssetEventModal.CreateAssetEventModal has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 4, if/else 3 (nesting depth added 1). Of this number, 11 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Header.Header (cognitive 20) airflow-core/src/airflow/ui/src/pages/Dag/Header.tsx:60— Header.Header has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (19 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRuns.DagRuns (cognitive 20) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:257— DagRuns.DagRuns has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 15 (16 pts), boolean chains 4 (nesting depth added 1). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DagFolderTree.DagFolderTree (cognitive 20) airflow-core/src/airflow/ui/src/pages/DagsList/DagFolderTree/DagFolderTree.tsx:114— DagFolderTree.DagFolderTree has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 8). Of this number, 14 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dashboard.Dashboard (cognitive 20) airflow-core/src/airflow/ui/src/pages/Dashboard/Dashboard.tsx:49— Dashboard.Dashboard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (19 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
dag_run.trigger_dag_run (cognitive 19) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:780— dag_run.trigger_dag_run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, error handling 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
security.is_safe_url (cognitive 19) airflow-core/src/airflow/api_fastapi/core_api/security.py:1369— security.is_safe_url has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xcoms._build_xcom_read (cognitive 19) airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:180— xcoms._build_xcom_read has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 3 (5 pts), error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetManager._get_or_create_apdr (cognitive 19) airflow-core/src/airflow/assets/manager.py:662— AssetManager._get_or_create_apdr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (3 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner.adopt_or_reset_orphaned_tasks (cognitive 19) airflow-core/src/airflow/jobs/scheduler_job_runner.py:3704— SchedulerJobRunner.adopt_or_reset_orphaned_tasks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0080_3_1_0_modify_deadline_callback_schema.upgrade (cognitive 19) airflow-core/src/airflow/migrations/versions/0080_3_1_0_modify_deadline_callback_schema.py:51— 0080_3_1_0_modify_deadline_callback_schema.upgrade has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedDagModel._try_reuse_deadline_uuids (cognitive 19) airflow-core/src/airflow/models/serialized_dag.py:440— SerializedDagModel._try_reuse_deadline_uuids has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskCoordinateResolver._build_producer_request (cognitive 19) airflow-core/src/airflow/models/task_coordinates.py:670— TaskCoordinateResolver._build_producer_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance.defer_task (cognitive 19) REDACTED:2621— TaskInstance.defer_task has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChainMapper.to_downstream (cognitive 19) airflow-core/src/airflow/partition_mappers/chain.py:43— ChainMapper.to_downstream has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (7 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins_manager._load_translation_source (cognitive 19) airflow-core/src/airflow/plugins_manager.py:705— plugins_manager._load_translation_source has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (8 pts), error handling 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_version_diff._canonicalize_value (cognitive 19) airflow-core/src/airflow/serialization/dag_version_diff.py:882— dag_version_diff._canonicalize_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_version_diff._get_public_path (cognitive 19) airflow-core/src/airflow/serialization/dag_version_diff.py:1184— dag_version_diff._get_public_path has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MappedTaskUpstreamDep._get_dep_statuses (cognitive 19) airflow-core/src/airflow/ti_deps/deps/mapped_task_upstream_dep.py:51— MappedTaskUpstreamDep._get_dep_statuses has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
constraints_version_check.parse_packages_from_lines (cognitive 19) REDACTED:375— constraints_version_check.parse_packages_from_lines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
publish_registry_versions.publish_versions (cognitive 19) dev/breeze/src/airflow_breeze/utils/publish_registry_versions.py:112— publish_registry_versions.publish_versions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
close_prs_over_open_pr_limit.build_plans (cognitive 19) dev/close_prs_over_open_pr_limit.py:206— close_prs_over_open_pr_limit.build_plans has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
package_filter.find_packages_to_build (cognitive 19) devel-common/src/sphinx_exts/docs_build/package_filter.py:43— package_filter.find_packages_to_build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
operators_and_hooks_ref._render_deferrable_operator_content (cognitive 19) REDACTED:202— operators_and_hooks_ref._render_deferrable_operator_content has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubstitutionCodeBlockTransform.apply (cognitive 19) devel-common/src/sphinx_exts/substitution_extensions.py:59— SubstitutionCodeBlockTransform.apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ecs_executor_config.build_task_kwargs (cognitive 19) providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor_config.py:67— ecs_executor_config.build_task_kwargs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmrHook.add_job_flow_steps (cognitive 19) providers/amazon/src/airflow/providers/amazon/aws/hooks/emr.py:140— EmrHook.add_job_flow_steps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SageMakerProcessingOperator._read_output_files (cognitive 19) providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker.py:408— SageMakerProcessingOperator._read_output_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BeamRunJavaPipelineOperator.execute_on_dataflow (cognitive 19) providers/apache/beam/src/airflow/providers/apache/beam/operators/beam.py:631— BeamRunJavaPipelineOperator.execute_on_dataflow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HiveServer2Hook._get_results (cognitive 19) providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:935— HiveServer2Hook._get_results has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KylinCubeOperator.execute (cognitive 19) providers/apache/kylin/src/airflow/providers/apache/kylin/operators/kylin_cube.py:137— KylinCubeOperator.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 4, loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesInstallKueueOperator.execute (cognitive 19) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/kueue.py:71— KubernetesInstallKueueOperator.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentOperator._require_durable_toolset_ids (cognitive 19) providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:641— AgentOperator._require_durable_toolset_ids has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentLoaderOperator._json_item_to_doc (cognitive 19) providers/common/ai/src/airflow/providers/common/ai/operators/document_loader.py:409— DocumentLoaderOperator._json_item_to_doc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LLMOperator.__init__ (cognitive 19) providers/common/ai/src/airflow/providers/common/ai/operators/llm.py:241— LLMOperator.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
skills._clone_git (cognitive 19) providers/common/ai/src/airflow/providers/common/ai/skills.py:100— skills._clone_git has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 3, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
file_analysis._render_avro (cognitive 19) providers/common/ai/src/airflow/providers/common/ai/utils/file_analysis.py:551— file_analysis._render_avro has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), error handling 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksSqlOperator._process_output (cognitive 19) providers/databricks/src/airflow/providers/databricks/operators/databricks_sql.py:274— DatabricksSqlOperator._process_output has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DatabricksCopyIntoOperator._create_sql_query (cognitive 19) providers/databricks/src/airflow/providers/databricks/operators/databricks_sql.py:503— DatabricksCopyIntoOperator._create_sql_query has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DockerOperator.execute (cognitive 19) providers/docker/src/airflow/providers/docker/operators/docker.py:496— DockerOperator.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FABDBManager.upgradedb (cognitive 19) providers/fab/src/airflow/providers/fab/auth_manager/models/db.py:116— FABDBManager.upgradedb has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComputeEngineSSHHook._load_connection_config (cognitive 19) providers/google/src/airflow/providers/google/cloud/hooks/compute_ssh.py:222— ComputeEngineSSHHook._load_connection_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GCSHook.upload (cognitive 19) providers/google/src/airflow/providers/google/cloud/hooks/gcs.py:508— GCSHook.upload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataprocCreateBatchOperator.execute (cognitive 19) providers/google/src/airflow/providers/google/cloud/operators/dataproc.py:2515— DataprocCreateBatchOperator.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GCSToGCSOperator._copy_single_object (cognitive 19) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py:549— GCSToGCSOperator._copy_single_object has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudComposerDAGRunTrigger.run (cognitive 19) providers/google/src/airflow/providers/google/cloud/triggers/cloud_composer.py:296— CloudComposerDAGRunTrigger.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GcpBodyFieldValidator._validate_field (cognitive 19) providers/google/src/airflow/providers/google/cloud/utils/field_validator.py:314— GcpBodyFieldValidator._validate_field has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoogleBaseHook.get_credentials_and_project_id (cognitive 19) providers/google/src/airflow/providers/google/common/hooks/base_google.py:330— GoogleBaseHook.get_credentials_and_project_id has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
JdbcHook._get_openlineage_scheme (cognitive 19) providers/jdbc/src/airflow/providers/jdbc/hooks/jdbc.py:303— JdbcHook._get_openlineage_scheme has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
KeycloakJWTMiddleware.dispatch (cognitive 19) providers/keycloak/src/airflow/providers/keycloak/auth_manager/middleware.py:71— KeycloakJWTMiddleware.dispatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureBatchOperator._check_inputs (cognitive 19) providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/batch.py:200— AzureBatchOperator._check_inputs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InfoJsonEncodable._include_fields (cognitive 19) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:868— InfoJsonEncodable._include_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRunInfo.deadlines (cognitive 19) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:1013— DagRunInfo.deadlines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (5 pts), loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeradataHook._get_conn_config_teradatasql (cognitive 19) providers/teradata/src/airflow/providers/teradata/hooks/teradata.py:177— TeradataHook._get_conn_config_teradatasql has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TdLoadOperator._validate_and_determine_mode (cognitive 19) providers/teradata/src/airflow/providers/teradata/operators/tpt.py:384— TdLoadOperator._validate_and_determine_mode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compare.filter_cases (cognitive 19) scripts/ci/lang_sdk_serialization/compare.py:117— compare.filter_cases has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serialize_python.build_dag (cognitive 19) scripts/ci/lang_sdk_serialization/serialize_python.py:85— serialize_python.build_dag has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (8 pts), ternaries 3 (6 pts), if/else 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_common_sql_dependency.check_sql_providers_dependency (cognitive 19) scripts/ci/prek/check_common_sql_dependency.py:97— check_common_sql_dependency.check_sql_providers_dependency has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_contextmanager_class_decorators.main (cognitive 19) scripts/ci/prek/check_contextmanager_class_decorators.py:104— check_contextmanager_class_decorators.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_provider_config_fallback_defaults.find_drift (cognitive 19) scripts/ci/prek/check_provider_config_fallback_defaults.py:120— check_provider_config_fallback_defaults.find_drift has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_usage.ensure_symlinks (cognitive 19) scripts/ci/prek/check_shared_distributions_usage.py:215— check_shared_distributions_usage.ensure_symlinks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fab_permissions_doc._entity_maps (cognitive 19) scripts/ci/prek/fab_permissions_doc.py:136— fab_permissions_doc._entity_maps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
update_providers_dependencies.find_all_providers_and_provider_files (cognitive 19) scripts/ci/prek/update_providers_dependencies.py:72— update_providers_dependencies.find_all_providers_and_provider_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser.configuration_description (cognitive 19) shared/configuration/src/airflow_shared/configuration/parser.py:327— AirflowConfigParser.configuration_description has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser._write_option_header (cognitive 19) shared/configuration/src/airflow_shared/configuration/parser.py:1912— AirflowConfigParser._write_option_header has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser._write_value (cognitive 19) shared/configuration/src/airflow_shared/configuration/parser.py:2040— AirflowConfigParser._write_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parser.configure_parser_from_configuration_description (cognitive 19) shared/configuration/src/airflow_shared/configuration/parser.py:183— parser.configure_parser_from_configuration_description has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 1 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskGroupMixin._compute_pass_order (cognitive 19) shared/dagnode/src/airflow_shared/dagnode/node.py:300— TaskGroupMixin._compute_pass_order has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
context.context_to_airflow_vars (cognitive 19) REDACTED:1640— context.context_to_airflow_vars has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeTaskInstance.xcom_pull (cognitive 19) task-sdk/src/airflow/sdk/execution_time/task_runner.py:544— RuntimeTaskInstance.xcom_pull has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_runner._serialize_rendered_fields (cognitive 19) task-sdk/src/airflow/sdk/execution_time/task_runner.py:1421— task_runner._serialize_rendered_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_runner._handle_trigger_dag_run (cognitive 19) task-sdk/src/airflow/sdk/execution_time/task_runner.py:2093— task_runner._handle_trigger_dag_run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerRunner.run (cognitive 19) java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/execution/TriggerRunner.kt:61— TriggerRunner.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
binding.collectStructFields (cognitive 19) REDACTED:631— binding.collectStructFields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
execution.convertArgBindings (cognitive 19) go-sdk/pkg/execution/task_runner.go:153— execution.convertArgBindings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.defaultLiteral (cognitive 19) go-sdk/pkg/execution/genmodels/gen/main.go:512— main.defaultLiteral has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FieldAdvancedArray.FieldAdvancedArray::handleChange (cognitive 19) airflow-core/src/airflow/ui/src/components/FlexibleForm/FieldAdvancedArray.tsx:33— FieldAdvancedArray.FieldAdvancedArray::handleChange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DateTimeInput.DateTimeInput (cognitive 19) airflow-core/src/airflow/ui/src/components/DateTimeInput.tsx:69— DateTimeInput.DateTimeInput has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10, if/else 4 (5 pts), boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (commit, getFieldError, applyChange, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TableList.TableList (cognitive 19) airflow-core/src/airflow/ui/src/components/DataTable/TableList.tsx:36— TableList.TableList has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 51, 122). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Gantt.Gantt (cognitive 19) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx:61— Gantt.Gantt has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 8, if/else 2. Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HITLResponseForm.HITLResponseForm (cognitive 19) airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLResponseForm.tsx:62— HITLResponseForm.HITLResponseForm has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 7, error handling 1, if/else 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStateStoreModal.TaskStateStoreModal (cognitive 19) airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStoreModal.tsx:72— TaskStateStoreModal.TaskStateStoreModal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 102, getExpiresAt, onSave, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
pack.parsePackArgs (cognitive 19) ts-sdk/src/cli/pack.ts:75— pack.parsePackArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mark_tasks.find_task_relatives (cognitive 18) airflow-core/src/airflow/api/common/mark_tasks.py:127— mark_tasks.find_task_relatives has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger_dag._trigger_dag (cognitive 18) airflow-core/src/airflow/api/common/trigger_dag.py:51— trigger_dag._trigger_dag has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
security._collect_teams_to_check (cognitive 18) airflow-core/src/airflow/api_fastapi/core_api/security.py:1315— security._collect_teams_to_check has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_instances._patch_ti_validate_request (cognitive 18) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:212— task_instances._patch_ti_validate_request has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
dependencies.get_upstream_assets (cognitive 18) airflow-core/src/airflow/api_fastapi/core_api/services/ui/dependencies.py:51— dependencies.get_upstream_assets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
variable_command.variables_import (cognitive 18) airflow-core/src/airflow/cli/commands/variable_command.py:143— variable_command.variables_import has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 4 (5 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DagProcessorAPIClient._register_job (cognitive 18) airflow-core/src/airflow/dag_processing/api_client.py:251— DagProcessorAPIClient._register_job has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseExecutor.get_event_buffer (cognitive 18) airflow-core/src/airflow/executors/base_executor.py:682— BaseExecutor.get_event_buffer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SchedulerJobRunner._start_queued_dagruns (cognitive 18) airflow-core/src/airflow/jobs/scheduler_job_runner.py:3114— SchedulerJobRunner._start_queued_dagruns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0055_3_0_0_remove_pickled_data_from_dagrun_table.upgrade (cognitive 18) REDACTED:81— 0055_3_0_0_remove_pickled_data_from_dagrun_table.upgrade has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskCoordinateResolver.producer_contexts (cognitive 18) airflow-core/src/airflow/models/task_coordinates.py:491— TaskCoordinateResolver.producer_contexts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance._filter_for_tis (cognitive 18) REDACTED:3021— TaskInstance._filter_for_tis has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
plugins_manager._validate_applies_to (cognitive 18) airflow-core/src/airflow/plugins_manager.py:413— plugins_manager._validate_applies_to has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
kerberos.renew_from_kt (cognitive 18) airflow-core/src/airflow/security/kerberos.py:67— kerberos.renew_from_kt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SerializedTaskGroup._project_child_deps (cognitive 18) airflow-core/src/airflow/serialization/definitions/taskgroup.py:267— SerializedTaskGroup._project_child_deps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseSerialization.serialize_to_json (cognitive 18) airflow-core/src/airflow/serialization/serialized_objects.py:466— BaseSerialization.serialize_to_json has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerRuleDep._evaluate_trigger_rule (cognitive 18) airflow-core/src/airflow/ti_deps/deps/trigger_rule_dep.py:119— TriggerRuleDep._evaluate_trigger_rule has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseTrigger.task_instance (cognitive 18) airflow-core/src/airflow/triggers/base.py:118— BaseTrigger.task_instance has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db_cleanup._archive_cascading_attempt_data (cognitive 18) REDACTED:407— db_cleanup._archive_cascading_attempt_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 6 (9 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
db_cleanup._build_query (cognitive 18) REDACTED:680— db_cleanup._build_query has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db_cleanup._get_archived_table_names (cognitive 18) REDACTED:988— db_cleanup._get_archived_table_names has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskLogReader.read_log_stream (cognitive 18) airflow-core/src/airflow/utils/log/log_reader.py:100— TaskLogReader.read_log_stream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
operations.fill_missing_fields (cognitive 18) airflow-ctl/src/airflowctl/api/operations.py:173— operations.fill_missing_fields has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), boolean chains 5, ternaries 1 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
scheduler_dag_execution_timing.main (cognitive 18) dev/airflow_perf/scheduler_dag_execution_timing.py:210— scheduler_dag_execution_timing.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ci_commands.audit (cognitive 18) REDACTED:1760— ci_commands.audit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kubernetes_kustomize_commands.smoke_test_overlay (cognitive 18) dev/breeze/src/airflow_breeze/commands/kubernetes_kustomize_commands.py:606— kubernetes_kustomize_commands.smoke_test_overlay has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
fork_ci_gate.decide (cognitive 18) dev/breeze/src/airflow_breeze/utils/fork_ci_gate.py:212— fork_ci_gate.decide has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SelectiveChecks._extract_long_provider_tests (cognitive 18) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1723— SelectiveChecks._extract_long_provider_tests has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks.docs_list_as_string (cognitive 18) dev/breeze/src/airflow_breeze/utils/selective_checks.py:1939— SelectiveChecks.docs_list_as_string has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
extract_metadata.fetch_pypi_dates (cognitive 18) REDACTED:82— extract_metadata.fetch_pypi_dates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
conf_constants.get_configs_and_deprecations (cognitive 18) devel-common/src/docs/utils/conf_constants.py:187— conf_constants.get_configs_and_deprecations has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 2 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
operators_and_hooks_ref._prepare_operators_data (cognitive 18) REDACTED:97— operators_and_hooks_ref._prepare_operators_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalyticDBSparkHook.build_submit_app_data (cognitive 18) providers/alibaba/src/airflow/providers/alibaba/cloud/hooks/analyticdb_spark.py:197— AnalyticDBSparkHook.build_submit_app_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
S3Hook.delete_bucket (cognitive 18) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1547— S3Hook.delete_bucket has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SageMakerHook.describe_training_job_with_log (cognitive 18) providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker.py:577— SageMakerHook.describe_training_job_with_log has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SageMakerHook.describe_training_job_with_log_async (cognitive 18) providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker.py:1321— SageMakerHook.describe_training_job_with_log_async has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSubmitHook._start_yarn_application_status_tracking (cognitive 18) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:967— SparkSubmitHook._start_yarn_application_status_tracking has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkSubmitHook.on_kill (cognitive 18) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:1414— SparkSubmitHook.on_kill has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseDatabricksHook._get_token (cognitive 18) REDACTED:1215— BaseDatabricksHook._get_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (BaseDatabricksHook._a_get_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
BaseDatabricksHook._a_get_token (cognitive 18) REDACTED:1257— BaseDatabricksHook._a_get_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (BaseDatabricksHook._get_token) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DatabricksSqlHook.get_conn (cognitive 18) providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py:209— DatabricksSqlHook.get_conn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DbtCloudRunJobOperator.execute (cognitive 18) providers/dbt/cloud/src/airflow/providers/dbt/cloud/operators/dbt.py:232— DbtCloudRunJobOperator.execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DockerSwarmOperator._run_service (cognitive 18) providers/docker/src/airflow/providers/docker/operators/docker_swarm.py:181— DockerSwarmOperator._run_service has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
user_command._import_users (cognitive 18) providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/user_command.py:223— user_command._import_users has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAirflowSecurityManagerOverride.auth_user_oauth (cognitive 18) providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:2342— FabAirflowSecurityManagerOverride.auth_user_oauth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CloudMonitoringHook.upsert_alert (cognitive 18) providers/google/src/airflow/providers/google/cloud/hooks/cloud_monitoring.py:222— CloudMonitoringHook.upsert_alert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (9 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_BigQueryInsertJobOperatorOpenLineageMixin.get_openlineage_facets_on_complete (cognitive 18) providers/google/src/airflow/providers/google/cloud/openlineage/mixins.py:57— _BigQueryInsertJobOperatorOpenLineageMixin.get_openlineage_facets_on_complete has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 5, loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GCSToGCSOperator._copy_source_without_wildcard (cognitive 18) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_gcs.py:347— GCSToGCSOperator._copy_source_without_wildcard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CloudStorageTransferServiceCreateJobsTrigger.run (cognitive 18) providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:77— CloudStorageTransferServiceCreateJobsTrigger.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataprocOperationTrigger.run (cognitive 18) providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:773— DataprocOperationTrigger.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
http._process_extra_options_from_connection (cognitive 18) providers/http/src/airflow/providers/http/hooks/http.py:102— http._process_extra_options_from_connection has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
GCSToAzureBlobStorageOperator.execute (cognitive 18) providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/gcs_to_wasb.py:164— GCSToAzureBlobStorageOperator.execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.get_runtime_outlet_assets (cognitive 18) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:1174— utils.get_runtime_outlet_assets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpensearchRemoteLogIO.read (cognitive 18) providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:1035— OpensearchRemoteLogIO.read has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
OracleHook.insert_rows (cognitive 18) providers/oracle/src/airflow/providers/oracle/hooks/oracle.py:306— OracleHook.insert_rows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostgresHook.get_aws_iam_token (cognitive 18) providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:505— PostgresHook.get_aws_iam_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalTaskSensor.execute (cognitive 18) providers/standard/src/airflow/providers/standard/sensors/external_task.py:465— ExternalTaskSensor.execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkflowTrigger.run (cognitive 18) providers/standard/src/airflow/providers/standard/triggers/external_task.py:104— WorkflowTrigger.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VerticaHook.get_conn (cognitive 18) providers/vertica/src/airflow/providers/vertica/hooks/vertica.py:71— VerticaHook.get_conn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_deferred_hook_configuration.walk_defer_sites (cognitive 18) scripts/ci/prek/check_deferred_hook_configuration.py:143— check_deferred_hook_configuration.walk_defer_sites has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_example_dag_tags.check_file (cognitive 18) scripts/ci/prek/check_example_dag_tags.py:90— check_example_dag_tags.check_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FirstLimitVisitor.generic_visit (cognitive 18) scripts/ci/prek/check_first_limit.py:150— FirstLimitVisitor.generic_visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_migration_patterns.check_mig003 (cognitive 18) scripts/ci/prek/check_migration_patterns.py:482— check_migration_patterns.check_mig003 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_shared_distributions_structure.check_no_airflow_dependencies (cognitive 18) scripts/ci/prek/check_shared_distributions_structure.py:258— check_shared_distributions_structure.check_no_airflow_dependencies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 6 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_prek_utils.insert_documentation (cognitive 18) scripts/ci/prek/common_prek_utils.py:223— common_prek_utils.insert_documentation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_generate_constraints.freeze_distributions_to_file (cognitive 18) scripts/in_container/run_generate_constraints.py:178— run_generate_constraints.freeze_distributions_to_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser._include_envs (cognitive 18) shared/configuration/src/airflow_shared/configuration/parser.py:870— AirflowConfigParser._include_envs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
EdgeModifier._convert_streams_to_task_groups (cognitive 18) task-sdk/src/airflow/sdk/definitions/edges.py:85— EdgeModifier._convert_streams_to_task_groups has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mappedoperator.validate_mapping_kwargs (cognitive 18) task-sdk/src/airflow/sdk/definitions/mappedoperator.py:76— mappedoperator.validate_mapping_kwargs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskGroup.add (cognitive 18) task-sdk/src/airflow/sdk/definitions/taskgroup.py:245— TaskGroup.add has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskGroup._project_upstream_ids (cognitive 18) task-sdk/src/airflow/sdk/definitions/taskgroup.py:600— TaskGroup._project_upstream_ids has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeTaskInstance.axcom_pull (cognitive 18) task-sdk/src/airflow/sdk/execution_time/task_runner.py:642— RuntimeTaskInstance.axcom_pull has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObjectStoragePath.copy (cognitive 18) task-sdk/src/airflow/sdk/io/path.py:357— ObjectStoragePath.copy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRef.checkInputs (cognitive 18) go-sdk/airflow/inputs.go:197— DagRef.checkInputs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (4 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexibleForm.FlexibleForm (cognitive 18) airflow-core/src/airflow/ui/src/components/FlexibleForm/FlexibleForm.tsx:83— FlexibleForm.FlexibleForm has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 5, if/else 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 138, a function literal at line 98, a function literal at line 163, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
GridTI.GridTI (cognitive 18) airflow-core/src/airflow/ui/src/layouts/Details/Grid/GridTI.tsx:52— GridTI.GridTI has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
providerExternalServices.findSearchTextCollision (cognitive 18) registry/src/_data/providerExternalServices.js:76— providerExternalServices.findSearchTextCollision has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search.document.addEventListener("keydown") (cognitive 18) registry/src/js/search.js:283— search.document.addEventListener("keydown") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filterProviders (cognitive 18) registry/src/js/provider-filters.js:55— filterProviders has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 2 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
(anonymous) (cognitive 18) registry/src/js/search.js:283— (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
app.init_ui_translation_views (cognitive 17) airflow-core/src/airflow/api_fastapi/core_api/app.py:48— app.init_ui_translation_views has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_bundles._import_error_counts (cognitive 17) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_bundles.py:62— dag_bundles._import_error_counts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hitl.update_hitl_detail (cognitive 17) airflow-core/src/airflow/api_fastapi/core_api/routes/public/hitl.py:172— hitl.update_hitl_detail has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
partitioned_dag_runs.get_partitioned_dag_runs (cognitive 17) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/partitioned_dag_runs.py:249— partitioned_dag_runs.get_partitioned_dag_runs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BulkDagRunService.handle_bulk_update (cognitive 17) airflow-core/src/airflow/api_fastapi/core_api/services/public/dag_run.py:445— BulkDagRunService.handle_bulk_update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2, boolean chains 1, error handling 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_coordinates.resolve_task_scope (cognitive 17) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_coordinates.py:147— task_coordinates.resolve_task_scope has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
xcoms.get_xcom (cognitive 17) airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:585— xcoms.get_xcom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_command.dag_test (cognitive 17) airflow-core/src/airflow/cli/commands/dag_command.py:835— dag_command.dag_test has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagFileProcessorManager.prepare_file_queue (cognitive 17) airflow-core/src/airflow/dag_processing/manager.py:1621— DagFileProcessorManager.prepare_file_queue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun.set_state (cognitive 17) airflow-core/src/airflow/models/dagrun.py:650— DagRun.set_state has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_DagDependenciesResolver.resolve (cognitive 17) airflow-core/src/airflow/models/serialized_dag.py:97— _DagDependenciesResolver.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugins_manager._describe_applies_to_path_error (cognitive 17) airflow-core/src/airflow/plugins_manager.py:290— plugins_manager._describe_applies_to_path_error has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dag_version_diff._apply_task_defaults (cognitive 17) airflow-core/src/airflow/serialization/dag_version_diff.py:653— dag_version_diff._apply_task_defaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedDAG.set_task_group_state (cognitive 17) airflow-core/src/airflow/serialization/definitions/dag.py:937— SerializedDAG.set_task_group_state has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
cli._redact_uri_argument (cognitive 17) airflow-core/src/airflow/utils/cli.py:312— cli._redact_uri_argument has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3, loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
auth_command.login (cognitive 17) airflow-ctl/src/airflowctl/ctl/commands/auth_command.py:37— auth_command.login has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ci_commands.workflow_info (cognitive 17) REDACTED:448— ci_commands.workflow_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ci_image_commands.run_build_ci_image (cognitive 17) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:835— ci_image_commands.run_build_ci_image has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kubernetes_commands._run_complete_tests (cognitive 17) dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:2115— kubernetes_commands._run_complete_tests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
production_image_commands.verify (cognitive 17) dev/breeze/src/airflow_breeze/commands/production_image_commands.py:621— production_image_commands.verify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.clean_old_provider_artifacts (cognitive 17) REDACTED:2281— release_management_commands.clean_old_provider_artifacts has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (7 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
release_management_commands.check_release_files (cognitive 17) REDACTED:5088— release_management_commands.check_release_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.check_that_all_params_are_in_groups (cognitive 17) REDACTED:673— setup_commands.check_that_all_params_are_in_groups has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
testing_commands._run_test_command (cognitive 17) dev/breeze/src/airflow_breeze/commands/testing_commands.py:1874— testing_commands._run_test_command has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReleaseValidator._print_summary (cognitive 17) dev/breeze/src/airflow_breeze/utils/release_validator.py:571— ReleaseValidator._print_summary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectiveChecks._is_self_hosted_label_approved (cognitive 17) dev/breeze/src/airflow_breeze/utils/selective_checks.py:2237— SelectiveChecks._is_self_hosted_label_approved has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_parameters._main_discover (cognitive 17) dev/registry/extract_parameters.py:1302— extract_parameters._main_discover has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (6 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SuperFastPRFinder.search_prs_with_filters (cognitive 17) REDACTED:756— SuperFastPRFinder.search_prs_with_filters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
login.login_callback (cognitive 17) providers/amazon/src/airflow/providers/amazon/aws/auth_manager/routes/login.py:224— login.login_callback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AwsEcsExecutor._process_workloads (cognitive 17) providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:167— AwsEcsExecutor._process_workloads has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3Hook.list_keys (cognitive 17) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:854— S3Hook.list_keys has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3RemoteLogIO.write (cognitive 17) providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:141— S3RemoteLogIO.write has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (3 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3CopyPrefixOperator.execute (cognitive 17) providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:466— S3CopyPrefixOperator.execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 1 (4 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HiveCliHook.test_hql (cognitive 17) providers/apache/hive/src/airflow/providers/apache/hive/hooks/hive.py:376— HiveCliHook.test_hql has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), error handling 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparkJDBCHook._build_jdbc_application_arguments (cognitive 17) providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_jdbc.py:184— SparkJDBCHook._build_jdbc_application_arguments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EdgeWorker.loop (cognitive 17) providers/edge3/src/airflow/providers/edge3/cli/worker.py:651— EdgeWorker.loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FABAuthManagerRoles.patch_role (cognitive 17) providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/services/roles.py:129— FABAuthManagerRoles.patch_role has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
role_command.roles_import (cognitive 17) providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/role_command.py:187— role_command.roles_import has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 3 (5 pts), boolean chains 3, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
init_views.init_plugins (cognitive 17) providers/fab/src/airflow/providers/fab/www/extensions/init_views.py:26— init_views.init_plugins has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitDagBundle.view_url_template (cognitive 17) providers/git/src/airflow/providers/git/bundles/git.py:520— GitDagBundle.view_url_template has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigQueryInsertJobOperator.submit_job (cognitive 17) providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:2544— BigQueryInsertJobOperator.submit_job has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataplexRunDataQualityScanOperator.execute (cognitive 17) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1026— DataplexRunDataQualityScanOperator.execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureFileShareToGCSOperator.execute (cognitive 17) providers/google/src/airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py:146— AzureFileShareToGCSOperator.execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GCSToBigQueryOperator._find_max_value_in_column (cognitive 17) providers/google/src/airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:525— GCSToBigQueryOperator._find_max_value_in_column has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 1 (4 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sql_parser.parse_sql_tables (cognitive 17) providers/informatica/src/airflow/providers/informatica/lineage/sql_parser.py:39— sql_parser.parse_sql_tables has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sql_parser._extract_tables (cognitive 17) providers/informatica/src/airflow/providers/informatica/lineage/sql_parser.py:77— sql_parser._extract_tables has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureContainerInstanceTrigger.run (cognitive 17) providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/container_instance.py:65— AzureContainerInstanceTrigger.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AzureSynapsePipelineTrigger.run (cognitive 17) providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/synapse.py:103— AzureSynapsePipelineTrigger.run has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (8 pts), if/else 4 (8 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PsrpOperator.execute (cognitive 17) providers/microsoft/psrp/src/airflow/providers/microsoft/psrp/operators/psrp.py:125— PsrpOperator.execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
sql.emit_query_lineage (cognitive 17) providers/openlineage/src/airflow/providers/openlineage/api/sql.py:55— sql.emit_query_lineage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
emission_policy._classify_task_rules (cognitive 17) providers/openlineage/src/airflow/providers/openlineage/utils/emission_policy.py:727— emission_policy._classify_task_rules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalTaskSensor.__init__ (cognitive 17) providers/standard/src/airflow/providers/standard/sensors/external_task.py:183— ExternalTaskSensor.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
python_virtualenv.prepare_virtualenv (cognitive 17) providers/standard/src/airflow/providers/standard/utils/python_virtualenv.py:168— python_virtualenv.prepare_virtualenv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BteqHook.execute_bteq_script_at_local (cognitive 17) providers/teradata/src/airflow/providers/teradata/hooks/bteq.py:242— BteqHook.execute_bteq_script_at_local has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (5 pts), error handling 2 (3 pts), ternaries 2, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
teradata._handle_user_query_band_text (cognitive 17) providers/teradata/src/airflow/providers/teradata/hooks/teradata.py:62— teradata._handle_user_query_band_text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
build_kustomize_overlays._structural_check (cognitive 17) scripts/ci/prek/build_kustomize_overlays.py:150— build_kustomize_overlays._structural_check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_ci_workflows_in_sync.normalize (cognitive 17) scripts/ci/prek/check_ci_workflows_in_sync.py:321— check_ci_workflows_in_sync.normalize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_common_compat_lazy_imports.main (cognitive 17) scripts/ci/prek/check_common_compat_lazy_imports.py:113— check_common_compat_lazy_imports.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_dependency_lower_bounds.extract_requirements (cognitive 17) scripts/ci/prek/check_dependency_lower_bounds.py:77— check_dependency_lower_bounds.extract_requirements has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (8 pts), boolean chains 6, if/else 1 (3 pts) (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
check_execution_api_versions.main (cognitive 17) scripts/ci/prek/check_execution_api_versions.py:112— check_execution_api_versions.main has cognitive complexity 17 (threshold 15). Drivers by points: loops 2 (6 pts), if/else 4 (5 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_http_exception_import_from_fastapi.main (cognitive 17) scripts/ci/prek/check_http_exception_import_from_fastapi.py:88— check_http_exception_import_from_fastapi.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AllowlistManager.cleanup (cognitive 17) scripts/ci/prek/common_prek_utils.py:1187— AllowlistManager.cleanup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_prek_utils.get_imports_from_file (cognitive 17) scripts/ci/prek/common_prek_utils.py:865— common_prek_utils.get_imports_from_file has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 2 (5 pts), ternaries 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_permissions._extract_entity_arg (cognitive 17) scripts/ci/prek/extract_permissions.py:232— extract_permissions._extract_entity_arg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upgrade_important_versions.get_latest_image_version (cognitive 17) scripts/ci/prek/upgrade_important_versions.py:486— upgrade_important_versions.get_latest_image_version has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_operators_init._iter_trigger_kwargs_items (cognitive 17) scripts/ci/prek/validate_operators_init.py:403— validate_operators_init._iter_trigger_kwargs_items has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 2 (4 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate_operators_init.main (cognitive 17) scripts/ci/prek/validate_operators_init.py:612— validate_operators_init.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
summarize_captured_warnings.merge_files (cognitive 17) scripts/ci/testing/summarize_captured_warnings.py:135— summarize_captured_warnings.merge_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
install_airflow_and_providers.install_airflow_and_providers (cognitive 17) scripts/in_container/install_airflow_and_providers.py:969— install_airflow_and_providers.install_airflow_and_providers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run_prepare_airflow_distributions.build_airflow_packages (cognitive 17) scripts/in_container/run_prepare_airflow_distributions.py:87— run_prepare_airflow_distributions.build_airflow_packages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WatchedSubprocess.start (cognitive 17) REDACTED:879— WatchedSubprocess.start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bundlefooter.Read (cognitive 17) REDACTED:133— bundlefooter.Read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
execution.resumeTriggerDagRun (cognitive 17) go-sdk/pkg/execution/trigger_runner.go:325— execution.resumeTriggerDagRun has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClearTaskInstanceButton.ClearTaskInstanceButton (cognitive 17) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceButton.tsx:49— ClearTaskInstanceButton.ClearTaskInstanceButton has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 6, if/else 2 (nesting depth added 2). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
JsonPreviewBadges.JsonPreviewBadges (cognitive 17) airflow-core/src/airflow/ui/src/components/JsonPreviewBadges.tsx:47— JsonPreviewBadges.JsonPreviewBadges has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 4, if/else 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskTrySelect.TaskTrySelect (cognitive 17) airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx:41— TaskTrySelect.TaskTrySelect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), boolean chains 5 (nesting depth added 5). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 108, 66, 148, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CalendarTooltip.CalendarTooltip (cognitive 17) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarTooltip.tsx:45— CalendarTooltip.CalendarTooltip has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (8 pts), if/else 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagCard.DagCard (cognitive 17) airflow-core/src/airflow/ui/src/pages/DagsList/DagCard.tsx:51— DagCard.DagCard has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13 (17 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
XComModal.XComModal (cognitive 17) airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx:51— XComModal.XComModal has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 4 (6 pts), if/else 4, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 87, onSave, a function literal at line 96). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
XCom.XCom (cognitive 17) airflow-core/src/airflow/ui/src/pages/XCom/XCom.tsx:183— XCom.XCom has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrimText.TrimText (cognitive 17) airflow-core/src/airflow/ui/src/utils/TrimText.tsx:41— TrimText.TrimText has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 3 (nesting depth added 3). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
useFiltersHandler.useFiltersHandler.handleFiltersChange (cognitive 17) airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts:181— useFiltersHandler.useFiltersHandler.handleFiltersChange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 191, 197). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
serde.encodeField (cognitive 17) ts-sdk/src/coordinator/serde.ts:478— serde.encodeField has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
dags.generate_dag_with_latest_run_query (cognitive 16) airflow-core/src/airflow/api_fastapi/common/db/dags.py:39— dags.generate_dag_with_latest_run_query has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnectionHookMetaData.redact_extra_fields (cognitive 16) airflow-core/src/airflow/api_fastapi/core_api/datamodels/connections.py:210— ConnectionHookMetaData.redact_extra_fields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClearTaskInstancesBody.validate_model (cognitive 16) airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_instances.py:290— ClearTaskInstancesBody.validate_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
dags.get_recent_task_instance_state_counts (cognitive 16) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/dags.py:521— dags.get_recent_task_instance_state_counts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BulkConnectionService.handle_bulk_create (cognitive 16) REDACTED:109— BulkConnectionService.handle_bulk_create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BulkPoolService.handle_bulk_create (cognitive 16) airflow-core/src/airflow/api_fastapi/core_api/services/public/pools.py:124— BulkPoolService.handle_bulk_create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GridNodeAgg.add_ti (cognitive 16) airflow-core/src/airflow/api_fastapi/core_api/services/ui/grid.py:72— GridNodeAgg.add_ti has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5, loops 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
dag_command.set_is_paused (cognitive 16) airflow-core/src/airflow/cli/commands/dag_command.py:268— dag_command.set_is_paused has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowConfigParser.expand_all_configuration_values (cognitive 16) airflow-core/src/airflow/configuration.py:493— AirflowConfigParser.expand_all_configuration_values has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetModelOperation.add_dag_asset_references (cognitive 16) airflow-core/src/airflow/dag_processing/collection.py:1076— AssetModelOperation.add_dag_asset_references has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collection._reject_other_teams_plugin_classes (cognitive 16) airflow-core/src/airflow/dag_processing/collection.py:507— collection._reject_other_teams_plugin_classes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagFileProcessorManager._add_files_to_queue (cognitive 16) airflow-core/src/airflow/dag_processing/manager.py:1754— DagFileProcessorManager._add_files_to_queue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalExecutor._check_workers (cognitive 16) airflow-core/src/airflow/executors/local_executor.py:186— LocalExecutor._check_workers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun.execute_dag_callbacks (cognitive 16) airflow-core/src/airflow/models/dagrun.py:1652— DagRun.execute_dag_callbacks has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3, error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagRun._create_initial_tasks (cognitive 16) airflow-core/src/airflow/models/dagrun.py:2372— DagRun._create_initial_tasks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dynamic_region.loop_position (cognitive 16) airflow-core/src/airflow/models/dynamic_region.py:546— dynamic_region.loop_position has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dynamic_region._build_candidate_query (cognitive 16) airflow-core/src/airflow/models/dynamic_region.py:731— dynamic_region._build_candidate_query has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
_DagDependenciesResolver.resolve_asset_alias_dag_dep (cognitive 16) airflow-core/src/airflow/models/serialized_dag.py:252— _DagDependenciesResolver.resolve_asset_alias_dag_dep has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskCoordinateResolver.get_loop_passes (cognitive 16) airflow-core/src/airflow/models/task_coordinates.py:455— TaskCoordinateResolver.get_loop_passes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (5 pts), error handling 1 (3 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance.refresh_from_db (cognitive 16) REDACTED:1502— TaskInstance.refresh_from_db has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskInstance.complete_restart (cognitive 16) REDACTED:1766— TaskInstance.complete_restart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
taskinstance._stop_remaining_tasks (cognitive 16) REDACTED:199— taskinstance._stop_remaining_tasks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xcom.select_producers (cognitive 16) airflow-core/src/airflow/models/xcom.py:641— xcom.select_producers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProvidersManager._load_ui_metadata (cognitive 16) airflow-core/src/airflow/providers_manager.py:1034— ProvidersManager._load_ui_metadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SerializedDAG._process_dagrun_deadline_alerts (cognitive 16) airflow-core/src/airflow/serialization/definitions/dag.py:727— SerializedDAG._process_dagrun_deadline_alerts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (2 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
db.upgradedb (cognitive 16) airflow-core/src/airflow/utils/db.py:1272— db.upgradedb has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_log_address.region_log_position (cognitive 16) REDACTED:58— task_log_address.region_log_position has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diagram_coordinator_execution_sequence._build_sequence (cognitive 16) contributing-docs/images/diagram_coordinator_execution_sequence.py:228— diagram_coordinator_execution_sequence._build_sequence has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (9 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
diagram_task_sdk_execution_sequence._build_sequence (cognitive 16) contributing-docs/images/diagram_task_sdk_execution_sequence.py:205— diagram_task_sdk_execution_sequence._build_sequence has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (9 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ci_commands.selective_check (cognitive 16) REDACTED:304— ci_commands.selective_check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 4, ternaries 3 (4 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ci_commands._sync_k8s_schemas_to_airflow_site (cognitive 16) REDACTED:545— ci_commands._sync_k8s_schemas_to_airflow_site has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ci_image_commands.load (cognitive 16) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:565— ci_image_commands.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
kubernetes_commands.status (cognitive 16) dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:603— kubernetes_commands.status has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.classify_provider_changes (cognitive 16) REDACTED:862— release_management_commands.classify_provider_changes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
release_management_commands.tag_providers (cognitive 16) REDACTED:1526— release_management_commands.tag_providers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 1 (2 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.autocomplete (cognitive 16) REDACTED:117— setup_commands.autocomplete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 1 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.change_config (cognitive 16) REDACTED:210— setup_commands.change_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup_commands.validate_params_for_command (cognitive 16) REDACTED:353— setup_commands.validate_params_for_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ui_commands.expand_plural_keys (cognitive 16) dev/breeze/src/airflow_breeze/commands/ui_commands.py:162— ui_commands.expand_plural_keys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellParams.add_docker_in_docker (cognitive 16) dev/breeze/src/airflow_breeze/params/shell_params.py:513— ShellParams.add_docker_in_docker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AirflowReleaseValidator.build_packages (cognitive 16) dev/breeze/src/airflow_breeze/utils/airflow_release_validator.py:520— AirflowReleaseValidator.build_packages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
constraints_version_check.get_latest_version_with_cooldown (cognitive 16) REDACTED:198— constraints_version_check.get_latest_version_with_cooldown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fork_ci_reconcile.observe_fork_state (cognitive 16) dev/breeze/src/airflow_breeze/utils/fork_ci_reconcile.py:250— fork_ci_reconcile.observe_fork_state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github.get_active_airflow_versions (cognitive 16) dev/breeze/src/airflow_breeze/utils/github.py:234— github.get_active_airflow_versions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericRegexpProgressMatcher.get_best_matching_lines (cognitive 16) dev/breeze/src/airflow_breeze/utils/parallel.py:178— GenericRegexpProgressMatcher.get_best_matching_lines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
selective_checks.find_provider_affected (cognitive 16) dev/breeze/src/airflow_breeze/utils/selective_checks.py:666— selective_checks.find_provider_affected has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_metadata.read_connection_urls (cognitive 16) REDACTED:242— extract_metadata.read_connection_urls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElastiCacheReplicationGroupHook.wait_for_deletion (cognitive 16) providers/amazon/src/airflow/providers/amazon/aws/hooks/elasticache_replication_group.py:174— ElastiCacheReplicationGroupHook.wait_for_deletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AwsLogsHook.get_log_events (cognitive 16) providers/amazon/src/airflow/providers/amazon/aws/hooks/logs.py:69— AwsLogsHook.get_log_events has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlueJobOperator._find_job_run_id_by_task_uuid (cognitive 16) providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:301— GlueJobOperator._find_job_run_id_by_task_uuid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SsmRunCommandOperator.execute (cognitive 16) providers/amazon/src/airflow/providers/amazon/aws/operators/ssm.py:131— SsmRunCommandOperator.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KafkaSharedStreamProducer.advance (cognitive 16) providers/apache/kafka/src/airflow/providers/apache/kafka/triggers/shared_stream.py:179— KafkaSharedStreamProducer.advance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CeleryExecutor._send_workloads (cognitive 16) providers/celery/src/airflow/providers/celery/executors/celery_executor.py:204— CeleryExecutor._send_workloads has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
default_celery._broker_transport_options (cognitive 16) providers/celery/src/airflow/providers/celery/executors/default_celery.py:76— default_celery._broker_transport_options has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClickHouseHook.get_uri (cognitive 16) providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:333— ClickHouseHook.get_uri has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesJobWatcher._run (cognitive 16) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:156— KubernetesJobWatcher._run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KubernetesPodOperator.invoke_defer_method (cognitive 16) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1045— KubernetesPodOperator.invoke_defer_method has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, ternaries 3 (5 pts), if/else 4, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
KubernetesPodOperator.build_pod_request_obj (cognitive 16) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:1623— KubernetesPodOperator.build_pod_request_obj has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
KubernetesPodTrigger._wait_for_container_completion (cognitive 16) providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/pod.py:359— KubernetesPodTrigger._wait_for_container_completion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lineage.send_sql_hook_lineage (cognitive 16) providers/common/sql/src/airflow/providers/common/sql/hooks/lineage.py:65— lineage.send_sql_hook_lineage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 2, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BranchSQLOperator.execute (cognitive 16) providers/common/sql/src/airflow/providers/common/sql/operators/sql.py:1700— BranchSQLOperator.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksAgentHook._do_agent_api_call (cognitive 16) providers/databricks/src/airflow/providers/databricks/hooks/agent.py:356— DatabricksAgentHook._do_agent_api_call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (3 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksRunNowOperator.execute_complete (cognitive 16) REDACTED:1568— DatabricksRunNowOperator.execute_complete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabricksExecutionTrigger._run_workflow_task (cognitive 16) providers/databricks/src/airflow/providers/databricks/triggers/databricks.py:162— DatabricksExecutionTrigger._run_workflow_task has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DockerOperator._run_image_with_mounts (cognitive 16) providers/docker/src/airflow/providers/docker/operators/docker.py:389— DockerOperator._run_image_with_mounts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
worker._assert_version (cognitive 16) providers/edge3/src/airflow/providers/edge3/worker_api/routes/worker.py:62— worker._assert_version has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAuthManager.is_authorized_dag (cognitive 16) providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:456— FabAuthManager.is_authorized_dag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FabAuthManager.get_authorized_dag_ids (cognitive 16) providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:629— FabAuthManager.get_authorized_dag_ids has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
0001_3_5_0_fix_fab_db_inconsistencies.upgrade (cognitive 16) REDACTED:250— 0001_3_5_0_fix_fab_db_inconsistencies.upgrade has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FTPFileTransmitOperator.execute (cognitive 16) providers/ftp/src/airflow/providers/ftp/operators/ftp.py:99— FTPFileTransmitOperator.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GithubHook.get_conn (cognitive 16) providers/github/src/airflow/providers/github/hooks/github.py:49— GithubHook.get_conn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataplexGetDataQualityScanResultOperator.execute (cognitive 16) providers/google/src/airflow/providers/google/cloud/operators/dataplex.py:1196— DataplexGetDataQualityScanResultOperator.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GKECreateClusterOperator._validate_input (cognitive 16) providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:443— GKECreateClusterOperator._validate_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SFTPToGCSOperator.execute (cognitive 16) providers/google/src/airflow/providers/google/cloud/transfers/sftp_to_gcs.py:135— SFTPToGCSOperator.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (2 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lineage.send_hook_lineage_for_bq_job (cognitive 16) providers/google/src/airflow/providers/google/cloud/utils/lineage.py:49— lineage.send_hook_lineage_for_bq_job has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImapHook._build_client (cognitive 16) providers/imap/src/airflow/providers/imap/hooks/imap.py:86— ImapHook._build_client has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WasbAsyncHook.get_async_conn (cognitive 16) providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:725— WasbAsyncHook.get_async_conn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WasbRemoteLogIO._build_log_source_url (cognitive 16) providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:131— WasbRemoteLogIO._build_log_source_url has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIHook.wait_for_batch (cognitive 16) providers/openai/src/airflow/providers/openai/hooks/openai.py:807— OpenAIHook.wait_for_batch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
spark._get_transport_information_as_spark_properties (cognitive 16) providers/openlineage/src/airflow/providers/openlineage/utils/spark.py:59— spark._get_transport_information_as_spark_properties has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PostgresHook.copy_expert (cognitive 16) providers/postgres/src/airflow/providers/postgres/hooks/postgres.py:396— PostgresHook.copy_expert has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
emailer.send_email (cognitive 16) providers/sendgrid/src/airflow/providers/sendgrid/utils/emailer.py:49— emailer.send_email has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 5, boolean chains 2 (nesting depth added 3). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SSHRemoteJobOperator.execute_complete (cognitive 16) providers/ssh/src/airflow/providers/ssh/operators/ssh_remote_job.py:387— SSHRemoteJobOperator.execute_complete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SSHRemoteJobOperator.on_kill (cognitive 16) providers/ssh/src/airflow/providers/ssh/operators/ssh_remote_job.py:494— SSHRemoteJobOperator.on_kill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, error handling 2 (3 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_BasePythonVirtualenvOperator._execute_python_callable_in_subprocess (cognitive 16) providers/standard/src/airflow/providers/standard/operators/python.py:677— _BasePythonVirtualenvOperator._execute_python_callable_in_subprocess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExternalTaskSensor._check_for_existence (cognitive 16) providers/standard/src/airflow/providers/standard/sensors/external_task.py:544— ExternalTaskSensor._check_for_existence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_deprecations.built_import_from (cognitive 16) scripts/ci/prek/check_deprecations.py:103— check_deprecations.built_import_from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_example_dag_shell_commands._externally_fed_parameters (cognitive 16) scripts/ci/prek/check_example_dag_shell_commands.py:189— check_example_dag_shell_commands._externally_fed_parameters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_mapped_column_nullable_annotations.iter_mismatches (cognitive 16) scripts/ci/prek/check_mapped_column_nullable_annotations.py:127— check_mapped_column_nullable_annotations.iter_mismatches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_metrics_synced_with_the_registry.find_back_compat_check_import_ids (cognitive 16) scripts/ci/prek/check_metrics_synced_with_the_registry.py:273— check_metrics_synced_with_the_registry.find_back_compat_check_import_ids has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 2 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
check_migration_patterns._find_disable_sqlite_fkeys_line (cognitive 16) scripts/ci/prek/check_migration_patterns.py:382— check_migration_patterns._find_disable_sqlite_fkeys_line has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_provider_conn_fields.check_ui_field_behaviour_for_entry (cognitive 16) scripts/ci/prek/check_provider_conn_fields.py:157— check_provider_conn_fields.check_ui_field_behaviour_for_entry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_provider_docs.check_provider_doc_exists_and_in_index (cognitive 16) scripts/ci/prek/check_provider_docs.py:104— check_provider_docs.check_provider_doc_exists_and_in_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common_prek_utils.check_uv_version (cognitive 16) scripts/ci/prek/common_prek_utils.py:292— common_prek_utils.check_uv_version has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
fab_permissions_doc._resolve_str_constants (cognitive 16) scripts/ci/prek/fab_permissions_doc.py:85— fab_permissions_doc._resolve_str_constants has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upgrade_dependency_floors.run (cognitive 16) scripts/ci/prek/upgrade_dependency_floors.py:420— upgrade_dependency_floors.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
verify_providers.check_if_classes_are_properly_named (cognitive 16) scripts/in_container/verify_providers.py:590— verify_providers.check_if_classes_are_properly_named has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate_yaml_format_for_hooks.main (cognitive 16) scripts/tools/generate_yaml_format_for_hooks.py:219— generate_yaml_format_for_hooks.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
_TaskDecorator._expand (cognitive 16) task-sdk/src/airflow/sdk/bases/decorator.py:646— _TaskDecorator._expand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
operator.chain_linear (cognitive 16) task-sdk/src/airflow/sdk/bases/operator.py:2028— operator.chain_linear has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResumableJobMixin.execute_resumable (cognitive 16) task-sdk/src/airflow/sdk/bases/resumablejobmixin.py:103— ResumableJobMixin.execute_resumable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
_bundle_reader._read_source_regions (cognitive 16) task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:527— _bundle_reader._read_source_regions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Templater.render_template (cognitive 16) task-sdk/src/airflow/sdk/definitions/_internal/templater.py:218— Templater.render_template has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PlainXComArg.resolve (cognitive 16) task-sdk/src/airflow/sdk/definitions/xcom_arg.py:333— PlainXComArg.resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetStateStoreAccessors.__init__ (cognitive 16) REDACTED:1068— AssetStateStoreAccessors.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InletEventsAccessors.__getitem__ (cognitive 16) REDACTED:1512— InletEventsAccessors.__getitem__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loop.execute_loop_gate (cognitive 16) task-sdk/src/airflow/sdk/execution_time/loop.py:99— loop.execute_loop_gate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
supervisor.process_log_messages_from_subprocess (cognitive 16) REDACTED:2889— supervisor.process_log_messages_from_subprocess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task_runner._register_deserialization_allowed_classes (cognitive 16) task-sdk/src/airflow/sdk/execution_time/task_runner.py:1057— task_runner._register_deserialization_allowed_classes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), error handling 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
base._parse_importer_specs (cognitive 16) task-sdk/src/airflow/sdk/importers/base.py:385— base._parse_importer_specs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipImporter.list_dag_definitions (cognitive 16) task-sdk/src/airflow/sdk/importers/zip_importer.py:180— ZipImporter.list_dag_definitions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), error handling 2 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipImporter._iter_supported_members (cognitive 16) task-sdk/src/airflow/sdk/importers/zip_importer.py:228— ZipImporter._iter_supported_members has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProvidersManagerTaskRuntime._import_hook (cognitive 16) task-sdk/src/airflow/sdk/providers_manager_runtime.py:481— ProvidersManagerTaskRuntime._import_hook has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FieldsKt.checkConfigValue (cognitive 16) java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/internal/Fields.kt:90— FieldsKt.checkConfigValue has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4, boolean chains 3 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
airflow.encodeSpecValue (cognitive 16) go-sdk/airflow/serialize.go:264— airflow.encodeSpecValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
airflow.copyTriggerDagRunSpec (cognitive 16) go-sdk/airflow/trigger_dag_run.go:125— airflow.copyTriggerDagRunSpec has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.layoutSources (cognitive 16) go-sdk/cmd/airflow-go-pack/sources.go:181— main.layoutSources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
taskFunction.call (cognitive 16) go-sdk/internal/bundle/task.go:166— taskFunction.call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClearTaskInstanceConfirmationDialog.ClearTaskInstanceConfirmationDialog (cognitive 16) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceConfirmationDialog.tsx:45— ClearTaskInstanceConfirmationDialog.ClearTaskInstanceConfirmationDialog has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 3 (4 pts) (nesting depth added 4). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilterPill.FilterPill (cognitive 16) airflow-core/src/airflow/ui/src/components/FilterBar/FilterPill.tsx:63— FilterPill.FilterPill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 4, boolean chains 3, error handling 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (stopEditing, handleKeyDown, a function literal at line 115, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
PoolBar.PoolBar (cognitive 16) airflow-core/src/airflow/ui/src/components/PoolBar.tsx:35— PoolBar.PoolBar has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (6 pts), if/else 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 82, 60, 73, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TaskName.TaskName (cognitive 16) airflow-core/src/airflow/ui/src/components/TaskName.tsx:50— TaskName.TaskName has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 3, if/else 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dag.Dag (cognitive 16) airflow-core/src/airflow/ui/src/pages/Dag/Dag.tsx:42— Dag.Dag has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 110, 80, 130). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Events.Events (cognitive 16) airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:186— Events.Events has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Dag.#checkInputs (cognitive 16) ts-sdk/src/sdk/dag.ts:1419— Dag.#checkInputs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger-dag-run.triggerDagRun (cognitive 16) ts-sdk/src/sdk/trigger-dag-run.ts:129— trigger-dag-run.triggerDagRun has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
serde.serializeEdgeInfo (cognitive 16) ts-sdk/src/coordinator/serde.ts:96— serde.serializeEdgeInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate-dag-schema.selectDagFields (cognitive 16) ts-sdk/scripts/generate-dag-schema.mjs:298— generate-dag-schema.selectDagFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
create.checkAttributes (cognitive 16) airflow-core/src/airflow/ui/rules/rem.js:52— create.checkAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 2). None of this is in the body itself: all 16 points belong to 2 function items inside it that branch (a function literal at line 54, (anonymous)::fix). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Near-duplicate member pair (130 shared lines) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:137— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:137-456 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:460-758 — These two members are variants of one another: 130 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (98 shared lines) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:437— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:437-541 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:606-709 — These two members are variants of one another: 98 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (87 shared lines) contributing-docs/images/diagram_coordinator_execution_architecture.py:96— contributing-docs/images/diagram_coordinator_execution_architecture.py:96-290 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:86-287 — These two members are variants of one another: 87 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (61 shared lines) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:780— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:780-887 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:911-995 — These two members are variants of one another: 61 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:47— airflow-core/src/airflow/migrations/versions/0076_3_1_0_add_human_in_the_loop_response.py:47-75 | airflow-core/src/airflow/migrations/versions/0091_3_2_0_add_human_in_the_loop_detail_history.py:47-75 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (17 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (17 members, 50+ identical tokens) airflow-core/src/airflow/serialization/definitions/dag.py:1434— airflow-core/src/airflow/serialization/definitions/dag.py:1434-1481 | dev/breeze/src/airflow_breeze/commands/developer_commands.py:437-516 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:341-480 | REDACTED:1935-1967 | providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:152-176 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:244-458 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:505-731 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:763-933 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:329-376 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:588-914 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:976-1302 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1364-1690 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1751-2072 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2134-2456 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2518-2843 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/asb.py:218-284 | scripts/in_container/install_airflow_and_providers.py:990-1117 — These 17 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 17 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 17 times.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:56— providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:56-71 | providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:150-165 | providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:312-327 | providers/amazon/src/airflow/providers/amazon/aws/triggers/comprehend.py:51-66 | providers/amazon/src/airflow/providers/amazon/aws/triggers/comprehend.py:97-112 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:338-353 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:383-398 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:49-63 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:95-109 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:377-391 | providers/amazon/src/airflow/providers/amazon/aws/triggers/ssm.py:61-78 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:197— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:197-232 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:516-573 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1334-1368 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:159-211 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:315-370 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:710-765 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:858-915 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue_databrew.py:97-130 | providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py:139-193 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:50— providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:50-71 | providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:112-142 | providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:53-75 | providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:52-73 | providers/google/src/airflow/providers/google/cloud/log/cloud_logging_task_handler.py:108-137 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:76-98 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:56-80 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Duplicated block (277–280 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:588— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:588-867 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1751-2027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:588` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (279–280 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1364— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1364-1642 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2518-2797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1364` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (276–279 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:976— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:976-1254 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2134-2409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:976` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (80–84 lines × 2) providers/standard/src/airflow/providers/standard/utils/skipmixin.py:110— providers/standard/src/airflow/providers/standard/utils/skipmixin.py:110-193 | task-sdk/src/airflow/sdk/bases/skipmixin.py:89-168 — before extracting anything, compare `providers/standard/src/airflow/providers/standard/utils/skipmixin.py` and `task-sdk/src/airflow/sdk/bases/skipmixin.py` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (72–75 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:191— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:191-262 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:290-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:263` calls `wait` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:366` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (68 lines × 2) airflow-core/src/airflow/providers_manager.py:751— airflow-core/src/airflow/providers_manager.py:751-818 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:313-380 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (64 lines × 2) airflow-core/src/airflow/serialization/helpers.py:53— airflow-core/src/airflow/serialization/helpers.py:53-116 | task-sdk/src/airflow/sdk/execution_time/task_runner.py:1354-1417 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (56–57 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:486— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:486-541 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:653-709 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (55–56 lines × 2) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:470— providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:470-525 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:802-856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:470` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (52 lines × 2) REDACTED:418— REDACTED:418-469 | task-sdk/src/airflow/sdk/definitions/connection.py:237-288 — before extracting anything, compare `REDACTED` and `task-sdk/src/airflow/sdk/definitions/connection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (46–47 lines × 2) providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:445— providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:445-490 | providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:494-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (45 lines × 6) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:555— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:555-599 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:623-667 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1019-1063 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1088-1132 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1489-1533 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1558-1602 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (45 lines × 2) airflow-core/src/airflow/providers_manager.py:875— airflow-core/src/airflow/providers_manager.py:875-919 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:566-610 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (37–44 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:201— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:201-244 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:384-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (44 lines × 2) airflow-core/src/airflow/utils/email.py:111— airflow-core/src/airflow/utils/email.py:111-154 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:112-155 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (36–43 lines × 2) REDACTED:55— REDACTED:55-97 | REDACTED:161-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (43 lines × 2) airflow-core/src/airflow/providers_manager.py:338— airflow-core/src/airflow/providers_manager.py:338-380 | task-sdk/src/airflow/sdk/providers_manager_runtime.py:67-109 — before extracting anything, compare `airflow-core/src/airflow/providers_manager.py` and `task-sdk/src/airflow/sdk/providers_manager_runtime.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 385 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (39–42 lines × 2) dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:357— dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:357-398 | devel-common/src/sphinx_exts/providers_commits.py:131-169 — before extracting anything, compare `dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py` and `devel-common/src/sphinx_exts/providers_commits.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:357` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (38–42 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:690— providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:690-731 | providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py:775-812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (37–41 lines × 2) REDACTED:117— REDACTED:117-157 | REDACTED:240-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (41 lines × 2) airflow-core/src/airflow/utils/email.py:53— airflow-core/src/airflow/utils/email.py:53-93 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:54-94 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (40–41 lines × 2) providers/common/ai/src/airflow/providers/common/ai/operators/llamaindex_embedding.py:186— providers/common/ai/src/airflow/providers/common/ai/operators/llamaindex_embedding.py:186-226 | providers/common/ai/src/airflow/providers/common/ai/operators/llamaindex_retrieval.py:152-191 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (40 lines × 2) airflow-core/src/airflow/utils/email.py:169— airflow-core/src/airflow/utils/email.py:169-208 | providers/smtp/src/airflow/providers/smtp/utils/emailer.py:170-209 — before extracting anything, compare `airflow-core/src/airflow/utils/email.py` and `providers/smtp/src/airflow/providers/smtp/utils/emailer.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21–37 lines × 2) providers/google/src/airflow/providers/google/cloud/utils/dataform.py:58— providers/google/src/airflow/providers/google/cloud/utils/dataform.py:58-94 | providers/google/src/airflow/providers/google/cloud/utils/dataform.py:115-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (36 lines × 3) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:403— providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:403-438 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:581-616 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:735-770 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `task_instance` to `RuntimeTaskInstance` in one and `RuntimeTaskInstance | TaskInstance` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (35–36 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:484— providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:484-519 | providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:691-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (35 lines × 2) airflow-core/src/airflow/serialization/definitions/taskgroup.py:298— airflow-core/src/airflow/serialization/definitions/taskgroup.py:298-332 | task-sdk/src/airflow/sdk/definitions/taskgroup.py:636-670 — before extracting anything, compare `airflow-core/src/airflow/serialization/definitions/taskgroup.py` and `task-sdk/src/airflow/sdk/definitions/taskgroup.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (31–34 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:919— airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:919-952 | airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:1010-1040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/services/public/task_instances.py:919` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `BulkUpdateAction[BulkTaskInstanceBody]` in one and `BulkDeleteAction[BulkTaskInstanceBody]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–34 lines × 2) REDACTED:327— REDACTED:327-360 | task-sdk/src/airflow/sdk/definitions/connection.py:167-196 — before extracting anything, compare `REDACTED` and `task-sdk/src/airflow/sdk/definitions/connection.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (34 lines × 2) airflow-core/src/airflow/serialization/definitions/taskgroup.py:141— airflow-core/src/airflow/serialization/definitions/taskgroup.py:141-174 | task-sdk/src/airflow/sdk/definitions/taskgroup.py:435-468 — before extracting anything, compare `airflow-core/src/airflow/serialization/definitions/taskgroup.py` and `task-sdk/src/airflow/sdk/definitions/taskgroup.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (33–34 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/kinesis_analytics.py:183— providers/amazon/src/airflow/providers/amazon/aws/operators/kinesis_analytics.py:183-216 | providers/amazon/src/airflow/providers/amazon/aws/operators/kinesis_analytics.py:302-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/kinesis_analytics.py:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (31–32 lines × 2) contributing-docs/images/diagram_coordinator_execution_sequence.py:276— contributing-docs/images/diagram_coordinator_execution_sequence.py:276-307 | contributing-docs/images/diagram_task_sdk_execution_sequence.py:253-283 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_sequence.py` and `contributing-docs/images/diagram_task_sdk_execution_sequence.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (30–32 lines × 2) scripts/ci/prek/check_shared_distributions_usage.py:583— scripts/ci/prek/check_shared_distributions_usage.py:583-614 | scripts/ci/prek/check_shared_distributions_usage.py:616-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_shared_distributions_usage.py:583` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:863— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:863-893 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1251-1281 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1639-1669 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:863` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31 lines × 2) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:426— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:426-456 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:728-758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:426` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26–30 lines × 2) scripts/in_container/run_schema_defaults_check.py:152— scripts/in_container/run_schema_defaults_check.py:152-181 | scripts/in_container/run_schema_defaults_check.py:214-239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29 lines × 4) providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:276— providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:276-304 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:440-468 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:618-646 | providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:772-800 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28–29 lines × 2) REDACTED:448— REDACTED:448-476 | REDACTED:4154-4181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (27–29 lines × 2) providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/adls.py:74— providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/adls.py:74-100 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py:95-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12–28 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:345— airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:345-356 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:925-952 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:345` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–28 lines × 2) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:860— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:860-887 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:981-995 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (27–28 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:437— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:437-463 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:606-633 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25–27 lines × 2) providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:577— providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:577-601 | providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py:488-514 — before extracting anything, compare `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py` and `providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py:577` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (22–27 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/gcs.py:873— providers/google/src/airflow/providers/google/cloud/hooks/gcs.py:873-894 | providers/google/src/airflow/providers/google/cloud/hooks/gcs.py:985-1011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:414— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:414-439 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:675-700 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:895-920 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:414` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–26 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:222— providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:222-240 | providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:304-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (24–25 lines × 6) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:854— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:854-877 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1241-1265 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1629-1653 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2014-2037 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2396-2420 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2784-2808 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:854` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–25 lines × 2) airflow-core/src/airflow/state/metastore.py:75— airflow-core/src/airflow/state/metastore.py:75-86 | REDACTED:128-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19–25 lines × 2) contributing-docs/images/diagram_coordinator_execution_architecture.py:236— contributing-docs/images/diagram_coordinator_execution_architecture.py:236-260 | contributing-docs/images/diagram_task_sdk_execution_architecture.py:196-214 — before extracting anything, compare `contributing-docs/images/diagram_coordinator_execution_architecture.py` and `contributing-docs/images/diagram_task_sdk_execution_architecture.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `contributing-docs/images/diagram_coordinator_execution_architecture.py:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (24–25 lines × 2) providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:209— providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:209-232 | providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:411-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:437` calls `info` and `providers/google/src/airflow/providers/google/cloud/triggers/dataproc.py:233` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20–25 lines × 2) providers/standard/src/airflow/providers/standard/utils/skipmixin.py:79— providers/standard/src/airflow/providers/standard/utils/skipmixin.py:79-103 | task-sdk/src/airflow/sdk/bases/skipmixin.py:63-82 — before extracting anything, compare `providers/standard/src/airflow/providers/standard/utils/skipmixin.py` and `task-sdk/src/airflow/sdk/bases/skipmixin.py` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23–24 lines × 2) providers/celery/src/airflow/providers/celery/executors/celery_kubernetes_executor.py:180— providers/celery/src/airflow/providers/celery/executors/celery_kubernetes_executor.py:180-203 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/local_kubernetes_executor.py:166-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18–24 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:250— providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:250-267 | providers/google/src/airflow/providers/google/cloud/hooks/pubsub.py:414-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–24 lines × 2) providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py:365— providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py:365-379 | providers/snowflake/src/airflow/providers/snowflake/hooks/cortex_agent.py:161-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (23 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:420— providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:420-442 | providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:452-474 | providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:484-506 | providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:516-538 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20–23 lines × 2) REDACTED:104— REDACTED:104-126 | REDACTED:171-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:171` calls `SystemExit` and `REDACTED:104` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–23 lines × 2) airflow-core/src/airflow/dag_processing/manager.py:630— airflow-core/src/airflow/dag_processing/manager.py:630-643 | REDACTED:1423-1445 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–22 lines × 5) providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:53— providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:53-71 | providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:56-75 | providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:55-73 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:79-98 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:59-80 — before extracting anything, compare `providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py` and `providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20–22 lines × 3) providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1330— providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1330-1351 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1404-1425 | providers/google/src/airflow/providers/google/cloud/operators/kubernetes_engine.py:1531-1550 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18–22 lines × 2) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:835— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:835-856 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:959-976 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18–21 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:702— airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:702-719 | airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:761-781 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:702` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–21 lines × 2) REDACTED:191— REDACTED:191-211 | airflow-core/src/airflow/api_fastapi/core_api/services/public/variables.py:156-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `action` to `BulkDeleteAction[ConnectionBody]` in one and `BulkDeleteAction` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (16–21 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:253— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:253-273 | providers/amazon/src/airflow/providers/amazon/aws/executors/ecs/ecs_executor.py:169-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18–19 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2055— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2055-2072 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2438-2456 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2826-2843 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2055` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16–19 lines × 2) providers/edge3/src/airflow/providers/edge3/cli/edge_command.py:129— providers/edge3/src/airflow/providers/edge3/cli/edge_command.py:129-144 | providers/edge3/src/airflow/providers/edge3/cli/edge_command.py:173-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/edge3/src/airflow/providers/edge3/cli/edge_command.py:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–18 lines × 3) REDACTED:449— REDACTED:449-463 | REDACTED:547-564 | REDACTED:597-611 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:547` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–18 lines × 2) airflow-core/docs/img/diagram_auth_manager_airflow_architecture.py:66— airflow-core/docs/img/diagram_auth_manager_airflow_architecture.py:66-77 | airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:186-203 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/docs/img/diagram_auth_manager_airflow_architecture.py:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:898— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:898-914 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1286-1302 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1674-1690 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:898` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14–17 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:738— providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:738-754 | providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:935-948 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/neptune_analytics.py:738` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 6) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:282— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:282-297 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:317-332 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:574-589 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:609-624 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:643-658 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:678-693 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:281` calls `batch_alter_table` and `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:572` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 5) providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:103— providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:103-118 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:350-365 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:395-410 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:440-455 | providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py:749-764 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (16 lines × 4) providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:56— providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:56-71 | providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:101-116 | providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:191-206 | providers/amazon/src/airflow/providers/amazon/aws/triggers/dms.py:236-251 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–16 lines × 4) providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:564— providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:564-579 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:726-738 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:759-771 | providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:792-804 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (4–16 lines × 3) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:147— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:147-162 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:187-202 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:206-209 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 18) airflow-core/src/airflow/serialization/definitions/dag.py:1453— airflow-core/src/airflow/serialization/definitions/dag.py:1453-1467 | dev/breeze/src/airflow_breeze/commands/developer_commands.py:497-511 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:428-442 | REDACTED:1945-1959 | providers/amazon/src/airflow/providers/amazon/aws/triggers/eks.py:159-173 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:910-924 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:348-362 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:860-874 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:898-912 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1248-1262 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1286-1300 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1636-1650 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:1674-1688 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2020-2034 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2403-2417 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2791-2805 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/asb.py:268-282 | scripts/in_container/install_airflow_and_providers.py:1006-1020 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/serialization/definitions/dag.py:1453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 4) airflow-core/src/airflow/serialization/definitions/dag.py:1453— airflow-core/src/airflow/serialization/definitions/dag.py:1453-1467 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:708-722 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:910-924 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:348-362 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/serialization/definitions/dag.py:1453` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–15 lines × 2) airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:54— airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:54-68 | airflow-core/src/airflow/migrations/versions/0088_3_2_0_replace_asset_trigger_table_with_asset.py:66-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–15 lines × 2) REDACTED:539— REDACTED:539-551 | REDACTED:816-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:539` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–15 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:205— providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:205-212 | providers/google/src/airflow/providers/google/cloud/log/cloud_logging_task_handler.py:195-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:204` calls `as_posix`, `replace` and `providers/google/src/airflow/providers/google/cloud/log/cloud_logging_task_handler.py:193` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 8) providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:58— providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:58-71 | providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:152-165 | providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:314-327 | providers/amazon/src/airflow/providers/amazon/aws/triggers/comprehend.py:53-66 | providers/amazon/src/airflow/providers/amazon/aws/triggers/comprehend.py:99-112 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:340-353 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:385-398 | providers/amazon/src/airflow/providers/amazon/aws/triggers/ssm.py:63-76 — there are 8 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 7) providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:50— providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:50-63 | providers/amazon/src/airflow/providers/amazon/aws/log/cloudwatch_task_handler.py:112-125 | providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:53-66 | providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:52-65 | providers/google/src/airflow/providers/google/cloud/log/cloud_logging_task_handler.py:108-121 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:76-89 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:56-67 — before extracting anything, compare `providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py` and `providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:136— providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:136-149 | providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py:164-177 | providers/amazon/src/airflow/providers/amazon/aws/transfers/sftp_to_s3.py:195-207 — before extracting anything, compare `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py` and `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_sftp.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_ftp.py:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–14 lines × 2) devel-common/src/tests_common/test_utils/db.py:573— devel-common/src/tests_common/test_utils/db.py:573-581 | providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/permissions_command.py:87-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–14 lines × 2) task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:446— task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:446-453 | task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:470-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 10) providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:56— providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:56-68 | providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:150-162 | providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:312-324 | providers/amazon/src/airflow/providers/amazon/aws/triggers/comprehend.py:51-63 | providers/amazon/src/airflow/providers/amazon/aws/triggers/comprehend.py:97-109 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:338-350 | providers/amazon/src/airflow/providers/amazon/aws/triggers/glue.py:383-395 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:49-61 | providers/amazon/src/airflow/providers/amazon/aws/triggers/neptune.py:95-107 | providers/amazon/src/airflow/providers/amazon/aws/triggers/redshift_cluster.py:377-389 — there are 10 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/triggers/bedrock.py:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 6) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:216— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:216-226 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:558-568 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:196-206 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:350-361 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:736-748 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:889-901 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 3) airflow-core/docs/img/diagram_basic_airflow_architecture.py:57— airflow-core/docs/img/diagram_basic_airflow_architecture.py:57-69 | airflow-core/docs/img/diagram_dag_processor_airflow_architecture.py:56-67 | airflow-core/docs/img/diagram_distributed_airflow_architecture.py:56-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (10–13 lines × 3) dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:159— dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:159-168 | dev/breeze/src/airflow_breeze/commands/production_image_commands.py:134-143 | dev/breeze/src/airflow_breeze/commands/sbom_commands.py:606-618 — before extracting anything, compare `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py` and `dev/breeze/src/airflow_breeze/commands/production_image_commands.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–13 lines × 2) providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:281— providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:281-293 | providers/amazon/src/airflow/providers/amazon/aws/executors/batch/batch_executor.py:176-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 6) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:604— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:604-615 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3131-3141 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3302-3312 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:3337-3347 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py:514-525 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:625-636 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py:604` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–12 lines × 2) airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py:321— airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py:321-328 | airflow-core/src/airflow/api_fastapi/core_api/routes/ui/partitioned_dag_runs.py:404-415 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/api_fastapi/core_api/routes/ui/partitioned_dag_runs.py:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 8) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:215— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:215-225 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:557-567 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1352-1362 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:195-205 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:349-359 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:735-746 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:888-899 | providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py:172-182 — there are 8 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 6) airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:288— airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:288-298 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:323-333 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:355-364 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:580-590 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:615-625 | airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:649-659 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:335` calls `drop_constraint` and `airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py:300` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 6) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:214— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:214-224 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1351-1361 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:194-204 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:348-358 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:887-898 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue_databrew.py:107-119 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:214` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–11 lines × 4) dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:679— dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:679-687 | dev/breeze/src/airflow_breeze/commands/release_candidate_command.py:701-709 | dev/breeze/src/airflow_breeze/commands/release_command.py:258-266 | dev/breeze/src/airflow_breeze/commands/release_command.py:281-291 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10–11 lines × 3) scripts/in_container/install_airflow_and_providers.py:72— scripts/in_container/install_airflow_and_providers.py:72-82 | scripts/in_container/install_airflow_and_providers.py:87-96 | scripts/in_container/install_airflow_and_providers.py:100-109 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) scripts/ci/prek/check_shared_distributions_structure.py:310— scripts/ci/prek/check_shared_distributions_structure.py:310-320 | scripts/ci/prek/check_shared_distributions_structure.py:416-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/ci/prek/check_shared_distributions_structure.py:310` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 7) providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:215— providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:215-224 | providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:1352-1361 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:195-204 | providers/amazon/src/airflow/providers/amazon/aws/operators/comprehend.py:349-358 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue.py:888-898 | providers/amazon/src/airflow/providers/amazon/aws/operators/glue_databrew.py:108-119 | providers/amazon/src/airflow/providers/amazon/aws/operators/mwaa.py:172-181 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/bedrock.py:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 6) providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:252— providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:252-261 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:350-359 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:479-488 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:602-611 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1066-1075 | providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:1536-1545 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/custom_job.py:612` calls `xcom_push` and `providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py:262` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 5) providers/common/ai/src/airflow/providers/common/ai/decorators/agent.py:88— providers/common/ai/src/airflow/providers/common/ai/decorators/agent.py:88-97 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm.py:90-99 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_branch.py:89-98 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_schema_compare.py:89-98 | providers/common/ai/src/airflow/providers/common/ai/decorators/llm_sql.py:88-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `providers/common/ai/src/airflow/providers/common/ai/decorators/agent.py:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) REDACTED:367— REDACTED:367-376 | REDACTED:392-401 | REDACTED:421-430 | REDACTED:445-454 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (2–10 lines × 4) airflow-core/docs/img/diagram_basic_airflow_architecture.py:97— airflow-core/docs/img/diagram_basic_airflow_architecture.py:97-98 | airflow-core/docs/img/diagram_dag_processor_airflow_architecture.py:103-106 | airflow-core/docs/img/diagram_distributed_airflow_architecture.py:105-114 | airflow-core/docs/img/diagram_multi_team_airflow_architecture.py:212-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (8–10 lines × 2) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:809— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:809-818 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:827-834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 8) providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:31— providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:31-38 | providers/mongo/src/airflow/providers/mongo/assets/mongo.py:31-38 | providers/mysql/src/airflow/providers/mysql/assets/mysql.py:31-37 | providers/oracle/src/airflow/providers/oracle/assets/oracle.py:31-38 | providers/presto/src/airflow/providers/presto/assets/presto.py:31-38 | providers/teradata/src/airflow/providers/teradata/assets/teradata.py:31-38 | providers/trino/src/airflow/providers/trino/assets/trino.py:31-38 | providers/vertica/src/airflow/providers/vertica/assets/vertica.py:31-38 — before extracting anything, compare `providers/presto/src/airflow/providers/presto/assets/presto.py` and `providers/trino/src/airflow/providers/trino/assets/trino.py` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–8 lines × 3) providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:898— providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:898-905 | providers/google/src/airflow/providers/google/cloud/operators/gcs.py:724-729 | providers/google/src/airflow/providers/google/cloud/operators/gcs.py:1052-1057 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `providers/amazon/src/airflow/providers/amazon/aws/operators/s3.py:898` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `Context` names `airflow.providers.common.compat.sdk` in one and `airflow.sdk` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6–8 lines × 2) task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:387— task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:387-394 | task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:437-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `task-sdk/src/airflow/sdk/coordinators/node/_bundle_reader.py:387` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 8) providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:48— providers/amazon/src/airflow/providers/amazon/aws/assets/redshift.py:48-54 | providers/databricks/src/airflow/providers/databricks/assets/databricks.py:83-89 | providers/oracle/src/airflow/providers/oracle/assets/oracle.py:54-62 | providers/postgres/src/airflow/providers/postgres/assets/postgres.py:51-57 | providers/presto/src/airflow/providers/presto/assets/presto.py:48-54 | providers/snowflake/src/airflow/providers/snowflake/assets/snowflake.py:43-49 | providers/trino/src/airflow/providers/trino/assets/trino.py:48-54 | providers/vertica/src/airflow/providers/vertica/assets/vertica.py:48-54 — before extracting anything, compare `providers/presto/src/airflow/providers/presto/assets/presto.py` and `providers/trino/src/airflow/providers/trino/assets/trino.py` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–7 lines × 5) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:136— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:136-142 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:158-163 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:176-182 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:198-203 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:212-218 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 4) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:122— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:122-127 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:450-455 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:607-613 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:684-689 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:122` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:614` calls `Column`, `StringID`, `Integer` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:456` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 4) providers/apache/hive/src/airflow/providers/apache/hive/assets/hive.py:45— providers/apache/hive/src/airflow/providers/apache/hive/assets/hive.py:45-51 | providers/mongo/src/airflow/providers/mongo/assets/mongo.py:48-54 | providers/mysql/src/airflow/providers/mysql/assets/mysql.py:48-54 | providers/teradata/src/airflow/providers/teradata/assets/teradata.py:48-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (6 lines × 6) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:62— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:62-67 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:70-75 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:88-93 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:96-101 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:127-132 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:135-140 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:85` calls `Column`, `DateTime` and `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:59` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (3–6 lines × 3) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:422— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:422-427 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:447-452 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:457-459 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:422` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:422` calls `ForeignKeyConstraint` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:457` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 8) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:337— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:337-341 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:359-363 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:462-466 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:138-142 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:159-163 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:178-182 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:199-203 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:214-218 — there are 8 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (2–5 lines × 8) airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:369— airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:369-373 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:526-530 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:582-586 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:614-615 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:638-642 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:662-666 | airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:690-691 | airflow-core/src/airflow/migrations/versions/0136_3_4_0_fold_task_map_into_xcom_mapped_length.py:129-133 — there are 8 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:369` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:581` calls `create_index` and `airflow-core/src/airflow/migrations/versions/0000_2_6_2_squashed_migrations.py:525` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:54— providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:54-58 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:71-76 | providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:97-102 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `providers/fab/src/airflow/providers/fab/migrations/versions/0000_1_4_0_create_ab_tables_if_missing.py:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (32 lines × 3) airflow-core/src/airflow/utils/yaml.py:40— airflow-core/src/airflow/utils/yaml.py:40-71 | airflow-ctl/src/airflowctl/ctl/utils/yaml.py:41-72 | task-sdk/src/airflow/sdk/yaml.py:40-71 — before extracting anything, compare `airflow-core/src/airflow/utils/yaml.py` and `airflow-ctl/src/airflowctl/ctl/utils/yaml.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 5) providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:238— providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py:238-255 | providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:276-293 | providers/apache/hdfs/src/airflow/providers/apache/hdfs/log/hdfs_task_handler.py:160-177 | providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:343-360 | providers/microsoft/azure/src/airflow/providers/microsoft/azure/log/wasb_task_handler.py:298-315 — before extracting anything, compare `providers/alibaba/src/airflow/providers/alibaba/cloud/log/oss_task_handler.py` and `providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/log/s3_task_handler.py:272` calls `open` and `providers/google/src/airflow/providers/google/cloud/log/gcs_task_handler.py:340` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 10) providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:767— providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:767-772 | providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:1117-1122 | providers/amazon/src/airflow/providers/amazon/aws/operators/emr.py:1113-1118 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:529-534 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:703-707 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:815-819 | providers/amazon/src/airflow/providers/amazon/aws/operators/redshift_cluster.py:992-997 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:380-385 | providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:572-576 | providers/amazon/src/airflow/providers/amazon/aws/sensors/glue_catalog_partition.py:125-129 — there are 10 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `event` to `dict[str, Any] | None = None` in one and `dict | None = None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/amazon/src/airflow/providers/amazon/aws/operators/eks.py:763` calls `timedelta` and `providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py:376` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 11) REDACTED:142— REDACTED:142-156 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py:177-191 | providers/google/src/airflow/providers/google/cloud/hooks/compute.py:76-91 | providers/google/src/airflow/providers/google/cloud/hooks/datafusion.py:200-210 | providers/google/src/airflow/providers/google/cloud/hooks/functions.py:72-86 | providers/google/src/airflow/providers/google/marketing_platform/hooks/bid_manager.py:50-60 | providers/google/src/airflow/providers/google/marketing_platform/hooks/campaign_manager.py:52-62 | providers/google/src/airflow/providers/google/marketing_platform/hooks/display_video.py:50-60 | providers/google/src/airflow/providers/google/marketing_platform/hooks/search_ads.py:222-232 | providers/google/src/airflow/providers/google/suite/hooks/calendar.py:66-81 | providers/google/src/airflow/providers/google/suite/hooks/drive.py:76-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 11 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 3) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:85— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:85-92 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:91-98 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py:82-89 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (47 lines × 2) providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:1014— providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py:1014-1060 | providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py:2988-3034 — before extracting anything, compare `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py` and `providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 6) providers/amazon/src/airflow/providers/amazon/aws/cli/definition.py:82— providers/amazon/src/airflow/providers/amazon/aws/cli/definition.py:82-93 | providers/celery/src/airflow/providers/celery/cli/definition.py:248-259 | providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/cli/definition.py:147-158 | providers/edge3/src/airflow/providers/edge3/cli/definition.py:286-297 | providers/fab/src/airflow/providers/fab/cli/definition.py:383-394 | providers/keycloak/src/airflow/providers/keycloak/cli/definition.py:134-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `providers/celery/src/airflow/providers/celery/cli/definition.py:242` calls `get_celery_cli_commands` and `providers/amazon/src/airflow/providers/amazon/aws/cli/definition.py:78` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 10) providers/google/src/airflow/providers/google/cloud/hooks/bigquery_dts.py:101— providers/google/src/airflow/providers/google/cloud/hooks/bigquery_dts.py:101-112 | providers/google/src/airflow/providers/google/cloud/hooks/cloud_logging.py:58-65 | providers/google/src/airflow/providers/google/cloud/hooks/dlp.py:103-114 | providers/google/src/airflow/providers/google/cloud/hooks/kms.py:75-86 | providers/google/src/airflow/providers/google/cloud/hooks/natural_language.py:74-85 | providers/google/src/airflow/providers/google/cloud/hooks/speech_to_text.py:65-76 | providers/google/src/airflow/providers/google/cloud/hooks/text_to_speech.py:73-85 | providers/google/src/airflow/providers/google/cloud/hooks/translate.py:96-107 | providers/google/src/airflow/providers/google/cloud/hooks/video_intelligence.py:72-79 | providers/google/src/airflow/providers/google/cloud/hooks/vision.py:141-152 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 10 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (104–105 lines × 2) REDACTED:383— REDACTED:383-487 | REDACTED:340-443 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (63 lines × 2) REDACTED:546— REDACTED:546-608 | REDACTED:483-545 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (32–41 lines × 2) airflow-core/src/airflow/example_dags/tutorial_taskflow_api.py:58— airflow-core/src/airflow/example_dags/tutorial_taskflow_api.py:58-98 | airflow-core/src/airflow/example_dags/tutorial_taskflow_api_virtualenv.py:50-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24–30 lines × 2) devel-common/src/tests_common/pytest_plugin.py:323— devel-common/src/tests_common/pytest_plugin.py:323-346 | devel-common/src/tests_common/pytest_plugin.py:377-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devel-common/src/tests_common/pytest_plugin.py:323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–30 lines × 2) REDACTED:303— REDACTED:303-331 | REDACTED:275-304 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20–24 lines × 3) devel-common/src/tests_common/pytest_plugin.py:322— devel-common/src/tests_common/pytest_plugin.py:322-345 | devel-common/src/tests_common/pytest_plugin.py:347-366 | devel-common/src/tests_common/pytest_plugin.py:377-399 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devel-common/src/tests_common/pytest_plugin.py:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplication concentrated across 23 sibling directories (66 clone groups) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:177— 66 duplicated blocks under airflow-core/src/airflow/ui/src/pages/ have copies in at least two of the sibling directories Asset, AssetsList, Connections, Dag, DagBundle, DagBundles (+17 more sibling(s) not listed) — 49 of them are reported below, and 17 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 66 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 66 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 66 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (32 clone groups) airflow-core/src/airflow/ui/src/components/Clear/Run/ClearRunDialog.tsx:170— 32 duplicated blocks under airflow-core/src/airflow/ui/src/ have copies in at least two of the sibling directories components, hooks, layouts, pages, queries — 26 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 32 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 32 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 32 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 4 sibling directories (23 clone groups) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:24— 23 duplicated blocks under the repository root have copies in at least two of the sibling directories airflow-core, dev, providers, registry — 18 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (9 clone groups) airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:270— 9 duplicated blocks under airflow-core/src/airflow/ui/src/components/ have copies in at least two of the sibling directories ActionAccordion, Clear, DagActions, MarkAs, TriggerDag — 6 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 2 sibling directories (7 clone groups) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:23— 7 duplicated blocks under airflow-core/src/airflow/ have copies in at least two of the sibling directories api_fastapi, ui — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Wholesale file copy (334 identical lines × 3 files) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:24— airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:24 · airflow-core/src/airflow/ui/src/theme.ts:20 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts:20 — these 3 files are line-for-line copies of one another — 334 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (190 matched lines × 2 locations) · ×1
Duplicated block with local edits (190 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:177— airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:177 · airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:220 — the two spans are one implementation copied and then locally edited — 1152 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (164 identical lines × 2 files) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:23— airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/typescript.js:23 · airflow-core/src/airflow/ui/rules/typescript.js:22 — these 2 files are line-for-line copies of one another — 164 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (135 matched lines × 2 locations) · ×1
Duplicated block with local edits (135 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx:80— airflow-core/src/airflow/ui/src/pages/Connections/Connections.tsx:80 · airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx:71 — the two spans are one implementation copied and then locally edited — 753 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (105 identical lines × 2 files) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/core.js:22— airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/core.js:22 · airflow-core/src/airflow/ui/rules/core.js:22 — these 2 files are line-for-line copies of one another — 105 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (95 matched lines × 2 locations) · ×1
Duplicated block with local edits (95 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:82— airflow-core/src/airflow/ui/src/pages/Events/Events.tsx:82 · airflow-core/src/airflow/ui/src/pages/XCom/XCom.tsx:88 — the two spans are one implementation copied and then locally edited — 504 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (91 matched lines × 2 locations) · ×1
Duplicated block with local edits (91 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Run/CallbackLogs.tsx:51— airflow-core/src/airflow/ui/src/pages/Run/CallbackLogs.tsx:51 · airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:75 — the two spans are one implementation copied and then locally edited — 636 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (90 matched lines × 2 locations) · ×1
Duplicated block with local edits (90 matched lines × 2 locations) providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/RemoveQueueButton.tsx:35— providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/RemoveQueueButton.tsx:35 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerConcurrencyButton.tsx:35 — the two spans are one implementation copied and then locally edited — 434 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (75 matched lines × 2 locations) · ×1
Duplicated block with local edits (75 matched lines × 2 locations) providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:145— providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:145 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx:155 — the two spans are one implementation copied and then locally edited — 472 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (71 matched lines × 2 locations) · ×1
Duplicated block with local edits (71 matched lines × 2 locations) airflow-core/src/airflow/ui/src/components/MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx:44— airflow-core/src/airflow/ui/src/components/MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx:44 · airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsButton.tsx:44 — the two spans are one implementation copied and then locally edited — 402 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (69 lines × 2 locations) providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEditCommentButton.tsx:32— providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEditCommentButton.tsx:32 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEnterButton.tsx:29 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Wholesale file copy (67 identical lines × 2 files) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/unicorn.js:22— airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/rules/unicorn.js:22 · airflow-core/src/airflow/ui/rules/unicorn.js:22 — these 2 files are line-for-line copies of one another — 67 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (63 matched lines × 2 locations) · ×1
Duplicated block with local edits (63 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagRuns/BulkMarkDagRunsAsButton.tsx:58— airflow-core/src/airflow/ui/src/pages/DagRuns/BulkMarkDagRunsAsButton.tsx:58 · airflow-core/src/airflow/ui/src/pages/TaskInstances/BulkMarkTaskInstancesAsButton.tsx:86 — the two spans are one implementation copied and then locally edited — 345 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Wholesale file copy (61 identical lines × 2 files) airflow-core/src/airflow/ui/src/components/MarkAs/Run/MarkRunAsButton.tsx:19— airflow-core/src/airflow/ui/src/components/MarkAs/Run/MarkRunAsButton.tsx:19 · airflow-core/src/airflow/ui/src/components/MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx:19 — these 2 files are line-for-line copies of one another — 61 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (59 matched lines × 2 locations) · ×1
Duplicated block with local edits (59 matched lines × 2 locations) airflow-core/src/airflow/ui/src/layouts/Details/SearchDagRuns.tsx:58— airflow-core/src/airflow/ui/src/layouts/Details/SearchDagRuns.tsx:58 · airflow-core/src/airflow/ui/src/layouts/Details/SearchMapIndexes.tsx:66 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (58 matched lines × 2 locations) · ×1
Duplicated block with local edits (58 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStore.tsx:58— airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStore.tsx:58 · airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStore.tsx:57 — the two spans are one implementation copied and then locally edited — 368 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (56 lines × 2 locations) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/AirflowPin.tsx:21— airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/AirflowPin.tsx:21 · airflow-core/src/airflow/ui/src/assets/AirflowPin.tsx:21 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication· Duplicated block with local edits (56 matched lines × 2 locations) · ×1
Duplicated block with local edits (56 matched lines × 2 locations) airflow-core/src/airflow/ui/src/queries/useBulkDeleteDagRuns.ts:35— airflow-core/src/airflow/ui/src/queries/useBulkDeleteDagRuns.ts:35 · airflow-core/src/airflow/ui/src/queries/useBulkPatchDagRun.ts:40 — the two spans are one implementation copied and then locally edited — 415 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (55 matched lines × 2 locations) · ×1
Duplicated block with local edits (55 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Pools/PoolForm.tsx:47— airflow-core/src/airflow/ui/src/pages/Pools/PoolForm.tsx:47 · airflow-core/src/airflow/ui/src/pages/Variables/ManageVariable/VariableForm.tsx:54 — the two spans are one implementation copied and then locally edited — 421 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (50 lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionButton.tsx:32— airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionButton.tsx:32 · airflow-core/src/airflow/ui/src/pages/Variables/ManageVariable/DeleteVariableButton.tsx:32 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication· Duplicated block with local edits (49 matched lines × 2 locations) · ×1
Duplicated block with local edits (49 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionsButton.tsx:31— airflow-core/src/airflow/ui/src/pages/Connections/DeleteConnectionsButton.tsx:31 · airflow-core/src/airflow/ui/src/pages/Variables/DeleteVariablesButton.tsx:31 — the two spans are one implementation copied and then locally edited — 304 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (46 lines × 3 locations) providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceExitButton.tsx:25— providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceExitButton.tsx:25 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerDeleteButton.tsx:25 · providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/WorkerShutdownButton.tsx:25 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (45 lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagRuns/BulkDeleteDagRunsButton.tsx:126— airflow-core/src/airflow/ui/src/pages/DagRuns/BulkDeleteDagRunsButton.tsx:126 · airflow-core/src/airflow/ui/src/pages/TaskInstances/BulkDeleteTaskInstancesButton.tsx:104 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (42 matched lines × 2 locations) · ×1
Duplicated block with local edits (42 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:117— airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:117 · airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:116 — the two spans are one implementation copied and then locally edited — 249 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (42 lines × 2 locations) airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx:30— airflow-core/src/airflow/ui/src/queries/useEditConnection.tsx:30 · airflow-core/src/airflow/ui/src/queries/useEditVariable.ts:30 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (41 lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Dag/Overview/AllDeadlinesModal.tsx:59— airflow-core/src/airflow/ui/src/pages/Dag/Overview/AllDeadlinesModal.tsx:59 · airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx:74 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication· Duplicated block with local edits (41 matched lines × 2 locations) · ×1
Duplicated block with local edits (41 matched lines × 2 locations) airflow-core/src/airflow/ui/src/queries/useBulkSetDagSchedulingState.ts:33— airflow-core/src/airflow/ui/src/queries/useBulkSetDagSchedulingState.ts:33 · airflow-core/src/airflow/ui/src/queries/useBulkTaskInstances.ts:33 — the two spans are one implementation copied and then locally edited — 273 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (40 matched lines × 2 locations) · ×1
Duplicated block with local edits (40 matched lines × 2 locations) airflow-core/src/airflow/ui/src/pages/Pools/Pools.tsx:63— airflow-core/src/airflow/ui/src/pages/Pools/Pools.tsx:63 · airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx:159 — the two spans are one implementation copied and then locally edited — 243 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (38 matched lines × 2 locations) · ×1
Duplicated block with local edits (38 matched lines × 2 locations) airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:270— airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:270 · airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:309 — the two spans are one implementation copied and then locally edited — 155 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function DagBreadcrumb (cyclomatic 46, cognitive 51) airflow-core/src/airflow/ui/src/layouts/Details/DagBreadcrumb.tsx:127— DagBreadcrumb has cyclomatic complexity 46 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function ClearTaskInstanceDialog (cyclomatic 45, cognitive 40) airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:135— ClearTaskInstanceDialog has cyclomatic complexity 45 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function TaskNode (cyclomatic 44, cognitive 44) airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:42— TaskNode has cyclomatic complexity 44 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 43, cognitive 34) airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:133— (anonymous) has cyclomatic complexity 43 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function AssetSchedule (cyclomatic 42, cognitive 54) airflow-core/src/airflow/ui/src/pages/DagsList/AssetSchedule.tsx:72— AssetSchedule has cyclomatic complexity 42 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Code (cyclomatic 40, cognitive 38) airflow-core/src/airflow/ui/src/pages/Dag/Code/Code.tsx:53— Code has cyclomatic complexity 40 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function TaskInstances (cyclomatic 40, cognitive 38) airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:310— TaskInstances has cyclomatic complexity 40 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function TaskInstanceTooltip (cyclomatic 39, cognitive 38) airflow-core/src/airflow/ui/src/components/TaskInstanceTooltip.tsx:50— TaskInstanceTooltip has cyclomatic complexity 39 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 38, cognitive 31) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:346— (anonymous) has cyclomatic complexity 38 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DagRuns (cyclomatic 36, cognitive 35) airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:257— DagRuns has cyclomatic complexity 36 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DagsList (cyclomatic 36, cognitive 33) airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:138— DagsList has cyclomatic complexity 36 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 35, cognitive 55) airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx:192— (anonymous) has cyclomatic complexity 35 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DetailsLayout (cyclomatic 35, cognitive 31) airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:87— DetailsLayout has cyclomatic complexity 35 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DeadlineStatus (cyclomatic 34, cognitive 40) airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:44— DeadlineStatus has cyclomatic complexity 34 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function #addTask (cyclomatic 33, cognitive 32) ts-sdk/src/sdk/dag.ts:982— #addTask has cyclomatic complexity 33 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function AssetNode (cyclomatic 33, cognitive 31) airflow-core/src/airflow/ui/src/components/AssetExpression/AssetNode.tsx:38— AssetNode has cyclomatic complexity 33 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Gantt (cyclomatic 31, cognitive 26) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx:61— Gantt has cyclomatic complexity 31 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function CalendarCell (cyclomatic 30, cognitive 29) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/CalendarCell.tsx:44— CalendarCell has cyclomatic complexity 30 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function TaskStreamFilter (cyclomatic 30, cognitive 26) airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx:28— TaskStreamFilter has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderField (cyclomatic 29, cognitive 41) registry/src/js/connection-builder.js:194— renderField has cyclomatic complexity 29 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
ts-sdk/src/sdk/dag.ts: 1505 lines of code ts-sdk/src/sdk/dag.ts:1— ts-sdk/src/sdk/dag.ts has 1505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx · ×1
airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx: 575 lines of code airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx:1— airflow-core/src/airflow/ui/src/constants/filterConfigs.tsx has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ts-sdk/src/coordinator/serde.ts · ×1
ts-sdk/src/coordinator/serde.ts: 559 lines of code ts-sdk/src/coordinator/serde.ts:1— ts-sdk/src/coordinator/serde.ts has 559 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/theme.ts · ×1
airflow-core/src/airflow/ui/src/theme.ts: 516 lines of code airflow-core/src/airflow/ui/src/theme.ts:1— airflow-core/src/airflow/ui/src/theme.ts has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx · ×1
airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx: 496 lines of code airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx:1— airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx has 496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ts-sdk/src/coordinator/runtime.ts · ×1
ts-sdk/src/coordinator/runtime.ts: 475 lines of code ts-sdk/src/coordinator/runtime.ts:1— ts-sdk/src/coordinator/runtime.ts has 475 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· ts-sdk/src/coordinator/client.ts · ×1
ts-sdk/src/coordinator/client.ts: 464 lines of code ts-sdk/src/coordinator/client.ts:1— ts-sdk/src/coordinator/client.ts has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx · ×1
airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx: 462 lines of code airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx:1— airflow-core/src/airflow/ui/src/components/Clear/TaskInstance/ClearTaskInstanceDialog.tsx has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx · ×1
airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx: 429 lines of code airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx:1— airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx has 429 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx · ×1
airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx: 428 lines of code airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx:1— airflow-core/src/airflow/ui/src/layouts/Details/Gantt/GanttTimeline.tsx has 428 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx · ×1
airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx: 417 lines of code airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:1— airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts · ×1
providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts: 416 lines of code providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts:1— providers/edge3/src/airflow/providers/edge3/plugins/www/src/theme.ts has 416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
ts-sdk/src/hitl/spec.ts: 414 lines of code ts-sdk/src/hitl/spec.ts:1— ts-sdk/src/hitl/spec.ts has 414 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx · ×1
airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx: 411 lines of code airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:1— airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx has 411 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts · ×1
airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts: 410 lines of code airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts:1— airflow-core/src/airflow/ui/src/pages/Dag/Calendar/calendarUtils.ts has 410 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts · ×1
airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts: 403 lines of code airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:1— airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~420 LoC) registry/src/js/connection-builder.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~347 LoC) registry/src/js/search.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~281 LoC) registry/src/js/provider-detail.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~190 LoC) registry/src/js/provider-filters.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~118 LoC) registry/src/_data/providerVersions.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (registry/src/_data/providerVersionPayloads.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~84 LoC) registry/src/_data/exploreCategories.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (registry/src/_data/exploreCategoryProviders.js, registry/src/_data/providerCategoryMap.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~74 LoC) registry/src/_data/providerKeywordMatch.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (registry/src/_data/exploreCategoryProviders.js, registry/src/_data/providerCategoryMap.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~72 LoC) registry/src/_data/durableModules.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~58 LoC) registry/src/js/copy-button.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~57 LoC) airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/suspense.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~54 LoC) registry/src/js/theme.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~50 LoC) registry/src/js/mobile-menu.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~48 LoC) registry/src/_data/providerVersionPayloads.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~45 LoC) ts-sdk/api-docs/dag-authoring-api.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~43 LoC) registry/src/_data/exploreCategoryProviders.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~40 LoC) airflow-core/src/airflow/ui/src/components/QuickFilterButton.tsx— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~38 LoC) registry/src/_data/providerCategoryMap.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~34 LoC) registry/src/_data/latestVersionData.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~31 LoC) registry/src/_data/moduleCountsByProvider.js— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~28 LoC) ts-sdk/api-docs/supporting-types.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~25 LoC) airflow-core/src/airflow/ui/src/pages/Dag/Calendar/index.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~20 LoC) airflow-core/src/airflow/ui/src/layouts/Details/Gantt/index.ts— no import path from any entry point (142 application, 31 tooling, 388 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency '@eslint/compat' — Declared in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Third-party script without Subresource Integrity airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/dev/index.html:8— `http://localhost:5174/@vite/client` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 4 such include(s) across the repository's markup.
Orphaned file providers/google/src/airflow/providers/google/cloud/triggers/gcs.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/cloud/hooks/secret_manager.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/suite/hooks/sheets.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/cloud/hooks/workflows.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/cloud/operators/cloud_logging_sink.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/asana/src/airflow/providers/asana/hooks/asana.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/informatica/src/airflow/providers/informatica/example_dags/example_informatica_lineage.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/sensors/sagemaker.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/vespa/src/airflow/providers/vespa/hooks/vespa.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/informatica/dev/informatica_simulator/app/main.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/operators/ssm.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/microsoft/azure/src/airflow/providers/microsoft/azure/triggers/data_factory.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/transfers/s3_to_dynamodb.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/marketing_platform/hooks/campaign_manager.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/informatica/src/airflow/providers/informatica/lineage/validation.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/cloud/transfers/calendar_to_gcs.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/google/src/airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/sensors/eks.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/triggers/sqs.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file airflow-core/src/airflow/utils/log/logging_mixin.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file devel-common/src/tests_common/_internals/capture_warnings.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/operators/eventbridge.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file providers/amazon/src/airflow/providers/amazon/aws/transfers/dynamodb_to_s3.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Classify ADR enforcement: ADR-0001: Java SDK Airflow Integration airflow-core/adr/lang-sdk/0001-java-sdk-airflow-integration.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0002: Workload Execution — Language-Specific Task Execution airflow-core/adr/lang-sdk/0002-workload-execution.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0003: Pure Java DAGs — Build-Time Packaging and Code Visibility airflow-core/adr/lang-sdk/0003-pure-java-dags.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0004: DAG Parsing — Language-Specific DAG File Processing airflow-core/adr/lang-sdk/0004-dag-parsing.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0005: Coordinator Packaging, Module Layout, and Registration airflow-core/adr/lang-sdk/0005-coordinator-packaging.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0006: No Lang-SDK Source Code Display for Mixed-Language (`@task.stub`) Dags airflow-core/adr/lang-sdk/0006-no-lang-sdk-source-display.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0007: TaskFlow Across the Language Boundary airflow-core/adr/lang-sdk/0007-taskflow-across-language-boundary.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0008: Control-Flow Constructs in Lang SDKs airflow-core/adr/lang-sdk/0008-control-flow-constructs.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0009: Provider Operators as Generated Lang-SDK DSL airflow-core/adr/lang-sdk/0009-provider-operators-as-generated-dsl.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0010: Native Dag Processing — DagImporter Registration and Routing airflow-core/adr/lang-sdk/0010-native-dag-processing.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0011: Mixed-Language Dag Processing — Task Handlers Are Not Dags airflow-core/adr/lang-sdk/0011-mixed-language-dag-processing.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0012: Lang-SDK Parse Protocol — Handler Messages and Coordinator Verbs airflow-core/adr/lang-sdk/0012-lang-sdk-parse-protocol.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0013: Persisted Task-Handler Bindings (Resolving Lang-SDK Artifacts at Parse Time) airflow-core/adr/lang-sdk/0013-persisted-task-handler-bindings.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0014: Bundle Metadata — Retiring the Build-Time Inventory, Converging on a Cache Digest airflow-core/adr/lang-sdk/0014-bundle-metadata-and-cache-digest.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: ADR-0015: Per-Dag Source in the Lang-SDK Bundle Artifact airflow-core/adr/lang-sdk/0015-per-dag-source-in-bundle-artifact.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 1. Record architecture decisions dev/breeze/doc/adr/0001-record-architecture-decisions.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 2. Implement standalone python command dev/breeze/doc/adr/0002-implement-standalone-python-command.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 3. Bootstrapping the virtual environment dev/breeze/doc/adr/0003-bootstrapping-virtual-environment.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 4. Using Docker images as test environment dev/breeze/doc/adr/0004-using-docker-images-as-test-environment.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 5. Preventing using contributed code when building images dev/breeze/doc/adr/0005-preventing-using-contributed-code-when-building-images.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 6. Using root user and fixing ownership for CI container dev/breeze/doc/adr/0006-using-root-user-and-fixing-ownership-for-ci-container.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 7. Using database volumes for backends dev/breeze/doc/adr/0007-using-database-volumes-for-backends.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 8. Fixing group permissions before build dev/breeze/doc/adr/0008-fixing-group-permissions-before-build.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 9. Exclude all files from dockerignore by default dev/breeze/doc/adr/0009-exclude-all-files-from-dockerignore-by-default.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Classify ADR enforcement: 10. Use pipx to install breeze dev/breeze/doc/adr/0010-use-pipx-to-install-breeze.md— This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
Duplicated predicate airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:119— `!Boolean(dataIntervalStart) || !Boolean(dataIntervalEnd)` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx, airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/utils/datetimeUtils.ts:170— `!Number.isFinite(seconds) || seconds < 0` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/utils/datetimeUtils.ts, ts-sdk/src/coordinator/client.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/layouts/Nav/AdminButton.tsx:77— `!menuItems.length && !externalViews.length` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/layouts/Nav/AdminButton.tsx, airflow-core/src/airflow/ui/src/layouts/Nav/BrowseButton.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate devel-common/src/sphinx_exts/pagefind_search/static/js/search.js:200— `(e.metaKey || e.ctrlKey) && e.key === 'k'` appears character-identically in 2 files — devel-common/src/sphinx_exts/pagefind_search/static/js/search.js, registry/src/js/search.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx:93— `(val === undefined || val === "all") && rest.length === 0` appears character-identically in 2 files — providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/JobsPage.tsx, providers/edge3/src/airflow/providers/edge3/plugins/www/src/pages/WorkerPage.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/queries/useBulkDeleteConnections.tsx:46— `Array.isArray(errors) && errors.length > 0` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/queries/useBulkDeleteConnections.tsx, airflow-core/src/airflow/ui/src/queries/useBulkDeleteVariables.ts, airflow-core/src/airflow/ui/src/queries/useImportVariables.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/queries/useBulkDeleteConnections.tsx:52— `Array.isArray(success) && success.length > 0` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/queries/useBulkDeleteConnections.tsx, airflow-core/src/airflow/ui/src/queries/useBulkDeleteVariables.ts, airflow-core/src/airflow/ui/src/queries/useImportVariables.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/hooks/useHITLReviewTabs.ts:60— `Boolean(dagId) && Boolean(dagRunId) && Boolean(taskId)` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/hooks/useHITLReviewTabs.ts, airflow-core/src/airflow/ui/src/hooks/useRequiredActionTabs.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx:182— `Boolean(errors.date) || dataIntervalInvalid` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.tsx, airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Dag/Overview/AllDeadlinesModal.tsx:59— `alertId !== undefined && alertId !== null` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/pages/Dag/Overview/AllDeadlinesModal.tsx, airflow-core/src/airflow/ui/src/pages/Dag/Overview/DagDeadlines.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/api.ts:27— `baseUrl.pathname.replace(/\/$/, "") || ""` appears character-identically in 2 files — providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/api.ts, providers/common/ai/src/airflow/providers/common/ai/plugins/www/src/model-api.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ts-sdk/src/coordinator/comm-channel.ts:261— `body && typeof body === "object" && "type" in body` appears character-identically in 2 files — ts-sdk/src/coordinator/comm-channel.ts, ts-sdk/src/coordinator/runtime.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Connections/DuplicateConnectionButton.tsx:48— `connection.extra === "" || connection.extra === null` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/pages/Connections/DuplicateConnectionButton.tsx, airflow-core/src/airflow/ui/src/pages/Connections/EditConnectionButton.tsx, airflow-core/src/airflow/ui/src/pages/Connections/TestConnectionButton.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx:86— `depthParam !== null && depthParam !== ""` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/layouts/Details/Gantt/Gantt.tsx, airflow-core/src/airflow/ui/src/layouts/Details/Graph/hooks/useGraphSearchParams.ts, airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx:154— `dl.alert_id !== undefined && dl.alert_id !== null` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatus.tsx, airflow-core/src/airflow/ui/src/pages/Run/DeadlineStatusModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Dag/Backfills/Backfills.tsx:239— `durationGte !== null && durationGte !== ""` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/pages/Dag/Backfills/Backfills.tsx, airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx, airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Dag/Backfills/Backfills.tsx:240— `durationLte !== null && durationLte !== ""` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/pages/Dag/Backfills/Backfills.tsx, airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx, airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/components/HITLReview/HITLReviewList.tsx:89— `event.key === "Enter" || event.key === " "` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/components/HITLReview/HITLReviewList.tsx, airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx:341— `filteredDagVersion !== null && filteredDagVersion !== ""` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/pages/DagRuns/DagRuns.tsx, airflow-core/src/airflow/ui/src/pages/TaskInstances/TaskInstances.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/components/FilterBar/filters/DateFilter.tsx:32— `hasValue && typeof filter.value === "string"` appears character-identically in 3 files — airflow-core/src/airflow/ui/src/components/FilterBar/filters/DateFilter.tsx, airflow-core/src/airflow/ui/src/components/FilterBar/filters/SelectFilter.tsx, airflow-core/src/airflow/ui/src/components/FilterBar/filters/TextSearchFilter.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLResponseForm.tsx:73— `hitlDetail.options.includes("Approve") && hitlDetail.options.includes("Reject") && hitlDetail.options.length === 2` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/pages/HITLTaskInstances/HITLResponseForm.tsx, airflow-core/src/airflow/ui/src/utils/hitl.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/components/DagStatusChip.tsx:63— `importError !== undefined || Boolean(error)` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/components/DagStatusChip.tsx, airflow-core/src/airflow/ui/src/utils/dagStatus.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStoreModal.tsx:73— `isEditMode && existingState !== undefined` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/pages/Asset/AssetStateStore/AssetStateStoreModal.tsx, airflow-core/src/airflow/ui/src/pages/TaskStateStore/TaskStateStoreModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:109— `isOpen && depth !== undefined && depth % 2 === 0` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx, airflow-core/src/airflow/ui/src/layouts/Details/Graph/utils/nodeColor.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate airflow-core/src/airflow/ui/src/pages/Run/AssetEvents.tsx:43— `isStatePending(dagRun?.state) && refetchInterval` appears character-identically in 2 files — airflow-core/src/airflow/ui/src/pages/Run/AssetEvents.tsx, airflow-core/src/airflow/ui/src/pages/Run/Run.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default on parse failure java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/execution/Serde.kt:636— `computeRelativeFileloc` answers `"."` when `InvalidPathException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
Silent fallback default on parse failure airflow-core/src/airflow/models/task_coordinates.py:224— `loop_iterations` returns `[]` when `(TaskNotFound, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure dev/breeze/src/airflow_breeze/utils/run_utils.py:327— `get_filesystem_type` returns `'unknown'` when `ImportError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure dev/skill-evals/eval.py:286— `count_provider_errors` returns `0` when `(OSError, KeyError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure devel-common/src/tests_common/test_utils/aiohttp.py:57— `reason` returns `''` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure providers/common/ai/src/airflow/providers/common/ai/operators/agent.py:227— `_answered_request` returns `-1` when `(TypeError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/analyze_ci_job_durations.py:248— `get_recent_runs` returns `[]` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/analyze_e2e_flaky_tests.py:96— `get_recent_run_ids` returns `[]` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_airflow_imports_in_shared.py:59— `check_file_for_prohibited_imports` returns `[]` when `(OSError, UnicodeDecodeError, SyntaxError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_conn_id_templated.py:111— `parse_classes` returns `[]` when `(SyntaxError, UnicodeDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_http_exception_import_from_fastapi.py:67— `check_file` returns `[]` when `(OSError, UnicodeDecodeError, SyntaxError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_metrics_synced_with_the_registry.py:294— `scan_file_for_metrics` returns `[]` when `(OSError, UnicodeDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_metrics_synced_with_the_registry.py:357— `scan_file_for_direct_stats_imports` returns `[]` when `(OSError, UnicodeDecodeError, SyntaxError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_openapi_exception_doc_in_sync.py:320— `check_file` returns `[]` when `(OSError, UnicodeDecodeError, SyntaxError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_provide_session_kwargs.py:256— `_parse_tracked_allowlist` returns `{}` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/check_test_only_imports_in_src.py:72— `check_file` returns `[]` when `(OSError, UnicodeDecodeError, SyntaxError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure scripts/ci/prek/common_prek_utils.py:791— `find_import_violations` returns `[]` when `(OSError, UnicodeDecodeError, SyntaxError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure task-sdk/src/airflow/sdk/coordinators/java/_dag_importer.py:120— `_read_source_index` returns `{}` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×14
Diagnostic log message is built whether or not it is wanted task-sdk/src/airflow/sdk/serde/__init__.py:505— `debug` at line 505 is called with an argument built by `"…".join(sorted(_serializers))` (line 507), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/standard/src/airflow/providers/standard/operators/bash.py:200— `debug` at line 200 is called with an argument built by `"…".join("…" k "…" v "…" for k, v in airflow_context_vars.items())` (line 202), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:716— `debug` at line 716 is called with an argument built by `tuple(facets)` (line 718), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/wasb.py:526— `debug` at line 526 is called with an argument built by `"…".join(download_logs)` (line 526), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/google/src/airflow/providers/google/cloud/triggers/gcs.py:402— `debug` at line 402 is called with an argument built by `"…".join(current_objects - self.previous_objects)` (line 402), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/google/src/airflow/providers/google/cloud/sensors/gcs.py:438— `debug` at line 438 is called with an argument built by `"…".join(current_objects - self.previous_objects)` (line 438), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/exasol/src/airflow/providers/exasol/hooks/exasol.py:366— `debug` at line 366 is called with an argument built by `list(sql_list)` (line 366), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:187— `debug` at line 187 is called with an argument built by `yaml.safe_dump(job_request_obj.to_dict())` (line 187), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:781— `debug` at line 781 is called with an argument built by `yaml.safe_dump(pod_request_obj.to_dict())` (line 781), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py:231— `debug` at line 231 is called with an argument built by `sorted(dropped)` (line 233), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted providers/amazon/src/airflow/providers/amazon/aws/hooks/s3.py:1859— `debug` at line 1859 is called with an argument built by `"…".join(download_logs)` (line 1859), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted REDACTED:86— `debug` at line 86 is called with an argument built by `list(columns)` (line 86), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted airflow-core/src/airflow/jobs/scheduler_job_runner.py:818— `debug` at line 818 is called with an argument built by `list(unique_dag_ids)` (line 821), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Diagnostic log message is built whether or not it is wanted airflow-core/src/airflow/dag_processing/manager.py:323— `debug` at line 323 is called with an argument built by `"…".join(map(str, inspect.stack()))` (line 323), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 22 significant file(s) lose their only recent owner: airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_bundles.py, providers/ssh/src/airflow/providers/ssh/triggers/ssh_remote_job.py, providers/common/ai/src/airflow/providers/common/ai/skills.py, providers/common/ai/src/airflow/providers/common/ai/example_dags/example_llm_retry_policy.py, providers/common/ai/src/airflow/providers/common/ai/toolsets/skills.py, providers/openai/src/airflow/providers/openai/operators/agent.py, providers/common/ai/src/airflow/providers/common/ai/example_dags/example_decision_model.py, providers/anthropic/src/airflow/providers/anthropic/triggers/agent.py (+14 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 13 significant file(s) lose their only recent owner: airflow-core/src/airflow/triggers/shared_stream.py, airflow-core/src/airflow/partition_mappers/temporal.py, airflow-core/src/airflow/partition_mappers/window.py, task-sdk/src/airflow/sdk/definitions/partition_mappers/temporal.py, dev/registry/registry_tools/types.py, task-sdk/src/airflow/sdk/definitions/partition_mappers/window.py, airflow-core/src/airflow/migrations/versions/0108_3_2_0_fix_migration_file_ORM_inconsistencies.py, airflow-core/src/airflow/cli/commands/partition_command.py (+5 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 12 significant file(s) lose their only recent owner: java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/internal/ArgValues.kt, ts-sdk/src/coordinator/arg-binding.ts, java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/Bundle.kt, java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/internal/InputTypes.kt, java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/internal/TaskArgs.kt, go-sdk/cmd/airflow-go-pack/main.go, java-sdk/scala_spark_example/src/main/scala/org/apache/airflow/example/ScalaSparkExample.scala, ts-sdk/src/sdk/task-handler.ts (+4 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 11 significant file(s) lose their only recent owner: dev/update_github_branch_config.py, dev/breeze/src/airflow_breeze/commands/common_image_options.py, scripts/ci/prek/check_go_version_in_sync.py, airflow-core/hatch_build.py, REDACTED, airflow-core/src/airflow/api_fastapi/common/http_access_log.py, scripts/ci/prek/check_go_example_mod_tidy.py, airflow-core/src/airflow/migrations/versions/0131_3_4_0_lower_case_team_names.py (+3 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: task-sdk/src/airflow/sdk/bases/resumablejobmixin.py, airflow-core/src/airflow/migrations/versions/0112_3_3_0_add_task_state_store_and_asset_state_store_tables.py, airflow-core/src/airflow/example_dags/example_task_state_store_async.py, airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_state_store.py, airflow-core/src/airflow/example_dags/example_task_state_store.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 4 significant file(s) lose their only recent owner: providers/duckdb/src/airflow/providers/duckdb/hooks/duckdb.py, providers/duckdb/src/airflow/providers/duckdb/operators/duckdb.py, airflow-core/src/airflow/api_fastapi/auth/middlewares/team_authorization.py, providers/amazon/src/airflow/providers/amazon/aws/triggers/ec2.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 4 significant file(s) lose their only recent owner: airflow-core/src/airflow/ui/src/hooks/useIframeUrlSync.ts, airflow-core/src/airflow/ui/src/queries/useBulkPatchDagRun.ts, airflow-core/src/airflow/ui/src/queries/useBulkClearDagRuns.ts, airflow-core/src/airflow/ui/src/queries/useBulkClearDagRunsDryRun.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 4 significant file(s) lose their only recent owner: airflow-ctl/src/airflowctl/ctl/utils/dag_run.py, devel-common/src/tests_common/test_utils/fake_secrets_backend.py, scripts/ci/testing/compute_remaining_test_timeout.py, airflow-core/src/airflow/utils/yaml.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 3 significant file(s) lose their only recent owner: providers/google/src/airflow/providers/google/cloud/operators/vertex_ai/agent_engine.py, providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod_exec.py, providers/amazon/src/airflow/providers/amazon/aws/operators/ecr.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 3 significant file(s) lose their only recent owner: providers/amazon/src/airflow/providers/amazon/aws/operators/s3_tables.py, providers/amazon/src/airflow/providers/amazon/aws/operators/glue_catalog.py, providers/amazon/src/airflow/providers/amazon/aws/operators/s3_vectors.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 3 significant file(s) lose their only recent owner: providers/snowflake/src/airflow/providers/snowflake/operators/cortex_agent.py, providers/amazon/src/airflow/providers/amazon/aws/operators/athena_spark.py, providers/elasticsearch/src/airflow/providers/elasticsearch/utils/sql.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 3 significant file(s) lose their only recent owner: REDACTED, dev/check_changelog_entries.py, scripts/ci/prek/changelog_duplicates.py. Pair on, review, or document these before any departure.
Mock-dominated test: fails with Airflow's reason when Airflow could not resume the task ts-sdk/tests/coordinator/operator-runner.test.ts:91— This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: fetches links for the exact selected region and try airflow-core/src/airflow/ui/src/pages/TaskInstance/ExtraLinks.test.tsx:56— This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: resets a materialization error when the paused Dag choice changes airflow-core/src/airflow/ui/src/pages/Asset/CreateAssetEventModal.test.tsx:243— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: centers the selected task when the structure changed and it is out of view airflow-core/src/airflow/ui/src/layouts/Details/Grid/useGridScrollRestore.test.ts:119— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: centers a selected group when no task is selected airflow-core/src/airflow/ui/src/layouts/Details/Grid/useGridScrollRestore.test.ts:136— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not scroll when the selected task is already visible airflow-core/src/airflow/ui/src/layouts/Details/Grid/useGridScrollRestore.test.ts:154— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does nothing when the selected id is not among the rows airflow-core/src/airflow/ui/src/layouts/Details/Grid/useGridScrollRestore.test.ts:171— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: removes the required actions route when closing the HITL review airflow-core/src/airflow/ui/src/components/HITLReview/useHITLReviewModalRouteSync.test.tsx:66— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: clears a failed backfill request when the paused Dag choice changes airflow-core/src/airflow/ui/src/components/DagActions/RunBackfillForm.test.tsx:180— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
No seccomp profile REDACTED:27— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:30— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:18— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:23— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:23— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
No seccomp profile REDACTED:23— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
Silent fallback default in catch providers/common/ai/src/airflow/providers/common/ai/managed_agents/failover.py:144— `_get_platform` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch airflow-core/src/airflow/ui/src/utils/logs.ts:73— `parseStreamingLogContent` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch airflow-core/src/airflow/ui/tests/e2e/utils/api/dag-runs.ts:58— `waitForDagReady` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch airflow-core/src/airflow/ui/tests/e2e/pages/RequiredActionsPage.ts:341— `waitForDagRunState` swallows every exception into `return "unknown"` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch airflow-core/src/airflow/ui/tests/e2e/utils/api/backfills.ts:85— `apiWaitForNoActiveBackfill` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch airflow-core/src/airflow/ui/tests/e2e/utils/api/backfills.ts:121— `apiWaitForBackfillComplete` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 597 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
Partial audit-trail evidence — An audit mechanism is present, but the trail is not yet complete — missing: a write-side hook every change flows through (HistoricalRecords, auditlog.register, reversion.register, pghistory.track, SQLAlchemy-Continuum, a post_save / after_update listener recording each change, or an event-sourced store), per-model coverage (a change-history registration on each model that needs a who-changed-what trail, or an event-sourced aggregate).
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 39 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (137 single-owned of 2837 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 2837 of the 4967 production source files in this repository met that bar). They are anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)), anonymized user #16 (2 file(s)), anonymized user #17 (2 file(s)), anonymized user #18 (2 file(s)) (+33 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: providers/amazon/src/airflow/providers/amazon/aws/hooks/sagemaker_unified_studio_notebook.py, providers/amazon/src/airflow/providers/amazon/aws/sensors/sagemaker_unified_studio_notebook.py, providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/BulkWorkerOperations.tsx, providers/edge3/src/airflow/providers/edge3/plugins/www/src/hooks/useBulkWorkerActions.ts, airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/logSelection.ts, go-sdk/cmd/airflow-go-pack/validate.go, providers/opensearch/src/airflow/providers/opensearch/log/os_response.py, providers/influxdb/src/airflow/providers/influxdb/triggers/influxdb3.py (+42 more).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 16 of 156 project(s) overshoot their size bounds, lowering Project Cohesion to 8.0/10. The most over is `airflow-core` (135799 LoC, 1519 module-visible types across 68 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 148 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: providers/google/src/airflow/providers/google/cloud/triggers/gcs.py, providers/google/src/airflow/providers/google/cloud/hooks/secret_manager.py, providers/google/src/airflow/providers/google/suite/hooks/sheets.py, providers/google/src/airflow/providers/google/cloud/hooks/workflows.py, providers/clickhousedb/src/airflow/providers/clickhousedb/hooks/clickhouse.py, providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/custom_object_launcher.py, providers/google/src/airflow/providers/google/cloud/operators/cloud_logging_sink.py, providers/asana/src/airflow/providers/asana/hooks/asana.py (and 140 more) (160 orphaned of 2848 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 2848 of the 4967 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Logging is not universal — Only 125/130 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `airflow-core/src/airflow/ui`, `dev/breeze`, `providers/informatica/dev/informatica_simulator`, `ts-sdk`.
R7 · Dead Code· Unused export 'useCreateTokenAllAdmins' · ×1
Unused export 'useCreateTokenAllAdmins' airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queries.ts:29— Nothing ultimately consumes this binding: its only referrer is the re-export in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'useLoginAllAdmins' · ×1
Unused export 'useLoginAllAdmins' airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queries.ts:51— Nothing ultimately consumes this binding: its only referrer is the re-export in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'useCreateTokenCli' · ×1
Unused export 'useCreateTokenCli' airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queries.ts:96— Nothing ultimately consumes this binding: its only referrer is the re-export in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'createTokenAllAdminsOptions' · ×1
Unused export 'createTokenAllAdminsOptions' airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queryOptions.ts:13— Nothing ultimately consumes this binding: its only referrer is the re-export in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'loginAllAdminsOptions' · ×1
Unused export 'loginAllAdminsOptions' airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/queryOptions.ts:29— Nothing ultimately consumes this binding: its only referrer is the re-export in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/queries/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code· Unused export 'getComputedCSSVariableValue' · ×1
Unused export 'getComputedCSSVariableValue' airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/src/theme.ts:404— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'ITERATION_ALL' · ×1
Unused export 'ITERATION_ALL' airflow-core/src/airflow/ui/src/components/FilterBar/filters/loopParams.ts:25— Nothing imports this binding — it is safe to review for removal.
No security response headers detected REDACTED:19— None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `REDACTED` builds the web-server image that serves this application, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 2/4 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Null assertions (`!`) reduce the strict null checking score — ~0.3 `!` null assertions per 1k TypeScript source lines — 25 assertion(s) across the 94068 source line(s) of the 911 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: ts-sdk/src/sdk/dag.ts (8), ts-sdk/src/coordinator/client.ts (7), ts-sdk/src/coordinator/deferred.ts (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Subsumed condition operand scripts/ci/prek/inline_scripts_in_docker.py:52— `line.startswith("#!")` can never decide this `||` — every value satisfying `line.startswith("#!")` also satisfies `line.startswith("#")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Off the main sequence: apache-airflow-providers-common-compat — apache-airflow-providers-common-compat: abstractness 0.00, instability 0.01, distance 0.99 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: apache-airflow-devel-common — apache-airflow-devel-common: abstractness 0.04, instability 0.00, distance 0.96 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: apache-airflow-providers-common-sql — apache-airflow-providers-common-sql: abstractness 0.06, instability 0.06, distance 0.88 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Outdated: github.com/spf13/cobra — `github.com/spf13/cobra` is required at v1.10.1 in REDACTED, but v1.10.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/spf13/cobra@v1.10.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.11.1 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 32 file(s) — `airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py`, `airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py`, `airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_stats.py`, `airflow-core/src/airflow/dag_processing/collection.py`, `airflow-core/src/airflow/models/dagrun.py`, … (+27 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a17420-be44-7e46-87c2-3c51c09ab2a5 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 178 · Warnings: 3772 · Recommendations: 477 · Info: 5 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 25-10-2026 @ 17:34 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.