Skip to content

fix: stabilize generated instructions README ordering#1846

Merged
aaronpowell merged 2 commits into
github:stagedfrom
kimtth:staged
May 28, 2026
Merged

fix: stabilize generated instructions README ordering#1846
aaronpowell merged 2 commits into
github:stagedfrom
kimtth:staged

Conversation

@kimtth
Copy link
Copy Markdown

@kimtth kimtth commented May 27, 2026

The validate-readme workflow failed because npm run build regenerated docs/README.instructions.md with a different row order on the Ubuntu GitHub Actions runner.

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the staged branch for this pull request.

Description

String.prototype.localeCompare uses the host OS locale when no locale argument is supplied.

The root cause was OS-dependent default locale behavior in String.prototype.localeCompare. On Windows the generator sorted the Japanese C# instruction before the Korean C# instruction; on Ubuntu the same code sorted them in reverse order, causing git diff --exit-code to fail.

The fix is a one-line change in update-readme.mjs: pass 'en' as the explicit locale argument to every localeCompare call used for title sorting, so the output is identical regardless of the OS the generator runs on.

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify): Bug fix — make eng/update-readme.mjs sort deterministic by passing an explicit 'en' locale to localeCompare

Additional Notes

Only update-readme.mjs is changed (2 lines). No new files, no behaviour change beyond sort determinism. The regenerated README.instructions.md is included in the commit so CI passes immediately.

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Pass an explicit 'en' locale to localeCompare for instruction title
sorting in update-readme.mjs. Previously the default OS locale was
used, causing String.prototype.localeCompare to produce different
orderings on Windows vs Ubuntu (affecting characters like Korean and
Japanese CJK titles), which made the validate-readme CI workflow
non-deterministic.

Fixes the root cause of the locale-dependent sort instability.
@kimtth kimtth requested a review from aaronpowell as a code owner May 27, 2026 02:01
@github-actions
Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions github-actions Bot added the needs-review:HIGH Contributor reputation check flagged HIGH risk label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions
Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions
Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions
Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit NONE

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@aaronpowell aaronpowell merged commit 78d62af into github:staged May 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:HIGH Contributor reputation check flagged HIGH risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants