Optimize Daily Rendering Scripts Verifier prompt to remove repeated sandbox probing and polling churn - #48737
Merged
pelikhan merged 2 commits intoJul 28, 2026
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize daily rendering scripts verifier to reduce environment probing turns
Optimize Daily Rendering Scripts Verifier prompt to remove repeated sandbox probing and polling churn
Jul 28, 2026
pelikhan
marked this pull request as ready for review
July 28, 2026 21:54
pelikhan
deleted the
copilot/agentic-token-optimizer-optimize-daily-rendering-s
branch
July 28, 2026 21:54
Contributor
There was a problem hiding this comment.
Pull request overview
Tightens the Daily Rendering Scripts Verifier prompt to reduce repeated environment probing and polling.
Changes:
- Centralizes sandbox constraints and bounded log-wait guidance.
- Uses targeted Vitest commands and one canonical Git status check.
- Regenerates workflow metadata.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-rendering-scripts-verifier.md |
Updates execution and validation guidance. |
.github/workflows/daily-rendering-scripts-verifier.lock.yml |
Refreshes the compiled body hash. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
.github/workflows/daily-rendering-scripts-verifier.md:101
- This constraint conflicts with the workflow's executable steps: Phases 4, 5, and 7 still invoke
node /tmp/gh-aw/...directly (lines 242, 314, and 365–366). If barenodeis always denied as stated here, the verifier still hits the same dead path and cannot run its real-output or rendering harnesses. Replace those invocations with a supported execution path, or narrow this claim if only availability probes are denied.
- Bare `node` execution is permission-gated and denied in this sandbox. Do not run `node -e`, `which node`, `node --version`, or full-path `node` probes. Use `npm run test:js -- --run <spec>` as the only supported JavaScript test harness command.
.github/workflows/daily-rendering-scripts-verifier.md:379
- This canonical command is not permitted by the compiled tool policy. The imported safe-output permissions grant only
Bash(git status), whilegit -C … status --porcelainhas a different command shape and there is no matchinggit -Centry intools.bashor the generated--allowed-toolslist. The mandated one-time check will therefore be denied; explicitly allow this exact command shape (then recompile), or use the already allowedgit statusfrom the workspace.
5. Verify working tree cleanliness exactly once before creating the PR:
```bash
git -C ${{ github.workspace }} status --porcelain
</details>
- **Files reviewed:** 2/2 changed files
- **Comments generated:** 3
- **Review effort level:** Medium
|
|
||
| The tool returns a JSON response with a `file_path` field pointing to a summary JSON in `/tmp/gh-aw/logs-cache/`. | ||
| Record this `file_path` for use in Phase 2. | ||
| If the MCP call appears to hang or times out, run a single `sleep 60`, then read the `file_path` result directly (no repeated polling loops). |
|
|
||
| ## Known Environment Constraints | ||
|
|
||
| - `bash` cannot access `/tmp/` in this environment — use the Read/Write tools for `/tmp/gh-aw/...` paths. |
Comment on lines
+372
to
+373
| npm run test:js -- --run parse_<engine>_log.test.cjs 2>&1 | tail -40 | ||
| npm run test:js -- --run render_template.test.cjs 2>&1 | tail -20 |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daily Rendering Scripts Verifier was spending significant turns on repeated environment rediscovery (node probing, log polling loops, duplicate git status checks), while recent failures also showed it needs clearer execution constraints. This change tightens the workflow prompt to eliminate known dead paths and enforce deterministic, low-churn execution behavior.
Consolidated environment constraints (single source of truth)
Added a
Known Environment Constraintssection immediately after setup, centralizing:/tmpaccess limitation (bashvs Read/Write tools)logsMCP timeout behavior with one-shot wait guidanceRemoved blind probing from parser/test path
Updated Phase 4 guidance to explicitly prohibit
node -e/node --version/which node/ full-path node discovery loops, and direct the agent to the working vitest harness path.Made logs retrieval behavior non-interactive and bounded
In Phase 1, added explicit instruction: if logs appears to hang/timeout, wait once (
sleep 60) and read returnedfile_path; do not loop with repeatedsleep + tail.Eliminated duplicate cleanliness checks
In Phase 7, added a single canonical working-tree check and explicitly disallowed repeated variants of the same status command.
Normalized JS test commands to existing harness
Replaced ambiguous
npm test -- --run ...guidance with targeted:npm run test:js -- --run parse_<engine>_log.test.cjsnpm run test:js -- --run render_template.test.cjs