Uh oh!
There was an error while loading. Please reload this page.
fix(docs): restore the intended bytes of the AGENTS.md heredoc example - #5152
Merged
Conversation
…esidue (#5150) The shared-scratchpad clause in AGENTS.md 9 recommended git commit -F - with a heredoc, but the line landed as <<EOF wrapped in the single-quote-in-single-quote shell escape. Copied verbatim it yields a heredoc whose terminator is not EOF, so the closing line never matches and the command hangs with no error - pushing the reader back to the fallback the rule argues against. Restores the intended bytes. One line; surrounding prose, ordering and argument untouched.
os-zhuang
marked this pull request as ready for review
August 18, 2026 06:34
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#5150
One line. The shared-scratchpad clause in
AGENTS.md§9 recommendsgit commit -F -with a heredoc as the mechanism half of the rule, but the line landed carrying the single-quote-inside-single-quotes shell escape, leaked in by the write that created it. Copied verbatim, the heredoc's terminator is no longerEOF, so the closing line never matches and the command hangs with no error — pushing the reader back to the temp-file fallback that the very same paragraph argues against.Surrounding prose, the numbered ordering, and the paragraph arguing why mechanism outranks discipline are untouched, per the card. The diff is 1 insertion, 1 deletion.
Byte verification (not rendering)
A diff view escapes quotes and looks fine either way, so these are read back from the committed object at
55ab4c9.A residue scan over the committed blob returns nothing (grep exit 1). The fix was applied with an editing tool, never a nested-quoted shell heredoc — that write path is what produced the defect in the first place.
Gates
Derived from the changed path (
AGENTS.md) by inspecting each script's actual scan set, not from recall. All run at55ab4c9, the final commit:node scripts/check-control-bytes.mjs0node scripts/check-doc-links.mjs0node scripts/check-changeset-presence.mjs0node scripts/check-changeset-no-major.mjs0Included because
AGENTS.mdis genuinely in scope:check-control-bytesenumerates viagit ls-files(all tracked text files), andcheck-doc-linkslists{ path: 'AGENTS.md', rule: 'disk' }explicitly. Excluded with reason:check-skills-pathshasSCAN_ROOT = 'skills', so a root file is outside it; the remainingcheck:*scripts referenceAGENTS.mdonly in header comments, not in a scan set.Changeset
None, and none is owed —
check-changeset-presencedecides this itself and says so:Its guarded surface is
<pkg>/src/**for packages in thefixedgroup of.changeset/config.json; a rootAGENTS.mdedit is outside it. Note for the reviewer: noskip-changesetlabel was applied, because that mechanism does not exist in this repository —content/docs/guide/ci-cd-pipeline.mdrecords it explicitly ("None of it existed"), and the exemption form here is an empty-frontmatter changeset, which this change does not need either.Reverse verification
Predicted before running: nothing goes red. Observed: exactly that.
Re-introducing the corrupted bytes and re-running the full derived union left all four gates at exit
0. The re-introduction was byte-identical toorigin/main— independently confirmed bycheck-changeset-presencethen reporting0 file(s) changedagainst the merge-base.Reasons, all by design rather than oversight:
check-control-bytesjudges control bytes only, and'(0x27) /"(0x22) are printable ASCII;check-doc-linksparses links and paths, and its own header notes this file has no markdown links at all; the changeset gates never read file content.The generalized hole — no gate anywhere validates whether a fenced shell example in any markdown file is executable — is filed separately, unassigned, as #5151 with the measurement.
Generated by Claude Code