ShivanshhhG opened a new pull request, #74974:
URL: https://github.com/apache/airflow/pull/74974

   related: #62500
   
   ### Description
   
   This PR introduces Breeze-aware context detection, command routing, and a 
dedicated contributor agent skill to improve test execution efficiency and 
guardrails across host and containerized environments (addressing GSoC 2026 
Issue #62500).
   
   #### Key Changes:
   1. **Breeze Execution Context Helper (`scripts/tools/breeze_context.py`)**:
      - Detects whether execution is running inside a Breeze container 
(`BREEZE="true"`), inside a devcontainer (`CODESPACES`/`REMOTE_CONTAINERS`), or 
on the host.
      - Infers the nearest UV monorepo workspace project (`airflow-core`, 
`task-sdk`, `providers/<name>`, `scripts`, `airflow-ctl`, `shared/<name>`) from 
any source or test path.
      - Provides optimal test command routing: fast host path via `uv run 
--project <PROJECT> pytest <path> -xvs` with fallback to `breeze run pytest 
<path> -xvs` when missing system dependencies or DB integration.
      - Warns and prevents attempts to invoke `breeze` or `breeze shell` inside 
an active Breeze container (preventing nested Docker failure).
      - Provides `--json` machine-readable output for coding agents and 
`--check-breeze` for scripting.
   
   2. **Contributor Agent Skill (`.agents/skills/breeze-workflow/SKILL.md`)**:
      - Implements standard AgentSkills.io frontmatter (`name`, `description`, 
`license: Apache-2.0`).
      - Standardizes the decision tree: Context Detection -> Fast UV Pytest -> 
Breeze Container Fallback -> Airflow CLI -> Static checks.
      - Added symlinks in `.claude/skills/breeze-workflow` and 
`.github/skills/breeze-workflow` (with `.gitignore` unignore rule).
   
   3. **Pre-commit Skill Validation Hook 
(`scripts/ci/prek/validate_agent_skills.py`)**:
      - Registered as `validate-agent-skills` in `.pre-commit-config.yaml`.
      - Validates that all skills in `.agents/skills/` have valid YAML 
frontmatter, Apache-2.0 license declaration, and healthy symlinks without drift.
   
   4. **Test Coverage**:
      - `scripts/tests/tools/test_breeze_context.py`: 20 unit tests covering 
context detection, workspace member inference, CLI JSON output, and guardrails.
      - `scripts/tests/ci/prek/test_validate_agent_skills.py`: 12 unit tests 
verifying skill frontmatter, license checks, symlink integrity, and 
`.gitignore` integration.
      - All 67 scripts tests pass cleanly in pytest.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (Antigravity)
   
   Generated-by: Antigravity following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to