Skip to content

[Safe Outputs Conformance] USE-001 / USE-003: Two LOW conformance issues — missing standardized error codes and staged-mode emoji #19444

@github-actions

Description

@github-actions

Conformance Check Failures

Severity: LOW
Category: Usability

Two related usability conformance checks are failing. Both are straightforward fixes suitable for a single Copilot coding agent assignment.


Issue 1 — USE-001: Missing Standardized Error Codes

Check ID: USE-001
File: actions/setup/js/run_operation_update_upgrade.cjs

Problem

The handler throws new Error(...) and calls core.setFailed(...) without using the standardized error code prefixes (E001E010, ERROR_*, or ERR_*) required by the Safe Outputs specification. This makes errors harder to classify, monitor, and document.

Current Behavior

Errors are thrown as plain strings, e.g.:

throw new Error(`Command '\$\{fullCmd}' failed with exit code \$\{exitCode}`);
throw new Error("Missing GitHub token: ...");

Expected Behavior

Error messages SHOULD include a standardized prefix so consumers can programmatically identify the error class:

throw new Error("ERR_COMMAND_FAILED: Command '...' failed with exit code ...");
throw new Error("ERR_MISSING_TOKEN: Missing GitHub token: ...");

Issue 2 — USE-003: Staged Mode Missing 🎭 Emoji / logStagedPreviewInfo

Check ID: USE-003
File: actions/setup/js/generate_aw_info.cjs

Problem

The file sets staged: process.env.GH_AW_INFO_STAGED === "true" but does not call logStagedPreviewInfo (from staged_preview.cjs) or otherwise emit the canonical 🎭 Staged Mode Preview message when staged mode is active. The specification requires that all handlers with staged mode use the canonical format so users consistently see the staged-mode indicator.

Current Behavior

The staged flag is computed but only stored in the returned info object; no log message using the 🎭 emoji or logStagedPreviewInfo helper is emitted.

Expected Behavior

When staged === true, the handler SHOULD call:

const { logStagedPreviewInfo } = require("./staged_preview.cjs");
// ...
if (info.staged) {
  logStagedPreviewInfo("Generating workflow info in staged mode — no changes applied");
}

Remediation Steps

This task can be assigned to a Copilot coding agent with the following checklist:

  • USE-001 (run_operation_update_upgrade.cjs): Prefix all throw new Error(...) and core.setFailed(...) messages with a standardized code (ERR_* or ERROR_*), following the same convention used in other handlers.
  • USE-003 (generate_aw_info.cjs): Import logStagedPreviewInfo from ./staged_preview.cjs and emit a staged-mode log message when GH_AW_INFO_STAGED === "true".

Verification

After remediation, verify both fixes by running:

bash scripts/check-safe-outputs-conformance.sh

Checks USE-001 and USE-003 should both pass without errors.

References

  • Safe Outputs Specification: docs/src/content/docs/reference/safe-outputs-specification.md
  • Conformance Checker: scripts/check-safe-outputs-conformance.sh
  • Staged Preview Helper: actions/setup/js/staged_preview.cjs
  • Run ID: §22633945407
  • Date: 2026-03-03

Generated by Daily Safe Outputs Conformance Checker ·

  • expires on Mar 4, 2026, 5:07 PM UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions