diff --git a/.apache-steward/apache-steward b/.apache-steward/apache-steward new file mode 160000 index 0000000000000..9774cc927b1d4 --- /dev/null +++ b/.apache-steward/apache-steward @@ -0,0 +1 @@ +Subproject commit 9774cc927b1d4cb02278d5e1a33ba660cb2d5ec2 diff --git a/.apache-steward/pr-maintainer-review-criteria.md b/.apache-steward/pr-maintainer-review-criteria.md new file mode 100644 index 0000000000000..833974859ecae --- /dev/null +++ b/.apache-steward/pr-maintainer-review-criteria.md @@ -0,0 +1,91 @@ + + + + +# Apache Airflow — pr-maintainer-review criteria + +Per-project navigation map for the +[`pr-maintainer-review`](apache-steward/.claude/skills/pr-maintainer-review/SKILL.md) +skill's review-criteria source files. Companion to the framework's +[`projects/_template/pr-maintainer-review-criteria.md`](apache-steward/projects/_template/pr-maintainer-review-criteria.md) +scaffold. + +The framework does not restate the rules; this file points at them. +The skill's review pass reads each source file at session start +(and re-reads per-area files as PRs route into different trees) and +quotes the **source rule verbatim** in any finding it raises. + +## Repo-wide source files + +| File | What it covers | +|---|---| +| [`.github/instructions/code-review.instructions.md`](../.github/instructions/code-review.instructions.md) | The rule set every Apache Airflow PR is reviewed against (architecture / DB / quality / testing / API / UI / generated files / AI-generated-code signals / quality signals). | +| [`AGENTS.md`](../AGENTS.md) | Repo-wide AI/agent instructions (architecture boundaries, security model, coding standards, testing standards, commits & PR conventions). | + +## Per-area source files + +Always loaded — the skill also auto-discovers any `AGENTS.md` +under the touched paths via `git ls-files`. + +| File | When it applies | +|---|---| +| [`registry/AGENTS.md`](../registry/AGENTS.md) | Registry-tree-specific rules. | +| [`dev/AGENTS.md`](../dev/AGENTS.md) | `dev/` scripts conventions. | +| [`dev/ide_setup/AGENTS.md`](../dev/ide_setup/AGENTS.md) | IDE bootstrap conventions. | +| [`providers/AGENTS.md`](../providers/AGENTS.md) | Provider-tree boundary, compat-layer, and `provider.yaml` expectations. | +| [`providers/elasticsearch/AGENTS.md`](../providers/elasticsearch/AGENTS.md) | Elasticsearch-specific rules. | +| [`providers/opensearch/AGENTS.md`](../providers/opensearch/AGENTS.md) | OpenSearch-specific rules. | + +## Security-model calibration + +| File | Used by | +|---|---| +| [`airflow-core/docs/security/security_model.rst`](../airflow-core/docs/security/security_model.rst) | The skill's `Security model — calibration` section (`review-flow.md`). Used to distinguish actual vulnerabilities from documented limitations and deployment-hardening opportunities. | + +## Backports / version-specific PRs + +| Concept | Pattern | +|---|---| +| Backport branch pattern | `vX-Y-test` | + +Backports get a lighter-touch review focused on diff parity and +cherry-pick conflicts; prefer `COMMENT` over `REQUEST_CHANGES` +unless the cherry-pick has clearly drifted from the `main` change. + +## Section anchors + +The skill links per-finding to the section in +[`.github/instructions/code-review.instructions.md`](../.github/instructions/code-review.instructions.md) +that the finding cites: + +| Section | Anchor URL | +|---|---| +| Architecture boundaries | | +| Database / query correctness | | +| Code quality | | +| Testing | | +| API correctness | | +| UI (React/TypeScript) | | +| Generated files | | +| AI-generated code signals | | +| Quality signals to check | | +| Commits and PRs | | +| Security model | | diff --git a/.apache-steward/pr-triage-ci-check-map.md b/.apache-steward/pr-triage-ci-check-map.md new file mode 100644 index 0000000000000..c40200dea8692 --- /dev/null +++ b/.apache-steward/pr-triage-ci-check-map.md @@ -0,0 +1,68 @@ + + + + +# Apache Airflow — pr-triage CI-check to doc-URL map + +Per-project CI-check categorisation table for the +[`pr-triage`](apache-steward/.claude/skills/pr-triage/SKILL.md) +skill's violations comments. Companion to the framework's +[`projects/_template/pr-triage-ci-check-map.md`](apache-steward/projects/_template/pr-triage-ci-check-map.md) +scaffold. + +When a PR has failing CI checks, the skill groups failures by +category (static checks, tests, image builds, etc.) and links each +category to the documentation for that area. + +## Table + +Pattern matching is **case-insensitive substring**, evaluated in +the order below — first match wins. Put more-specific patterns +above broader ones (e.g. `mypy-airflow-core` before bare `mypy`). + +| Pattern | Category | Doc URL | +|---|---|---| +| `static checks` | Pre-commit / static checks | | +| `pre-commit` | Pre-commit / static checks | | +| `prek` | Pre-commit / static checks | | +| `ruff` | Ruff (linting / formatting) | | +| `mypy-` | mypy (type checking) | | +| `unit test` | Unit tests | | +| `test-` | Unit tests | | +| `docs` | Build docs | | +| `spellcheck-docs` | Build docs | | +| `build-docs` | Build docs | | +| `helm` | Helm tests | | +| `k8s` | Kubernetes tests | | +| `kubernetes` | Kubernetes tests | | +| `build ci image` | Image build | | +| `build prod image` | Image build | | +| `ci-image` | Image build | | +| `prod-image` | Image build | | +| `provider` | Provider tests | | +| `*` (catch-all) | Other failing CI checks | | + +## Fallbacks + +| Concept | Doc URL | +|---|---| +| Merge conflicts (rebase guide) | | +| Pull Request quality criteria (the Copilot-review / unresolved-threads fallback) | | diff --git a/.apache-steward/pr-triage-comment-templates.md b/.apache-steward/pr-triage-comment-templates.md new file mode 100644 index 0000000000000..c8d355c567067 --- /dev/null +++ b/.apache-steward/pr-triage-comment-templates.md @@ -0,0 +1,77 @@ + + + + +# Apache Airflow — pr-triage comment templates + +Per-project comment-body library for the +[`pr-triage`](apache-steward/.claude/skills/pr-triage/SKILL.md) +skill. The framework's +[`comment-templates.md`](apache-steward/.claude/skills/pr-triage/comment-templates.md) +documents what each template **must** contain (the contract); this +file declares Airflow's actual wording, URLs, and tone. + +## Project-specific URLs + +| Placeholder | Value | +|---|---| +| `` | | +| `` | | +| `` | `Apache Airflow` | + +## Quality-criteria marker string + +| Concept | Value | +|---|---| +| Triage-marker visible link text | `Pull Request quality criteria` | + +This is the literal string the framework searches for to detect +already-triaged PRs. **Do not paraphrase** — the same exact string +must appear verbatim in every triage comment the skill posts, and +[`pr-stats`](apache-steward/.claude/skills/pr-stats/SKILL.md) uses +the same marker for its "is this PR triaged" detection. + +## AI-attribution footer + +The block appended verbatim to every contributor-facing comment +(see +[`comment-templates.md` § AI-attribution footer](apache-steward/.claude/skills/pr-triage/comment-templates.md#ai-attribution-footer) +for the rules — always-include, never-paraphrase, render at end of +body). + +```markdown +--- + +_Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this [two-stage triage process](https://github.com/apache/airflow/blob/main/contributing-docs/25_maintainer_pr_triage.md#why-the-first-pass-is-automated) so that our maintainers' limited time is spent where it matters most: the conversation with you._ +``` + +## Template bodies + +The framework's +[`comment-templates.md`](apache-steward/.claude/skills/pr-triage/comment-templates.md) +currently embeds Airflow-flavoured body text inline (a pre- +extraction migration artefact). Airflow uses those inline defaults +as-is; this section becomes load-bearing once the framework +completes the extraction so non-Airflow adopters can override +section-by-section without forking the whole file. + +Until then, treat this section as a stub: the framework's defaults +*are* Airflow's defaults. diff --git a/.apache-steward/pr-triage-config.md b/.apache-steward/pr-triage-config.md new file mode 100644 index 0000000000000..e2196b6f9c8cf --- /dev/null +++ b/.apache-steward/pr-triage-config.md @@ -0,0 +1,55 @@ + + + + +# Apache Airflow — pr-triage configuration + +Per-project configuration for the +[`pr-triage`](apache-steward/.claude/skills/pr-triage/SKILL.md) and +[`pr-stats`](apache-steward/.claude/skills/pr-stats/SKILL.md) +skills. Companion to the framework's +[`projects/_template/pr-triage-config.md`](apache-steward/projects/_template/pr-triage-config.md) +scaffold. + +## Identifiers + +| Key | Value | Used by | +|---|---|---| +| `committers_team` | `apache/airflow-committers` | `classify-and-act.md` row F5b — team-mention detection. | +| `area_label_prefix` | `area:` | `classify-and-act.md`, `pr-stats` — area-label grouping. | + +## Project-specific labels + +| Concept | Label | +|---|---| +| `ready_for_maintainer_review` | `ready for maintainer review` | +| `quality_violations_close` | `quality violations - closed` | +| `suspicious_changes` | `suspicious changes` | +| `work_in_progress` | (Airflow uses GitHub's draft state, not a WIP label — leave the rule disabled) | + +## Grace windows + +| Concept | Value | +|---|---| +| Stale-draft close threshold | 30 days | +| Inactive-open → draft threshold | 14 days | +| Stale-review-ping cooldown | 7 days | +| Stale-workflow-approval threshold | 7 days | diff --git a/.apache-steward/project.md b/.apache-steward/project.md new file mode 100644 index 0000000000000..425d8126ef283 --- /dev/null +++ b/.apache-steward/project.md @@ -0,0 +1,69 @@ + + + + +# Apache Airflow — project manifest + +This is the **project configuration** for `apache-airflow` as an +adopter of the [`apache/airflow-steward`](https://github.com/apache/airflow-steward) +framework. The framework lives at +[`.apache-steward/apache-steward/`](apache-steward/) as a git +submodule; this directory carries the airflow-specific content the +framework's skills resolve via the +[`/` placeholder convention](apache-steward/AGENTS.md#placeholder-convention-used-in-skill-files). + +apache-airflow adopts only the +[PR triage and review](apache-steward/.claude/skills/pr-triage/SKILL.md) +skill family — the security workflow runs out of the private +security-tracker repo (`apache/airflow-s`), not out of the public +upstream. Files declaring security-workflow specifics +(`canned-responses.md`, `scope-labels.md`, `release-trains.md`, +etc.) intentionally do **not** live here; they're declared in the +security tracker's own `.apache-steward/` directory. + +## Identity + +| Key | Value | +|---|---| +| `project_name` | Apache Airflow | +| `vendor` | Apache Software Foundation | +| `short_name` | Airflow | +| `product_family_url` | | + +## Repositories + +| Key | Value | Purpose | +|---|---|---| +| `upstream_repo` | `apache/airflow` | Public codebase — this repo. PR-skill default target. | +| `upstream_repo_url` | | | +| `upstream_default_branch` | `main` | | + +## Pointers to sibling files + +The PR-skill family resolves its project-specific content from +these files in this directory: + +| File | Used by | +|---|---| +| [`pr-triage-config.md`](pr-triage-config.md) | `pr-triage`, `pr-stats` | +| [`pr-triage-comment-templates.md`](pr-triage-comment-templates.md) | `pr-triage` | +| [`pr-triage-ci-check-map.md`](pr-triage-ci-check-map.md) | `pr-triage` | +| [`pr-maintainer-review-criteria.md`](pr-maintainer-review-criteria.md) | `pr-maintainer-review` | diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000..fea58b58c972f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".apache-steward/apache-steward"] + path = .apache-steward/apache-steward + url = https://github.com/apache/airflow-steward.git