docs: clarify why the drift guard preserves array order - #22772
Merged
Conversation
The comment claimed "Array order IS meaningful" for tsconfig arrays in general, which overstates it: order matters for a `paths` fallback list but not for `lib` or `types`. Flagged by Copilot on erigontech/cocoon#39. The implementation is unchanged and stays correct — preserving order everywhere is the safe direction, since a reordered `lib` costs one harmless reconciliation whereas sorting arrays would silently hide a real `paths` change. Only the justification is reworded to say that rather than implying all tsconfig arrays carry ordered semantics. Comment-only; the three copies stay byte-identical (normalised). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refines the explanatory comment in the docs-site tsconfig drift guard to clarify that array order is not universally meaningful across tsconfig fields, while still justifying why the guard preserves array order everywhere.
Changes:
- Rewords the
canoncomment to distinguish ordered semantics inpathsfrom typically order-insensitive arrays likelib/types. - Clarifies the trade-off of preserving order everywhere (harmless drift vs. avoiding silent
pathsregressions).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
"Order matters in some ... and not in others" left some/others without an explicit referent. Say "some arrays" / "others". Flagged by Copilot on #22772. Comment-only; the three copies stay byte-identical (normalised). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AskAlexSharov
approved these changes
Jul 28, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 28, 2026
bloxster
added a commit
to erigontech/zilkworm-docs
that referenced
this pull request
Aug 3, 2026
"Order matters in some ... and not in others" left some/others without an explicit referent. Say "some arrays" / "others". Flagged by Copilot on erigontech/erigon#22772. Comment-only; the three copies stay byte-identical (normalised). Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 free
to 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.
Comment-only follow-up to #22764.
The guard's comment claimed "Array order IS meaningful" for tsconfig arrays in general, which overstates it: order matters for a
pathsfallback list, but not forlibortypes. Flagged by Copilot on erigontech/cocoon#39.The implementation is unchanged and stays correct. Preserving array order everywhere is the safe direction because the failure modes are asymmetric — a reordered
libreports drift that turns out to be harmless (one reconciliation), whereas sorting arrays would silently hide a realpathschange. The comment now says that, instead of implying all tsconfig arrays carry ordered semantics.Propagated in identical wording to erigontech/cocoon#39 and erigontech/zilkworm-docs#14, so the three copies stay byte-identical — the docs-sites alignment routine now hashes the guard's content, so a fix landing in one repo alone shows up as drift.
🤖 Generated with Claude Code