community-attribution: move data processing out of agent sandbox into pre-steps#31302
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Hey A couple of things to address before this lands:
If you'd like a hand cleaning this up, you can assign the following prompt to your coding agent:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the community-attribution workflow to avoid sandbox-restricted shell data processing by pre-formatting attribution artifacts before the agent runs, and expands the agent tool allowlist to include printf across many locked workflows.
Changes:
- Add a new pre-step in
daily-community-attribution.mdthat generatesattribution_by_author.jsonand a ready-to-insertreadme_community_section_tier012.mdusing unrestrictedjq. - Update the agent-facing instructions in
daily-community-attribution.mdto consume the pre-formatted files viacat(and start from the prebuilt README section). - Allow the
printfshell tool in numerous*.lock.ymlworkflows (both in the documented allowlist comments and in the actual--allow-tool 'shell(printf)'args).
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/workflow-skill-extractor.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/weekly-editors-health-check.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/visual-regression-checker.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/ubuntu-image-analyzer.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/tidy.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/test-quality-sentinel.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/stale-pr-cleanup.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/spec-librarian.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/spec-extractor.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/smoke-workflow-call.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/smoke-multi-pr.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/slide-deck-maintainer.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/safe-output-health.lock.yml | Allow Bash(printf) in the Claude harness allowed-tools list. |
| .github/workflows/release.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/poem-bot.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/mergefest.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/layout-spec-maintainer.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/draft-pr-cleanup.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/discussion-task-miner.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/dev-hawk.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/delight.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-testify-uber-super-expert.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-spdd-spec-planner.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-safe-output-integrator.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-model-inventory.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-mcp-concurrency-analysis.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-geo-optimizer.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-file-diet.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-compiler-threat-spec-optimizer.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-compiler-quality.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/daily-community-attribution.md | Add a pre-step to pre-group/format attribution data and update agent instructions to consume preformatted files. |
| .github/workflows/copilot-opt.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/copilot-cli-deep-research.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/breaking-change-checker.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/auto-triage-issues.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/architecture-guardian.lock.yml | Allow shell(printf) for the agent harness invocation. |
| .github/workflows/approach-validator.lock.yml | Allow Bash(printf) in the Claude harness allowed-tools list. |
| .github/workflows/ab-testing-advisor.lock.yml | Allow shell(printf) for the agent harness invocation. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 59/59 changed files
- Comments generated: 0
Bug Fix
What was the bug?
The Copilot agent's sandbox blocked
jqpipelines,awk,sed, and Python at runtime — tools the agent relied on to group, sort, and formatpre_attributed.jsoninto the README community section. The data was available but unprocessable, causing the workflow to self-report failure instead of updating the README.How did you fix it?
Moved all heavy data-processing into a new GitHub Actions pre-step (
Format attribution data for agent) that runs before the agent, wherejqis unrestricted. The agent now reads pre-formatted files viacatand uses only the edit tool and GitHub MCPissue_readcalls.New pre-step outputs:
attribution_by_author.json— Tier 0–2 issues pre-grouped by author (alphabetical), issues sorted descendingreadme_community_section_tier012.md— complete formatted## 🌍 Community Contributionsblock ready to splice intoREADME.mdAgent prompt changes:
jqpipeline examples withcatcommands pointing at the new pre-formatted filesattribution_by_author.jsoninstead of processingpre_attributed.jsondirectlyreadme_community_section_tier012.mdinstead of producing the section from scratchcat-only file accessThe agent still handles Tier 3 (up to 5 issues via
issue_read) and wiki merging, neither of which requires bash data-processing.