Skip to content

docs: clarify why the drift guard preserves array order - #22772

Merged
awskii merged 2 commits into
mainfrom
docs/drift-guard-comment-nuance
Jul 28, 2026
Merged

docs: clarify why the drift guard preserves array order#22772
awskii merged 2 commits into
mainfrom
docs/drift-guard-comment-nuance

Conversation

@bloxster

Copy link
Copy Markdown
Collaborator

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 paths fallback list, but not for lib or types. 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 lib reports drift that turns out to be harmless (one reconciliation), whereas sorting arrays would silently hide a real paths change. 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

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 canon comment to distinguish ordered semantics in paths from typically order-insensitive arrays like lib/types.
  • Clarifies the trade-off of preserving order everywhere (harmless drift vs. avoiding silent paths regressions).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/site/scripts/check-tsconfig-drift.mjs Outdated
"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
AskAlexSharov added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 28, 2026
@awskii
awskii added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit a616f27 Jul 28, 2026
23 checks passed
@awskii
awskii deleted the docs/drift-guard-comment-nuance branch July 28, 2026 07:02
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants