fix(conformance): USE-001 standardized error codes + USE-003 staged mode emoji#19497
fix(conformance): USE-001 standardized error codes + USE-003 staged mode emoji#19497
Conversation
…E-003) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Addresses two Safe Outputs conformance failures by standardizing error message prefixes and ensuring staged-mode runs emit the canonical staged preview indicator.
Changes:
- Prefix
throw new Error(...)messages inrun_operation_update_upgrade.cjswith standardizedERR_*codes. - Emit the canonical
🎭 Staged Mode Previewlog ingenerate_aw_info.cjswhen staged mode is enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| actions/setup/js/run_operation_update_upgrade.cjs | Imports standardized error codes and prefixes thrown errors with ERR_CONFIG / ERR_SYSTEM. |
| actions/setup/js/generate_aw_info.cjs | Imports and calls logStagedPreviewInfo to log staged-mode preview info before printing aw_info output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| fs.writeFileSync(tmpPath, JSON.stringify(awInfo, null, 2)); | ||
|
|
||
| if (awInfo.staged) { | ||
| logStagedPreviewInfo("Generating workflow info in staged mode — no changes applied"); |
There was a problem hiding this comment.
The staged-mode logging path is newly introduced here, but generate_aw_info.test.cjs doesn’t currently assert that the canonical 🎭 Staged Mode Preview message is emitted when GH_AW_INFO_STAGED === "true". Please add a test that sets staged mode and verifies the expected core.info call (via the existing global core mock) so this conformance behavior doesn’t regress.
| logStagedPreviewInfo("Generating workflow info in staged mode — no changes applied"); | |
| logStagedPreviewInfo("🎭 Staged Mode Preview: Generating workflow info in staged mode — no changes applied"); |
Two LOW-severity Safe Outputs conformance failures:
run_operation_update_upgrade.cjslackedERR_*prefixes on thrown errors, andgenerate_aw_info.cjscomputed astagedflag but never emitted the canonical🎭 Staged Mode Previewlog.USE-001 —
run_operation_update_upgrade.cjsImport
ERR_CONFIG/ERR_SYSTEMfromerror_codes.cjsand prefix allthrow new Error(...)messages:USE-003 —
generate_aw_info.cjsImport
logStagedPreviewInfofromstaged_preview.cjsand call it before the info dump when staged mode is active:Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.