Fix autofix detection + speed up reusable Python CI - #1502
Conversation
Automated Status SummaryHead SHA: 2e97162
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #1502 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
There was a problem hiding this comment.
Pull request overview
This PR improves autofix detection reliability and reduces Python CI runtime by removing implicit heavyweight dependencies. The autofix workflow now correctly resolves failures against the triggering workflow_run SHA (with fallback to PR head if needed), proceeds with autofix attempts even when rate-limited on file listing, and prioritizes automation PATs for better rate limit headroom. The Python CI workflow removes ~10 implicit baseline test dependencies (hypothesis, pandas, numpy, pydantic, etc.), requiring consumer repos to declare their own dependencies explicitly, which reduces 3.11/3.12 runtime significantly.
Changes:
- Autofix detection now checks workflow_run.head_sha first, falling back to PR head SHA if no failures found
- Rate-limit handling changed from skip-run to proceed-without-filter for better throughput
- Token selection prioritizes AGENTS_AUTOMATION_PAT and ACTIONS_BOT_PAT over github.token
- Python CI no longer installs heavyweight baseline test dependencies implicitly
- Extensive code formatting improvements for readability (multi-line statements, consistent indentation)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/autofix.yml | Added triggerHeadSha resolution, listFilesOrNullOnRateLimit helper, setOutputs helper, token prioritization, and code cleanup |
| templates/consumer-repo/.github/workflows/autofix.yml | Same autofix improvements as main workflow (inline instead of helpers), token prioritization, rate limit handling |
| .github/workflows/reusable-10-ci-python.yml | Removed base_test_specs heavyweight dependencies, reformatted long lines, simplified cache restore-keys |
| mypy-${{ runner.os }}- | ||
| mypy-${{ runner.os }}-${{ matrix.python-version }}- |
There was a problem hiding this comment.
The restore-keys order should be from most specific to least specific, but it's currently reversed. GitHub Actions tries restore-keys in order, so putting the generic key first (mypy-${{ runner.os }}-) means it could match caches from different Python versions or project configurations before trying a more specific match. This could cause mypy cache mismatches.
Consider reordering to:
restore-keys: |
mypy-${{ runner.os }}-${{ matrix.python-version }}-
mypy-${{ runner.os }}-
This ensures caches from the same Python version are preferred before falling back to any OS-level cache.
| mypy-${{ runner.os }}- | |
| mypy-${{ runner.os }}-${{ matrix.python-version }}- | |
| mypy-${{ runner.os }}-${{ matrix.python-version }}- | |
| mypy-${{ runner.os }}- |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 243f47f8a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Autofix updated these files:
|
…/stranske/Workflows into fix/event-hub-reusable-workflows
Automated Status Summary
Scope
Scope section missing from source issue.
Context for Agent
Related Issues/PRs
Tasks
Acceptance criteria
Head SHA: 76e1e04
Latest Runs: ✅ success — Gate
Required: gate: ✅ success