Skip to content

Optimize Daily Rendering Scripts Verifier prompt to remove repeated sandbox probing and polling churn - #48737

Merged
pelikhan merged 2 commits into
mainfrom
copilot/agentic-token-optimizer-optimize-daily-rendering-s
Jul 28, 2026
Merged

Optimize Daily Rendering Scripts Verifier prompt to remove repeated sandbox probing and polling churn#48737
pelikhan merged 2 commits into
mainfrom
copilot/agentic-token-optimizer-optimize-daily-rendering-s

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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 Constraints section immediately after setup, centralizing:

    • /tmp access limitation (bash vs Read/Write tools)
    • node probing denial in sandbox
    • logs MCP timeout behavior with one-shot wait guidance
  • Removed 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 returned file_path; do not loop with repeated sleep + 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.cjs
    • npm run test:js -- --run render_template.test.cjs
# Canonical regression checks in workflow guidance
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

# Single cleanliness check
git -C ${{ github.workspace }} status --porcelain

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
Copilot AI requested a review from pelikhan July 28, 2026 21:48
@pelikhan
pelikhan marked this pull request as ready for review July 28, 2026 21:54
Copilot AI review requested due to automatic review settings July 28, 2026 21:54
@pelikhan
pelikhan merged commit 9aa1fd9 into main Jul 28, 2026
@pelikhan
pelikhan deleted the copilot/agentic-token-optimizer-optimize-daily-rendering-s branch July 28, 2026 21:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bare node is 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), while git -C … status --porcelain has a different command shape and there is no matching git -C entry in tools.bash or the generated --allowed-tools list. The mandated one-time check will therefore be denied; explicitly allow this exact command shape (then recompile), or use the already allowed git status from 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
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[agentic-token-optimizer] Optimize Daily Rendering Scripts Verifier: cut ~40 % of turns spent on environment probing

3 participants