Conformance Check Failure
Check ID: USE-001
Severity: LOW (4 occurrences, grouped)
Category: Usability (Error Code Standardization)
Problem Description
The USE-001 conformance check flags four safe-output handlers that throw errors (throw new Error(...) / core.setFailed) without using the repository-standard EXXX: error-code prefix. The convention is already established elsewhere in the codebase (for example assign_to_agent.cjs uses E004:, comment_limit_helpers.cjs uses E006/E007/E008, comment_memory.cjs uses E001, dispatch_repository.cjs uses E002). Standardized codes make errors greppable, documentable, and consistent for downstream tooling and users.
These are LOW severity and individually minor, but they share one root cause and one clean fix, so they are grouped here.
Affected Components
Each handler throws plain (uncoded) errors:
Current vs Expected Behavior
Current Behavior
Errors are thrown as free-text messages with no EXXX: prefix, e.g.:
throw new Error("comment_id is required");
throw new Error(`apply_samples: GH_AW_SAMPLES must be a JSON array`);
The USE-001 check (grep -qE "E[0-9]{3}|ERROR_|ERR_") finds no standardized code and reports LOW.
Expected Behavior
Thrown/failed errors carry a standardized code prefix consistent with the existing scheme, e.g.:
throw new Error(`E0NN: comment_id is required`);
Remediation Steps
This task can be assigned to a Copilot coding agent:
- Survey the currently-used error codes (E000-E008, E099 are already taken) and allocate new codes for each handlers distinct failure classes, following the existing numbering scheme. Avoid collisions.
- Prefix the
throw new Error(...) / core.setFailed(...) messages in the four handlers with the allocated EXXX: codes. Keep the human-readable remainder of each message intact.
- If a central error-code registry/doc exists, add the new codes there for discoverability.
- Re-run the conformance checker and confirm USE-001 passes for all four handlers.
Verification
After remediation, verify the fix by running:
bash scripts/check-safe-outputs-conformance.sh
The USE-001 check should report no flagged handlers.
References
- Safe Outputs Specification:
docs/src/content/docs/specs/safe-outputs-specification.md
- Conformance Checker:
scripts/check-safe-outputs-conformance.sh (check_error_codes, lines 195-224)
- Existing examples:
actions/setup/js/comment_limit_helpers.cjs (E006-E008), actions/setup/js/assign_to_agent.cjs (E004)
- Run ID: 27085521200
- Date: 2026-06-07
Generated by ✅ Daily Safe Outputs Conformance Checker · 58.2 AIC · ⌖ 12.8 AIC · ⊞ 6.7K · ◷
Conformance Check Failure
Check ID: USE-001
Severity: LOW (4 occurrences, grouped)
Category: Usability (Error Code Standardization)
Problem Description
The USE-001 conformance check flags four safe-output handlers that throw errors (
throw new Error(...)/core.setFailed) without using the repository-standardEXXX:error-code prefix. The convention is already established elsewhere in the codebase (for exampleassign_to_agent.cjsusesE004:,comment_limit_helpers.cjsusesE006/E007/E008,comment_memory.cjsusesE001,dispatch_repository.cjsusesE002). Standardized codes make errors greppable, documentable, and consistent for downstream tooling and users.These are LOW severity and individually minor, but they share one root cause and one clean fix, so they are grouped here.
Affected Components
Each handler throws plain (uncoded) errors:
actions/setup/js/add_reviewer.cjs— e.g. line 216Could not resolve pull request node ID ...actions/setup/js/apply_samples.cjs— e.g. lines 62/71/75/78 JSON parsing & validation errorsactions/setup/js/hide_comment.cjs— e.g. lines 56/68/72/83 comment_id validation/resolution errorsactions/setup/js/safeoutputs_cli.cjs— e.g. lines 33/45 invalid argument / tool-invocation failuresCurrent vs Expected Behavior
Current Behavior
Errors are thrown as free-text messages with no
EXXX:prefix, e.g.:The USE-001 check (
grep -qE "E[0-9]{3}|ERROR_|ERR_") finds no standardized code and reports LOW.Expected Behavior
Thrown/failed errors carry a standardized code prefix consistent with the existing scheme, e.g.:
Remediation Steps
This task can be assigned to a Copilot coding agent:
throw new Error(...)/core.setFailed(...)messages in the four handlers with the allocatedEXXX:codes. Keep the human-readable remainder of each message intact.Verification
After remediation, verify the fix by running:
The USE-001 check should report no flagged handlers.
References
docs/src/content/docs/specs/safe-outputs-specification.mdscripts/check-safe-outputs-conformance.sh(check_error_codes, lines 195-224)actions/setup/js/comment_limit_helpers.cjs(E006-E008),actions/setup/js/assign_to_agent.cjs(E004)