Skip to content

Preserve safe-output telemetry and tighten terminal-output guidance - #71884

Closed
pelikhan with Copilot wants to merge 7 commits into
mainfrom
copilot/aw-top-10-reduce-missing-terminal-safe-output-fail
Closed

pelikhan with Copilot wants to merge 7 commits into
mainfrom
copilot/aw-top-10-reduce-missing-terminal-safe-output-fail

Conversation

Copilot AI commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Five workflows reported missing terminal safe outputs; cross-repo smoke reports lacked per-transport telemetry. Both inspected smoke runs failed checkout authentication before agent startup.

  • Failure diagnostics: Retain CLI/MCP call counts, registration status, and persistence evidence for missing-output and startup failures. Distinguish unavailable telemetry from measured zero calls.
  • Completion contract: Require a successful safe-output call—not a failed attempt or final prose. Reserve noop for unnecessary actions; use report_incomplete for blocked, failed, or unconfirmed work.
  • Regression coverage: Cover clean-exit failure reports and compile-time guidance/reporting wiring for both cross-repo smoke workflows.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add safe-output telemetry to failure reports Preserve safe-output telemetry and tighten terminal-output guidance Oct 25, 2026
Copilot AI requested a review from pelikhan October 25, 2026 12:42
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot must be privacy preserving and not secret leaking

@pelikhan
pelikhan marked this pull request as ready for review October 25, 2026 13:27
Copilot AI max review requested due to automatic review settings October 25, 2026 13:27

Copilot AI commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot must be privacy preserving and not secret leaking

Reviewed the reporting path: it emits only safe-output registration status and aggregate CLI/MCP/persistence counts, not tool names, arguments, or raw log contents. Diagnostics still pass through the shared secret-redaction and length-bounding pipeline, and the regression test verifies a private tool payload is absent from the report. No code change is needed.

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.

🟡 Changes recommended

Completion guidance and CLI telemetry transfer still have gaps that undermine the intended behavior.

3 open issues
What changed in this PR

This PR improves gh-aw failure diagnostics for missing terminal safe outputs and clarifies how agents should signal completion or incomplete work.

Changes:

  • Expose recorded or unavailable CLI/MCP call counts, tool registration status, and persistence evidence.
  • Tighten guidance for successful safe-output calls, noop, and report_incomplete.
  • Add clean-exit reporting tests and compile-time checks for both cross-repository smoke workflows.
File Description
pkg/​workflow/​unified_prompt_creation_test.go Checks shared guidance and smoke-workflow collection/reporting wiring.
actions/​setup/​md/​safe_outputs_prompt.md Clarifies successful-call requirements and incomplete-task signaling.
actions/​setup/​js/​handle_agent_failure.test.cjs Covers clean-exit failure reports with unavailable, zero, and nonzero call counts.
actions/​setup/​js/​empty_output_outcome.test.cjs Updates expectations for telemetry, persistence, and startup diagnostics.
actions/​setup/​js/​empty_output_outcome.cjs Includes completion evidence in missing-output and startup-failure summaries.
actions/​setup/​js/​collect_ndjson_output.test.cjs Updates expected synthesized failure details.

Review effort: Max

Comment thread actions/setup/md/safe_outputs_prompt.md
Comment thread actions/setup/md/safe_outputs_prompt.md Outdated
Comment thread pkg/workflow/unified_prompt_creation_test.go
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/md/safe_outputs_prompt.md:3): report_missing_tool and report_missing_data can succeed, but the collector explicitly excludes them from terminal outputs (collect_ndjson_output.cjs:374). An agent that only emits one of these diagnostics passes this final check and still fails with missing_terminal_safe_output. Require a successful non-diagnostic safe output, using report_incomplete when the task remains blocked. - Preserve safe-output telemetry and tighten terminal-output guidance #71884 (comment)
  3. Review (actions/setup/md/safe_outputs_prompt.md:5): The smoke prompts also render safe_outputs_create_pull_request.md:14 and mcp_cli_tools_with_safeoutputs_prompt.md:8–10, which still allow noop for an unready action and restrict report_incomplete to failed writes. Align those fragments with this rule so blocked tasks are not reported as successful no-ops; the same restriction occurs in safe_outputs_cli_only_transport_prompt.md:12. - Preserve safe-output telemetry and tighten terminal-output guidance #71884 (comment)
  4. Review (pkg/workflow/unified_prompt_creation_test.go:102): The conclusion job rebuilds the report from the downloaded agent artifact, but that artifact omits /tmp/gh-aw/mcp-cli-audit/, the only source used for CLI call counts. Both smoke workflows therefore lose recorded CLI counts and publish unknown (not recorded) even when safeoutputs was invoked through the CLI. Upload that audit directory and assert its inclusion here alongside mcp-logs/ and safeoutputs.jsonl. - Preserve safe-output telemetry and tighten terminal-output guidance #71884 (comment)

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 state: 92af973eb39228204d6ba20742dabbc64f4e9479c1e394a52d8e420a0c84fff8

Generated by 👨‍🍳 PR Sous Chef · pi · haiku45 · ~17 AIC · ⌖ ~9 AIC · ⊞ 1.1K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits October 25, 2026 14:19
…uce-missing-terminal-safe-output-fail

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot avoid new file, add entry to agent unified session file

Copilot AI and others added 2 commits October 25, 2026 16:45
…uce-missing-terminal-safe-output-fail

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes....

Completed in f9c1ad1: merged the latest main, fixed the prompt wording caught by the existing Go test, added aggregate-only CLI audit telemetry to the existing unified session file, and refreshed the affected wasm goldens. The three review threads already have replies; I can’t resolve them with the available tools. CI was not rerun.

@copilot avoid new file, add entry to agent unified session file

Done in f9c1ad1: no repository file was added; CLI aggregate telemetry is recorded in the existing usage/aw_session.jsonl as mcp.cli_audit.

/tmp/gh-aw/github_rate_limits.jsonl
/tmp/gh-aw/otel.jsonl
/tmp/gh-aw/otlp-export-errors.jsonl
/tmp/gh-aw/mcp-cli-audit/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot avoid adding new folder if not needed. recompile

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved the audit files to /tmp/gh-aw/mcp-cli-audit.<server>.audit.jsonl, removed the extra directory from artifact uploads, and recompiled the workflows. Fixed in 900c438.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.

[AW Top 10] 06 Reduce missing terminal safe output failures

4 participants