Raise bug-fix workflow credit cap and run pytest from PATH - #4508
Conversation
The agentic bug-fix run hit the 1K default and then failed trying ./.venv/bin/python (Permission denied). Give the workflow 2K credits, allow `python` as well as python3, and tell the agent to use PATH. Fixes github#4472
|
Thanks @gyanu2507 — a process heads-up. This one turns out to touch security-sensitive agentic-workflow infra: the change only takes effect once the compiled Two small design tweaks I'm weighing as I do, with rationale to follow in the finishing commit: keeping the credit cap as-is if the pytest-from-PATH fix removes the retry loop that caused the ~8-credit overrun, and keeping the bash allowlist at |
…fect PR github#4508 raised max-ai-credits to 2000 and added `python` to the bash allowlist in bug-fix.md, but never regenerated the compiled bug-fix.lock.yml — the artifact GitHub Actions actually runs. Both frontmatter-derived settings were therefore inert: the lock still pinned maxAiCredits to the 1000 default and allowed shell(python3) but not shell(python). (The prompt guidance was already live via {{#runtime-import}}.) Recompile with gh-aw v0.79.8 (the pinned compiler) to apply exactly: - agent + summary jobs' effective maxAiCredits: 1000 -> 2000 - harness allowlist: + shell(python) Dependabot's action SHA pins in the committed lock (actions/checkout v7.0.1, actions/setup-node v7.0.0) are preserved rather than reverted to the compiler's older baked-in defaults. No container digest, firewall domain, permission, or detection-job (400) change. Rework tests/test_bug_fix_workflow.py to assert the compiled lock (the real running artifact) for the cap and allowlist, and the runtime-imported Markdown for the pytest-PATH guidance, replacing the prior .md-only string checks that passed even while the running workflow was unchanged. Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Sounds good. I'll leave the lockfile recompile and the credit / python allowlist tweaks to you. |
|
Maintainer note: I (@mnriem) pushed one agent-assisted commit (5c52420) to complete this PR. Disclosure: it was generated autonomously by GitHub Copilot (model: Claude Opus 4.8) and reviewed by me before pushing. The core gap was that I recompiled with the pinned I also reworked One judgment call for reviewers: keeping the cap at CI has not run on this push and will need a maintainer trigger. |
There was a problem hiding this comment.
🟢 Approval recommended
The source, generated workflow, and focused regression coverage consistently address both reported failures.
Pull request overview
Fixes #4472 by raising the bug-fix workflow’s credit budget and avoiding disallowed project-local Python executables.
Changes:
- Raises AI credit limit to 2000.
- Allows PATH-based
python,python3, andpytest. - Adds regression tests covering source and compiled workflow consistency.
File summaries
| File | Description |
|---|---|
.github/workflows/bug-fix.md |
Updates limits, allowlist, and test guidance. |
.github/workflows/bug-fix.lock.yml |
Regenerates the executable workflow. |
tests/test_bug_fix_workflow.py |
Guards the workflow configuration. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks @gyanu2507 — the completed change now has passing CI and a review recommending approval on the current head. The compiled workflow includes the intended settings. One disclosure detail remains before merge: please identify the agent/tool, model(s), and settings/mode used for your original contribution. My maintainer comment covers the later Copilot-authored completion commit, but your original work is currently described only as “LLM-assisted.” No further code changes requested from this pass. Drafted for @mnriem by GitHub Copilot (model: GPT-6 Astra). |
|
Original commit is ac992b4. That was an interactive coding-agent session. I picked #4472, went through the diff, and ran I don't have a reliable record of the exact model slug or sampling settings from that session. I steered which issue to take, the tests, and the commit. 5c52420 is the lockfile recompile I left to you. |
|
Thanks, @gyanu2507. Please identify the coding-agent tool/product used for ac992b4; that is the remaining detail from the earlier disclosure request. For the exact model and sampling settings, explicitly stating "not recorded" is preferable to guessing. Please fold that clarification into the PR’s AI Disclosure section so the contribution record is self-contained. The separate disclosure for 5c52420 already covers the maintainer completion commit. No further code changes are requested. Posted on behalf of @mnriem by GitHub Copilot (model: GPT-6 Astra). |
…its-pytest Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
main advanced past this PR: github#4604 upgraded the bug-fix workflow to gh-aw v0.88.7 (new container digests, setup-action pin, engine copilot 1.0.80), which conflicted with the v0.79.8 lock this branch had generated. Merged origin/main and regenerated bug-fix.lock.yml from source with the now-current pinned compiler v0.88.7 so the artifact GitHub Actions runs reflects @gyanu2507's frontmatter. Net delta vs main is only the intended change: agent maxAiCredits 1000->2000 and the harness allowlist gains shell(python) alongside shell(python3). The manifest (action SHAs, container digests), firewall allowDomains, permissions, isolation, models, detection cap (400) and daily cap (5000) are byte-identical to main. The .gitattributes churn the compiler emits is reverted to match main. Focused tests (tests/test_bug_fix_workflow.py) assert the compiled lock, not just the Markdown, and pass; the workflow-validation suite passes. Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
0ff3230 to
e8c80aa
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new regression assertions can pass without verifying the executable allowlist or prohibition wording.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Balanced
…rsed prohibition Addresses two regression-test gaps from review of github#4508: 1. The shell-allowlist test matched bare shell(python) substrings, which also appear in the lock's commented tool inventory, so it passed even if compilation dropped the real --allow-tool arguments. It now isolates the executable harness command line (the sole copilot_harness.cjs reference) and asserts the full escaped --allow-tool 'shell(python)'/'shell(python3)'/ 'shell(pytest)' arguments. 2. The pytest-PATH test checked three independent substrings, so wording that recommended .venv/bin/python would still pass. It now asserts the normalized prohibition ("Do not invoke ... Permission denied.") as one contiguous unit, so reversing the guidance or splitting the permission-denied explanation away fails the test. Source and compiled lock are unchanged; this is test-only strengthening. Mutation checks confirm the old assertions passed while the new ones fail when the executable allow-tool args are dropped, the prohibition is reversed, or the permission-denied explanation is separated. Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Maintainer completion is pushed to Against that upstream baseline, the effective configuration changes remain the intended credit cap of 2000 and the additional executable The final test-only commit closes both review gaps: assertions now inspect the executable harness arguments rather than its commented inventory, and the PATH guidance check requires the complete prohibition and permission-denied explanation together. Mutation checks demonstrated that dropping executable permissions, reversing the prohibition, or separating its explanation passed the old assertions but fail the new ones. All 29 focused workflow tests pass. Fresh-head CI has been approved, and the new Copilot review recommends approval with no new comments. The original ac992b4 and 5c52420 commits are preserved. With explicit permission from @mnriem, only the two new maintainer commits were recreated using a lease-protected push to repair omitted merge-commit authorship trailers; file contents and merge parents were unchanged. Their replacements are f7c5825 and e8c80aa, followed by the normal test-only commit 1c495c8. All three carry both required AI-authorship trailers. The remaining author follow-up is the tool/product name requested in the earlier disclosure comment; no additional code work is requested from @gyanu2507. Posted on behalf of @mnriem by GitHub Copilot (model: GPT-6 Astra). The implementation, regeneration, and test commits were authored by GitHub Copilot (model: Claude Opus 4.8, autonomous); this summary does not assert human line-by-line review. |
|
Thank you! |
Description
The agentic bug-fix workflow hit the 1K default credit cap, then failed trying
./.venv/bin/python -m pytestwith Permission denied.This sets
max-ai-credits: 2000, allowspythonas well aspython3on the bash allowlist, and tells the agent to usepython3 -m pytest/pytestfrom PATH instead of a project venv interpreter.Testing
uv sync && uv run pytestuv run pytest tests/test_bug_fix_workflow.pyAI Disclosure
LLM-assisted implementation. I chose the issue, wrote the tests, and ran them locally.
Fixes #4472