Repository navigation
Make safe-output guidance resilient to missing sandbox tools - #68716
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The guidance is consistent, the fallback is safely implemented, and regression coverage validates the intended behavior.
0 open findings
What changed in this PR
Makes safe-output guidance resilient when sandbox CLI tools are unavailable, addressing #68702.
Changes:
- Adds availability checks and a Node.js serialization fallback.
- Tests empty and complex Unicode bodies.
- Documents sandbox diagnostics and fallback behavior.
No confirmed vulnerabilities found. The Node fallback preserved representative complex content successfully.
| File | Description |
|---|---|
actions/setup/md/mcp_cli_tools_with_safeoutputs_prompt.md |
Adds tool checks and safe fallback guidance. |
pkg/workflow/prompt_validation_test.go |
Adds prompt and serialization regression tests. |
docs/src/content/docs/troubleshooting/debugging.md |
Documents diagnosis of missing sandbox commands. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Request changes
This adds useful guidance, but it still misses the CLI-only safe-output path and one of the new regression tests is overfit to prompt formatting.
Blocking themes
- The new availability checks live only in
mcp_cli_tools_with_safeoutputs_prompt.md, so workflows that rely onsafe_outputs_cli_only_transport_prompt.mdstill hit the original missing-command failure mode. - The Node fallback test extracts the script via an exact prompt string, which makes future prompt maintenance fail for formatting-only edits instead of behavioral regressions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 43.3 AIC · ⌖ 5.92 AIC · ⊞ 21.7K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs and /tdd (triage used the fallback heuristic consistent with pr-triage's own output — change type: documentation). Posting as COMMENT; one recurring naming gap worth fixing, otherwise solid.
📋 Key Themes & Highlights
Key Themes
- Vocabulary gap: both the prompt guidance and the new troubleshooting section tell the agent/operator to "report the missing command" once a CLI tool is confirmed unavailable, but neither names the actual safe-output tool (
missing_tool) that exists for exactly this scenario, perdocs/src/content/docs/reference/safe-outputs.md. Leaving this implicit risks an agent defaulting toreport_incomplete(reserved for failed write attempts) or ending the turn with no safe-output call at all — the documented #1 cause of workflow failures.
Positive Highlights
- ✅
TestSafeOutputsCLIPromptNodeFallbackPreservesBodyis a genuine regression test: it extracts the real heredoc script from the prompt file and executes it with Node, verifying empty-body and large Unicode/quoted-content round-trips — this is exactly the kind of test-as-specification the/tddskill looks for, not just a string-contains check. - ✅ The
jq-missing → Node.js fallback instructions correctly gate on serialization success before submitting, matching the existing "don't hand-escape large bodies" guardrail already in the file. - ✅ Troubleshooting doc correctly separates "scripts copied to runner" from "CLI wrapper mounted on PATH" — a subtle but real distinction for self-hosted runner debugging.
Uncertainty
- Diff was small (119 lines) and fully reviewed; no truncation concerns.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 73.8 AIC · ⌖ 14.8 AIC · ⊞ 10.8K
Comment /matt to run again
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 7ac99e4
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ue-65058 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Document stdin support without auxiliary-tool recommendations and preserve escaping across generated examples, runtime prompts, and troubleshooting guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore explicit CLI-only transport guidance and validate inline JSON examples while preserving stdin support and single-output guarantees. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Self-hosted Codex runs intermittently reported missing commands prescribed by the generated prompt. Successful safe-output file copying does not establish CLI availability inside the sandbox; the historical cause remains unconfirmed.
\n, double quotes as\", backslashes as\\, and apostrophes as\u0027; Unicode can remain literal. Runtime prompts, generated CLI recommendations/help, troubleshooting, and authoring instructions use the same approach.safeoutputs <tool> ., without recommending auxiliary tools, pipelines, temporary files, or shell-expansion workarounds. Native MCP functions are alternatives only when explicitly exposed. Preservemissing_toolversusreport_incompletediagnostics, and do not claim emission when no transport is available.